summaryrefslogtreecommitdiffstats
path: root/src/core/References.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/References.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/References.cpp')
-rw-r--r--src/core/References.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/References.cpp b/src/core/References.cpp
index 3eb2eaf3..52abbc3e 100644
--- a/src/core/References.cpp
+++ b/src/core/References.cpp
@@ -26,8 +26,17 @@ CReferences::RemoveReferencesToPlayer(void)
{
if(FindPlayerVehicle())
FindPlayerVehicle()->ResolveReferences();
+#ifdef FIX_BUGS
+ if (FindPlayerPed()) {
+ CPlayerPed* pPlayerPed = FindPlayerPed();
+ FindPlayerPed()->ResolveReferences();
+ CWorld::Players[CWorld::PlayerInFocus].m_pPed = pPlayerPed;
+ pPlayerPed->RegisterReference((CEntity**)&CWorld::Players[CWorld::PlayerInFocus].m_pPed);
+ }
+#else
if(FindPlayerPed())
FindPlayerPed()->ResolveReferences();
+#endif
}
void