diff options
author | Filip Gawin <filip.gawin@zoho.com> | 2021-01-31 20:44:39 +0100 |
---|---|---|
committer | Filip Gawin <filip.gawin@zoho.com> | 2021-01-31 20:44:39 +0100 |
commit | 7a3b80a9b7f414967fe59f89ab0fe5416735babe (patch) | |
tree | a84fb5e1dbdb00959d6916594d43b9c82c9bef23 /src/core/Camera.cpp | |
parent | fix realloc (diff) | |
download | re3-7a3b80a9b7f414967fe59f89ab0fe5416735babe.tar re3-7a3b80a9b7f414967fe59f89ab0fe5416735babe.tar.gz re3-7a3b80a9b7f414967fe59f89ab0fe5416735babe.tar.bz2 re3-7a3b80a9b7f414967fe59f89ab0fe5416735babe.tar.lz re3-7a3b80a9b7f414967fe59f89ab0fe5416735babe.tar.xz re3-7a3b80a9b7f414967fe59f89ab0fe5416735babe.tar.zst re3-7a3b80a9b7f414967fe59f89ab0fe5416735babe.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/Camera.cpp | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp index 2ce4e754..712e9d09 100644 --- a/src/core/Camera.cpp +++ b/src/core/Camera.cpp @@ -1699,10 +1699,12 @@ 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) && 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) && +#ifdef FIX_BUGS + pTargetEntity && +#endif + pTargetEntity->IsPed()) || Cams[ActiveCam].Mode == CCam::MODE_FLYBY) FindPlayerPed()->bIsVisible = false; else @@ -1754,14 +1756,15 @@ CCamera::UpdateTargetEntity(void) PLAYER->m_pMyVehicle && PLAYER->m_pMyVehicle->CanPedOpenLocks(PLAYER)) cantOpen = false; - - if(PLAYER->GetPedState() == PED_ENTER_CAR && !cantOpen){ - if(!enteringCar && CarZoomIndicator != CAM_ZOOM_1STPRS){ - pTargetEntity = PLAYER->m_pMyVehicle; - if(PLAYER->m_pMyVehicle == nil) - pTargetEntity = PLAYER; +#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_CARJACK || PLAYER->GetPedState() == PED_OPEN_DOOR) && !cantOpen){ if(!enteringCar && CarZoomIndicator != CAM_ZOOM_1STPRS) |