summaryrefslogtreecommitdiffstats
path: root/src/core/PlayerInfo.cpp
diff options
context:
space:
mode:
authorFire-Head <Fire-Head@users.noreply.github.com>2019-08-02 22:23:05 +0200
committerFire-Head <Fire-Head@users.noreply.github.com>2019-08-02 22:23:05 +0200
commit73e2a4b035e19ace0ad5c55c58a15ee1d8265fee (patch)
treeeafd98b48c650c84139804ca89259ae61e00e3ea /src/core/PlayerInfo.cpp
parentfix (diff)
parentrestore original shadows fading (diff)
downloadre3-73e2a4b035e19ace0ad5c55c58a15ee1d8265fee.tar
re3-73e2a4b035e19ace0ad5c55c58a15ee1d8265fee.tar.gz
re3-73e2a4b035e19ace0ad5c55c58a15ee1d8265fee.tar.bz2
re3-73e2a4b035e19ace0ad5c55c58a15ee1d8265fee.tar.lz
re3-73e2a4b035e19ace0ad5c55c58a15ee1d8265fee.tar.xz
re3-73e2a4b035e19ace0ad5c55c58a15ee1d8265fee.tar.zst
re3-73e2a4b035e19ace0ad5c55c58a15ee1d8265fee.zip
Diffstat (limited to 'src/core/PlayerInfo.cpp')
-rw-r--r--src/core/PlayerInfo.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/PlayerInfo.cpp b/src/core/PlayerInfo.cpp
index 81c7a199..d9a4c0b0 100644
--- a/src/core/PlayerInfo.cpp
+++ b/src/core/PlayerInfo.cpp
@@ -1,7 +1,9 @@
#include "common.h"
#include "patcher.h"
+#include "PlayerPed.h"
#include "PlayerInfo.h"
#include "Frontend.h"
+#include "Vehicle.h"
WRAPPER void CPlayerInfo::MakePlayerSafe(bool) { EAXJMP(0x4A1400); }
WRAPPER void CPlayerInfo::LoadPlayerSkin() { EAXJMP(0x4A1700); }
@@ -12,3 +14,10 @@ void CPlayerInfo::SetPlayerSkin(char *skin)
strncpy(m_aSkinName, skin, 32);
LoadPlayerSkin();
}
+
+CVector& CPlayerInfo::GetPos()
+{
+ if (m_pPed->bInVehicle && m_pPed->m_pMyVehicle)
+ return m_pPed->m_pMyVehicle->GetPosition();
+ return m_pPed->GetPosition();
+}