Skip to content

Commit 4d7b193

Browse files
committed
Revert changes from pull request #3930
1 parent 5b9ce93 commit 4d7b193

File tree

5 files changed

+2
-53
lines changed

5 files changed

+2
-53
lines changed

Client/game_sa/CFireSA.cpp

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@
1414
#include "CFireSA.h"
1515
#include "CGameSA.h"
1616
#include "CPoolsSA.h"
17-
#include <game/CTaskManager.h>
18-
#include <game/TaskTypes.h>
1917

2018
extern CGameSA* pGame;
2119

@@ -211,49 +209,3 @@ void CFireSA::SetNumGenerationsAllowed(char generations)
211209
{
212210
internalInterface->nNumGenerationsAllowed = generations;
213211
}
214-
215-
////////////////////////////////////////////////////////////////////////
216-
// CFire::Extinguish
217-
//
218-
// Fix GH #3249 (PLAYER_ON_FIRE task is not aborted after the fire is extinguished)
219-
////////////////////////////////////////////////////////////////////////
220-
static void AbortFireTask(CEntitySAInterface* entityOnFire, DWORD returnAddress)
221-
{
222-
// We can't and shouldn't remove the task if we're in CTaskSimplePlayerOnFire::ProcessPed. Otherwise we will crash.
223-
if (returnAddress == 0x633783)
224-
return;
225-
226-
auto ped = pGame->GetPools()->GetPed(reinterpret_cast<DWORD*>(entityOnFire));
227-
if (!ped || !ped->pEntity)
228-
return;
229-
230-
CTaskManager* taskManager = ped->pEntity->GetPedIntelligence()->GetTaskManager();
231-
if (!taskManager)
232-
return;
233-
234-
taskManager->RemoveTaskSecondary(TASK_SECONDARY_PARTIAL_ANIM, TASK_SIMPLE_PLAYER_ON_FIRE);
235-
}
236-
237-
#define HOOKPOS_CFire_Extinguish 0x539429
238-
#define HOOKSIZE_CFire_Extinguish 6
239-
static constexpr std::uintptr_t CONTINUE_CFire_Extinguish = 0x53942F;
240-
static void _declspec(naked) HOOK_CFire_Extinguish()
241-
{
242-
_asm
243-
{
244-
mov [eax+730h], edi
245-
mov ebx, [esp+8]
246-
247-
push ebx
248-
push eax
249-
call AbortFireTask
250-
add esp, 8
251-
252-
jmp CONTINUE_CFire_Extinguish
253-
}
254-
}
255-
256-
void CFireSA::StaticSetHooks()
257-
{
258-
EZHookInstall(CFire_Extinguish);
259-
}

Client/game_sa/CFireSA.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,4 @@ class CFireSA : public CFire
6464
void SetStrength(float fStrength);
6565
void SetNumGenerationsAllowed(char generations);
6666
CFireSAInterface* GetInterface() { return internalInterface; }
67-
68-
static void StaticSetHooks();
6967
};

Client/game_sa/CGameSA.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ CGameSA::CGameSA()
246246
CVehicleSA::StaticSetHooks();
247247
CCheckpointSA::StaticSetHooks();
248248
CHudSA::StaticSetHooks();
249-
CFireSA::StaticSetHooks();
250249
CPtrNodeSingleLinkPoolSA::StaticSetHooks();
251250
}
252251
catch (const std::bad_alloc& e)

Client/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2558,7 +2558,7 @@ bool CStaticFunctionDefinitions::SetPedAimTarget(CClientEntity& Entity, CVector&
25582558
bool CStaticFunctionDefinitions::SetPedStat(CClientEntity& Entity, ushort usStat, float fValue)
25592559
{
25602560
RUN_CHILDREN(SetPedStat(**iter, usStat, fValue))
2561-
if (IS_PED(&Entity) && Entity.IsLocalEntity())
2561+
if (IS_PED(&Entity))
25622562
{
25632563
CClientPed& Ped = static_cast<CClientPed&>(Entity);
25642564
// Dont let them set visual stats if they don't have the CJ model

Client/mods/deathmatch/logic/luadefs/CLuaElementDefs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2520,7 +2520,7 @@ bool CLuaElementDefs::SetLowLodElement(lua_State* luaVM, CClientEntity* pEntity,
25202520

25212521
bool CLuaElementDefs::SetElementOnFire(CClientEntity* entity, bool onFire) noexcept
25222522
{
2523-
if (!entity->IsLocalEntity() && entity != CStaticFunctionDefinitions::GetLocalPlayer())
2523+
if (!entity->IsLocalEntity())
25242524
return false;
25252525

25262526
return entity->SetOnFire(onFire);

0 commit comments

Comments
 (0)