summaryrefslogtreecommitdiff
path: root/src/core/PlayerInfo.cpp
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2020-04-19 16:56:39 +0300
committerGitHub <noreply@github.com>2020-04-19 16:56:39 +0300
commit0f07a323c9a0a97429c551808a38249a6b8ad1ff (patch)
tree563add6e54b45ac77ab863815a8750afed24bb1e /src/core/PlayerInfo.cpp
parentf9ed50e17813d2a6708a6516e18041c7482a7462 (diff)
parentbcc3a8b6c76ef5851af350ef4d839ef44d473f56 (diff)
Merge pull request #474 from Nick007J/master
Bug fixes, mostly replay; added RegisterReference for player ped pointer
Diffstat (limited to 'src/core/PlayerInfo.cpp')
-rw-r--r--src/core/PlayerInfo.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/PlayerInfo.cpp b/src/core/PlayerInfo.cpp
index 6209e5ab..69b8b7bf 100644
--- a/src/core/PlayerInfo.cpp
+++ b/src/core/PlayerInfo.cpp
@@ -41,6 +41,10 @@ CPlayerInfo::SetPlayerSkin(char *skin)
CVector&
CPlayerInfo::GetPos()
{
+#ifdef FIX_BUGS
+ if (!m_pPed)
+ return TheCamera.GetPosition();
+#endif
if (m_pPed->InVehicle())
return m_pPed->m_pMyVehicle->GetPosition();
return m_pPed->GetPosition();
@@ -342,6 +346,10 @@ CPlayerInfo::FindClosestCarSectorList(CPtrList& carList, CPed* ped, float unk1,
void
CPlayerInfo::Process(void)
{
+#ifdef FIX_BUGS
+ if (CReplay::IsPlayingBack())
+ return;
+#endif
// Unused taxi feature. Gives you a dollar for every second with a passenger. Can be toggled via 0x29A opcode.
bool startTaxiTimer = true;
if (m_bUnusedTaxiThing && m_pPed->bInVehicle) {