summaryrefslogtreecommitdiffstats
path: root/src/core/World.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-04-18 22:50:37 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-04-18 22:50:37 +0200
commitc4cd45d47c01d89bab28f196f03ed9cb1978005b (patch)
treeadfdb08e894945432bcfe0f84883fb3219fd2a72 /src/core/World.cpp
parentChanged extraOffset value. (diff)
downloadre3-c4cd45d47c01d89bab28f196f03ed9cb1978005b.tar
re3-c4cd45d47c01d89bab28f196f03ed9cb1978005b.tar.gz
re3-c4cd45d47c01d89bab28f196f03ed9cb1978005b.tar.bz2
re3-c4cd45d47c01d89bab28f196f03ed9cb1978005b.tar.lz
re3-c4cd45d47c01d89bab28f196f03ed9cb1978005b.tar.xz
re3-c4cd45d47c01d89bab28f196f03ed9cb1978005b.tar.zst
re3-c4cd45d47c01d89bab28f196f03ed9cb1978005b.zip
Diffstat (limited to 'src/core/World.cpp')
-rw-r--r--src/core/World.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/World.cpp b/src/core/World.cpp
index eacb3404..7ef43593 100644
--- a/src/core/World.cpp
+++ b/src/core/World.cpp
@@ -1386,6 +1386,10 @@ FindPlayerEntity(void)
CVector
FindPlayerCoors(void)
{
+#ifdef FIX_BUGS
+ if (CReplay::IsPlayingBack())
+ return TheCamera.GetPosition();
+#endif
CPlayerPed *ped = FindPlayerPed();
if(ped->InVehicle())
return ped->m_pMyVehicle->GetPosition();
@@ -1396,6 +1400,11 @@ FindPlayerCoors(void)
CVector &
FindPlayerSpeed(void)
{
+#ifdef FIX_BUGS
+ static CVector vecTmpVector(0.0f, 0.0f, 0.0f);
+ if (CReplay::IsPlayingBack())
+ return vecTmpVector;
+#endif
CPlayerPed *ped = FindPlayerPed();
if(ped->InVehicle())
return ped->m_pMyVehicle->m_vecMoveSpeed;
@@ -1406,6 +1415,9 @@ FindPlayerSpeed(void)
CVector &
FindPlayerCentreOfWorld(int32 player)
{
+#ifdef FIX_BUGS
+ if(CReplay::IsPlayingBack()) return TheCamera.GetPosition();
+#endif
if(CCarCtrl::bCarsGeneratedAroundCamera) return TheCamera.GetPosition();
if(CWorld::Players[player].m_pRemoteVehicle) return CWorld::Players[player].m_pRemoteVehicle->GetPosition();
if(FindPlayerVehicle()) return FindPlayerVehicle()->GetPosition();
@@ -1415,6 +1427,9 @@ FindPlayerCentreOfWorld(int32 player)
CVector &
FindPlayerCentreOfWorld_NoSniperShift(void)
{
+#ifdef FIX_BUGS
+ if (CReplay::IsPlayingBack()) return TheCamera.GetPosition();
+#endif
if(CCarCtrl::bCarsGeneratedAroundCamera) return TheCamera.GetPosition();
if(CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle)
return CWorld::Players[CWorld::PlayerInFocus].m_pRemoteVehicle->GetPosition();