diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index 7f8b5e029..4d72e6638 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -48,6 +48,7 @@ CCharacter::CCharacter(CGameWorld *pWorld, CNetObj_PlayerInput LastInput) : void CCharacter::Reset() { + StopRecording(); Destroy(); } @@ -932,7 +933,7 @@ bool CCharacter::IncreaseArmor(int Amount) return true; } -void CCharacter::Die(int Killer, int Weapon, bool SendKillMsg) +void CCharacter::StopRecording() { if(Server()->IsRecording(m_pPlayer->GetCid())) { @@ -945,7 +946,11 @@ void CCharacter::Die(int Killer, int Weapon, bool SendKillMsg) pData->m_RecordStopTick = -1; } +} +void CCharacter::Die(int Killer, int Weapon, bool SendKillMsg) +{ + StopRecording(); int ModeSpecial = GameServer()->m_pController->OnCharacterDeath(this, GameServer()->m_apPlayers[Killer], Weapon); char aBuf[256]; diff --git a/src/game/server/entities/character.h b/src/game/server/entities/character.h index e9ff63dad..a2263d3dc 100644 --- a/src/game/server/entities/character.h +++ b/src/game/server/entities/character.h @@ -194,6 +194,7 @@ public: int Team(); bool CanCollide(int ClientId); bool SameTeam(int ClientId); + void StopRecording(); bool m_NinjaJetpack; int m_TeamBeforeSuper; int m_FreezeTime;