From 599164006a9e7eb7328fc194c9bae1acbb2c887d Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Fri, 17 Apr 2020 16:31:11 +0300 Subject: Remove patches --- src/core/PlayerInfo.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'src/core/PlayerInfo.cpp') diff --git a/src/core/PlayerInfo.cpp b/src/core/PlayerInfo.cpp index 0043c2f4..cfa0cea4 100644 --- a/src/core/PlayerInfo.cpp +++ b/src/core/PlayerInfo.cpp @@ -1,5 +1,5 @@ #include "common.h" -#include "patcher.h" + #include "main.h" #include "PlayerPed.h" #include "Wanted.h" @@ -558,20 +558,3 @@ CPlayerInfo::Process(void) CStats::DistanceTravelledOnFoot += FindPlayerPed()->m_fDistanceTravelled; } } - -STARTPATCHES - InjectHook(0x4B5DC0, &CPlayerInfo::dtor, PATCH_JUMP); - InjectHook(0x4A1700, &CPlayerInfo::LoadPlayerSkin, PATCH_JUMP); - InjectHook(0x4A1750, &CPlayerInfo::DeletePlayerSkin, PATCH_JUMP); - InjectHook(0x4A12E0, &CPlayerInfo::KillPlayer, PATCH_JUMP); - InjectHook(0x4A1330, &CPlayerInfo::ArrestPlayer, PATCH_JUMP); - InjectHook(0x49FC10, &CPlayerInfo::Clear, PATCH_JUMP); - InjectHook(0x4A15C0, &CPlayerInfo::BlowUpRCBuggy, PATCH_JUMP); - InjectHook(0x4A13B0, &CPlayerInfo::CancelPlayerEnteringCars, PATCH_JUMP); - InjectHook(0x4A1400, &CPlayerInfo::MakePlayerSafe, PATCH_JUMP); - InjectHook(0x4A0EC0, &CPlayerInfo::EvaluateCarPosition, PATCH_JUMP); - InjectHook(0x4A15F0, &CPlayerInfo::AwardMoneyForExplosion, PATCH_JUMP); - InjectHook(0x4A0B20, &CPlayerInfo::LoadPlayerInfo, PATCH_JUMP); - InjectHook(0x4A0960, &CPlayerInfo::SavePlayerInfo, PATCH_JUMP); - InjectHook(0x49FD30, &CPlayerInfo::Process, PATCH_JUMP); -ENDPATCHES -- cgit v1.2.3 From 63951d9b957b30a110f42a03edb4833cbbaf380e Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Fri, 17 Apr 2020 19:30:57 +0200 Subject: Part one --- src/core/PlayerInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/PlayerInfo.cpp') diff --git a/src/core/PlayerInfo.cpp b/src/core/PlayerInfo.cpp index cfa0cea4..3852f540 100644 --- a/src/core/PlayerInfo.cpp +++ b/src/core/PlayerInfo.cpp @@ -180,7 +180,7 @@ CPlayerInfo::MakePlayerSafe(bool toggle) m_pPed->bExplosionProof = true; m_pPed->m_bCanBeDamaged = false; ((CPlayerPed*)m_pPed)->ClearAdrenaline(); - CancelPlayerEnteringCars(false); + CancelPlayerEnteringCars(nil); gFireManager.ExtinguishPoint(GetPos(), 4000.0f); CExplosion::RemoveAllExplosionsInArea(GetPos(), 4000.0f); CProjectileInfo::RemoveAllProjectiles(); -- cgit v1.2.3 From d6314f9564912393134d832b8cc268dd3dbfcbaa Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Sat, 18 Apr 2020 12:29:28 +0200 Subject: Revert "Part one" This reverts commit 63951d9b957b30a110f42a03edb4833cbbaf380e. --- src/core/PlayerInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/PlayerInfo.cpp') diff --git a/src/core/PlayerInfo.cpp b/src/core/PlayerInfo.cpp index 3852f540..cfa0cea4 100644 --- a/src/core/PlayerInfo.cpp +++ b/src/core/PlayerInfo.cpp @@ -180,7 +180,7 @@ CPlayerInfo::MakePlayerSafe(bool toggle) m_pPed->bExplosionProof = true; m_pPed->m_bCanBeDamaged = false; ((CPlayerPed*)m_pPed)->ClearAdrenaline(); - CancelPlayerEnteringCars(nil); + CancelPlayerEnteringCars(false); gFireManager.ExtinguishPoint(GetPos(), 4000.0f); CExplosion::RemoveAllExplosionsInArea(GetPos(), 4000.0f); CProjectileInfo::RemoveAllProjectiles(); -- cgit v1.2.3 From c4cd45d47c01d89bab28f196f03ed9cb1978005b Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sat, 18 Apr 2020 23:50:37 +0300 Subject: replays bug fix --- src/core/PlayerInfo.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/core/PlayerInfo.cpp') diff --git a/src/core/PlayerInfo.cpp b/src/core/PlayerInfo.cpp index cfa0cea4..1c641be3 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) { -- cgit v1.2.3 From 1ffc37735ed247eef1f20997a0136ef8d866ebad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Sun, 19 Apr 2020 07:14:13 +0300 Subject: Struct cleanup, various fixes, enable PS2 rand --- src/core/PlayerInfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/core/PlayerInfo.cpp') diff --git a/src/core/PlayerInfo.cpp b/src/core/PlayerInfo.cpp index cfa0cea4..6209e5ab 100644 --- a/src/core/PlayerInfo.cpp +++ b/src/core/PlayerInfo.cpp @@ -548,10 +548,10 @@ CPlayerInfo::Process(void) } if (FindPlayerVehicle()) { CVehicle *veh = FindPlayerVehicle(); - veh->m_nZoneLevel = -1; + veh->m_nZoneLevel = LEVEL_IGNORE; for (int i = 0; i < ARRAY_SIZE(veh->pPassengers); i++) { if (veh->pPassengers[i]) - veh->pPassengers[i]->m_nZoneLevel = 0; + veh->pPassengers[i]->m_nZoneLevel = LEVEL_NONE; } CStats::DistanceTravelledInVehicle += veh->m_fDistanceTravelled; } else { -- cgit v1.2.3 From 370c4e48cd87122e8d38f1a72f6b8f62ff7b9c96 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Sun, 19 Apr 2020 18:34:08 +0200 Subject: Try to build with mingw --- src/core/PlayerInfo.cpp | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'src/core/PlayerInfo.cpp') diff --git a/src/core/PlayerInfo.cpp b/src/core/PlayerInfo.cpp index 69b8b7bf..e92f7568 100644 --- a/src/core/PlayerInfo.cpp +++ b/src/core/PlayerInfo.cpp @@ -1,35 +1,35 @@ #include "common.h" -#include "main.h" -#include "PlayerPed.h" -#include "Wanted.h" -#include "PlayerInfo.h" +#include "Automobile.h" +#include "Bridge.h" +#include "Camera.h" +#include "Cranes.h" +#include "Darkel.h" +#include "Explosion.h" #include "Fire.h" #include "Frontend.h" -#include "PlayerSkin.h" -#include "Darkel.h" +#include "General.h" +#include "HandlingMgr.h" #include "Messages.h" -#include "Text.h" -#include "Stats.h" -#include "Remote.h" -#include "World.h" -#include "Replay.h" -#include "Camera.h" #include "Pad.h" +#include "PathFind.h" +#include "PlayerInfo.h" +#include "PlayerPed.h" +#include "PlayerSkin.h" #include "ProjectileInfo.h" -#include "Explosion.h" +#include "Remote.h" +#include "Renderer.h" +#include "Replay.h" #include "Script.h" -#include "Automobile.h" -#include "HandlingMgr.h" -#include "General.h" #include "SpecialFX.h" -#include "Cranes.h" -#include "Bridge.h" +#include "Stats.h" +#include "Streaming.h" +#include "Text.h" +#include "Wanted.h" #include "WaterLevel.h" -#include "PathFind.h" +#include "World.h" #include "ZoneCull.h" -#include "Renderer.h" -#include "Streaming.h" +#include "main.h" void CPlayerInfo::SetPlayerSkin(char *skin) @@ -184,7 +184,7 @@ CPlayerInfo::MakePlayerSafe(bool toggle) m_pPed->bExplosionProof = true; m_pPed->m_bCanBeDamaged = false; ((CPlayerPed*)m_pPed)->ClearAdrenaline(); - CancelPlayerEnteringCars(false); + CancelPlayerEnteringCars(nil); gFireManager.ExtinguishPoint(GetPos(), 4000.0f); CExplosion::RemoveAllExplosionsInArea(GetPos(), 4000.0f); CProjectileInfo::RemoveAllProjectiles(); -- cgit v1.2.3