MR-2: Auto-revert POS_FIGHTING after inactivity + Realtime character level updates

This commit is contained in:
Mind Rapist
2025-12-19 21:59:28 +02:00
parent 418afb19f4
commit 755b0e20a8
6 changed files with 122 additions and 43 deletions

View File

@@ -2044,6 +2044,18 @@ class CHARACTER : public CEntity, public CFSM, public CHorseRider
protected:
int m_iLastPMPulse;
int m_iPMCounter;
#ifdef FIX_BATTLE_INACTIVITY_TIMEOUT
// tw1x1: POS_FIGHTING timer fix
public:
void EnterCombat();
void UpdateLastCombatTime() { m_dwLastCombatTime = get_dword_time(); }
DWORD GetLastCombatTime() const { return m_dwLastCombatTime; }
private:
DWORD m_dwLastCombatTime;
// tw1x1: end
#endif
};
ESex GET_SEX(LPCHARACTER ch);