Merge branch 'main' into mr-2

This commit is contained in:
d1str4ught
2025-12-20 00:19:49 +01:00
committed by GitHub
5 changed files with 30 additions and 25 deletions

View File

@@ -361,11 +361,9 @@ void CHARACTER::Initialize()
m_bIsLoadedAffect = false;
cannot_dead = false;
#ifdef FIX_BATTLE_INACTIVITY_TIMEOUT
// tw1x1: POS_FIGHTING timer fix
m_dwLastCombatTime = 0;
// tw1x1: end
#endif
#ifdef __PET_SYSTEM__
m_petSystem = 0;
@@ -4110,8 +4108,6 @@ void CHARACTER::UpdateStateMachine(DWORD dwPulse)
if (IsDead())
return;
#ifdef FIX_BATTLE_INACTIVITY_TIMEOUT
// tw1x1: POS_FIGHTING timer fix
if (IsPC() && IsPosition(POS_FIGHTING))
{
const DWORD now = get_dword_time();
@@ -4123,8 +4119,6 @@ void CHARACTER::UpdateStateMachine(DWORD dwPulse)
if (now - m_dwLastCombatTime >= 10000)
SetVictim(NULL); // triggers battle_end() -> POS_STANDING
}
// tw1x1: end
#endif
Update();
m_dwNextStatePulse = dwPulse + m_dwStateDuration;