diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2019-10-06 13:26:50 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2019-10-06 13:26:50 +0200 |
commit | e10f5ee6a3f94a5ff2559f868c884e47d4628271 (patch) | |
tree | 3b2a2ceafc26e4215b49bf56e75cf80568251f26 /src/core/PlayerInfo.cpp | |
parent | car AI (diff) | |
parent | Fixed player blip heading when looking left/right/behind (diff) | |
download | re3-e10f5ee6a3f94a5ff2559f868c884e47d4628271.tar re3-e10f5ee6a3f94a5ff2559f868c884e47d4628271.tar.gz re3-e10f5ee6a3f94a5ff2559f868c884e47d4628271.tar.bz2 re3-e10f5ee6a3f94a5ff2559f868c884e47d4628271.tar.lz re3-e10f5ee6a3f94a5ff2559f868c884e47d4628271.tar.xz re3-e10f5ee6a3f94a5ff2559f868c884e47d4628271.tar.zst re3-e10f5ee6a3f94a5ff2559f868c884e47d4628271.zip |
Diffstat (limited to 'src/core/PlayerInfo.cpp')
-rw-r--r-- | src/core/PlayerInfo.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/core/PlayerInfo.cpp b/src/core/PlayerInfo.cpp index 8c505eb4..dc72848d 100644 --- a/src/core/PlayerInfo.cpp +++ b/src/core/PlayerInfo.cpp @@ -4,9 +4,9 @@ #include "PlayerInfo.h" #include "Frontend.h" #include "Vehicle.h" +#include "PlayerSkin.h" WRAPPER void CPlayerInfo::MakePlayerSafe(bool) { EAXJMP(0x4A1400); } -WRAPPER void CPlayerInfo::LoadPlayerSkin() { EAXJMP(0x4A1700); } WRAPPER void CPlayerInfo::AwardMoneyForExplosion(CVehicle *vehicle) { EAXJMP(0x4A15F0); } WRAPPER void CPlayerInfo::Process(void) { EAXJMP(0x49FD30); } @@ -22,3 +22,25 @@ CVector& CPlayerInfo::GetPos() return m_pPed->m_pMyVehicle->GetPosition(); return m_pPed->GetPosition(); } + +void CPlayerInfo::LoadPlayerSkin() +{
+ DeletePlayerSkin();
+
+ m_pSkinTexture = CPlayerSkin::GetSkinTexture(m_aSkinName);
+ if (!m_pSkinTexture)
+ m_pSkinTexture = CPlayerSkin::GetSkinTexture(DEFAULT_SKIN_NAME); +} + +void CPlayerInfo::DeletePlayerSkin() +{
+ if (m_pSkinTexture) {
+ RwTextureDestroy(m_pSkinTexture);
+ m_pSkinTexture = NULL;
+ } +} + +STARTPATCHES +InjectHook(0x4A1700, &CPlayerInfo::LoadPlayerSkin, PATCH_JUMP); +InjectHook(0x4A1750, &CPlayerInfo::DeletePlayerSkin, PATCH_JUMP); +ENDPATCHES |