summaryrefslogtreecommitdiffstats
path: root/src/core/References.cpp
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2020-04-19 15:56:39 +0200
committerGitHub <noreply@github.com>2020-04-19 15:56:39 +0200
commit0f07a323c9a0a97429c551808a38249a6b8ad1ff (patch)
tree563add6e54b45ac77ab863815a8750afed24bb1e /src/core/References.cpp
parentMerge pull request #475 from erorcun/erorcun (diff)
parentmissing ifded (diff)
downloadre3-0f07a323c9a0a97429c551808a38249a6b8ad1ff.tar
re3-0f07a323c9a0a97429c551808a38249a6b8ad1ff.tar.gz
re3-0f07a323c9a0a97429c551808a38249a6b8ad1ff.tar.bz2
re3-0f07a323c9a0a97429c551808a38249a6b8ad1ff.tar.lz
re3-0f07a323c9a0a97429c551808a38249a6b8ad1ff.tar.xz
re3-0f07a323c9a0a97429c551808a38249a6b8ad1ff.tar.zst
re3-0f07a323c9a0a97429c551808a38249a6b8ad1ff.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