summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2021-01-31 21:06:38 +0100
committerFilip Gawin <filip.gawin@zoho.com>2021-01-31 21:06:38 +0100
commit3d4791f2915a5b1f38c34a0cf01e0dffc588af8c (patch)
treef6a510c62b8322a11292acafbbc266d1c2c466c2 /src/core
parentFirst batch of fixes (CallAndMessage) (diff)
downloadre3-3d4791f2915a5b1f38c34a0cf01e0dffc588af8c.tar
re3-3d4791f2915a5b1f38c34a0cf01e0dffc588af8c.tar.gz
re3-3d4791f2915a5b1f38c34a0cf01e0dffc588af8c.tar.bz2
re3-3d4791f2915a5b1f38c34a0cf01e0dffc588af8c.tar.lz
re3-3d4791f2915a5b1f38c34a0cf01e0dffc588af8c.tar.xz
re3-3d4791f2915a5b1f38c34a0cf01e0dffc588af8c.tar.zst
re3-3d4791f2915a5b1f38c34a0cf01e0dffc588af8c.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/Camera.cpp25
-rw-r--r--src/core/FileLoader.cpp9
-rw-r--r--src/core/Pools.cpp10
-rw-r--r--src/core/Radar.cpp3
4 files changed, 13 insertions, 34 deletions
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp
index 712e9d09..2ce4e754 100644
--- a/src/core/Camera.cpp
+++ b/src/core/Camera.cpp
@@ -1699,12 +1699,10 @@ CCamera::CamControl(void)
Cams[ActiveCam].CamTargetEntity = pTargetEntity;
// Ped visibility
- if(((Cams[ActiveCam].Mode == CCam::MODE_1STPERSON || Cams[ActiveCam].Mode == CCam::MODE_SNIPER || Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON ||
- Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER) &&
-#ifdef FIX_BUGS
- pTargetEntity &&
-#endif
- pTargetEntity->IsPed()) ||
+ if((Cams[ActiveCam].Mode == CCam::MODE_1STPERSON ||
+ Cams[ActiveCam].Mode == CCam::MODE_SNIPER ||
+ Cams[ActiveCam].Mode == CCam::MODE_M16_1STPERSON ||
+ Cams[ActiveCam].Mode == CCam::MODE_ROCKETLAUNCHER) && pTargetEntity->IsPed() ||
Cams[ActiveCam].Mode == CCam::MODE_FLYBY)
FindPlayerPed()->bIsVisible = false;
else
@@ -1756,15 +1754,14 @@ CCamera::UpdateTargetEntity(void)
PLAYER->m_pMyVehicle &&
PLAYER->m_pMyVehicle->CanPedOpenLocks(PLAYER))
cantOpen = false;
-#ifdef FIX_BUGS
- if(PLAYER)
-#endif
- if(PLAYER->GetPedState() == PED_ENTER_CAR && !cantOpen) {
- if(!enteringCar && CarZoomIndicator != CAM_ZOOM_1STPRS) {
- pTargetEntity = PLAYER->m_pMyVehicle;
- if(PLAYER->m_pMyVehicle == nil) pTargetEntity = PLAYER;
- }
+
+ if(PLAYER->GetPedState() == PED_ENTER_CAR && !cantOpen){
+ if(!enteringCar && CarZoomIndicator != CAM_ZOOM_1STPRS){
+ pTargetEntity = PLAYER->m_pMyVehicle;
+ if(PLAYER->m_pMyVehicle == nil)
+ pTargetEntity = PLAYER;
}
+ }
if((PLAYER->GetPedState() == PED_CARJACK || PLAYER->GetPedState() == PED_OPEN_DOOR) && !cantOpen){
if(!enteringCar && CarZoomIndicator != CAM_ZOOM_1STPRS)
diff --git a/src/core/FileLoader.cpp b/src/core/FileLoader.cpp
index 7724d919..22e0159c 100644
--- a/src/core/FileLoader.cpp
+++ b/src/core/FileLoader.cpp
@@ -1090,9 +1090,6 @@ CFileLoader::LoadObject(const char *line)
char model[24], txd[24];
float dist[3];
uint32 flags;
-#ifdef FIX_BUGS
- flags = 0;
-#endif
int damaged;
CSimpleModelInfo *mi;
@@ -1189,9 +1186,6 @@ CFileLoader::LoadTimeObject(const char *line)
char model[24], txd[24];
float dist[3];
uint32 flags;
-#ifdef FIX_BUGS
- flags = 0;
-#endif
int timeOn, timeOff;
int damaged;
CTimeModelInfo *mi, *other;
@@ -1796,9 +1790,6 @@ CFileLoader::ReloadObject(const char *line)
char model[24], txd[24];
float dist[3];
uint32 flags;
-#ifdef FIX_BUGS
- flags = 0;
-#endif
CSimpleModelInfo *mi;
if(sscanf(line, "%d %s %s %d", &id, model, txd, &numObjs) != 4)
diff --git a/src/core/Pools.cpp b/src/core/Pools.cpp
index 54055243..39cfb1d4 100644
--- a/src/core/Pools.cpp
+++ b/src/core/Pools.cpp
@@ -144,11 +144,8 @@ INITSAVEBUF
pVehicle = new(slot) CBoat(model, RANDOM_VEHICLE);
else if (type == VEHICLE_TYPE_CAR)
pVehicle = new(slot) CAutomobile(model, RANDOM_VEHICLE);
- else {
+ else
assert(0);
- debug("This shouldn't happen");
- return;
- }
--CCarCtrl::NumRandomCars;
pVehicle->Load(buf);
CWorld::Add(pVehicle);
@@ -521,11 +518,8 @@ INITSAVEBUF
if (pedtype == PEDTYPE_PLAYER1)
pPed = new(ref) CPlayerPed();
- else {
+ else
assert(0);
- debug("This shouldn't happen");
- return;
- }
pPed->Load(buf);
if (pedtype == PEDTYPE_PLAYER1) {
diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp
index 7f778498..4fd7f1a5 100644
--- a/src/core/Radar.cpp
+++ b/src/core/Radar.cpp
@@ -404,9 +404,6 @@ void CRadar::Draw3dMarkers()
case BLIP_CHAR:
{
CEntity *entity = CPools::GetPedPool()->GetAt(ms_RadarTrace[i].m_nEntityHandle);
-#ifdef FIX_BUGS
- if(!entity) break;
-#endif
if (entity != nil) {
if (((CPed*)entity)->InVehicle())
entity = ((CPed * )entity)->m_pMyVehicle;