mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge pull request #7588 from ChillerDragon/pr_stop_demo_on_reset
Stop demo when gameworld is reset
This commit is contained in:
commit
64f4ea1512
|
@ -48,6 +48,7 @@ CCharacter::CCharacter(CGameWorld *pWorld, CNetObj_PlayerInput LastInput) :
|
||||||
|
|
||||||
void CCharacter::Reset()
|
void CCharacter::Reset()
|
||||||
{
|
{
|
||||||
|
StopRecording();
|
||||||
Destroy();
|
Destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -932,7 +933,7 @@ bool CCharacter::IncreaseArmor(int Amount)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCharacter::Die(int Killer, int Weapon, bool SendKillMsg)
|
void CCharacter::StopRecording()
|
||||||
{
|
{
|
||||||
if(Server()->IsRecording(m_pPlayer->GetCid()))
|
if(Server()->IsRecording(m_pPlayer->GetCid()))
|
||||||
{
|
{
|
||||||
|
@ -945,7 +946,11 @@ void CCharacter::Die(int Killer, int Weapon, bool SendKillMsg)
|
||||||
|
|
||||||
pData->m_RecordStopTick = -1;
|
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);
|
int ModeSpecial = GameServer()->m_pController->OnCharacterDeath(this, GameServer()->m_apPlayers[Killer], Weapon);
|
||||||
|
|
||||||
char aBuf[256];
|
char aBuf[256];
|
||||||
|
|
|
@ -194,6 +194,7 @@ public:
|
||||||
int Team();
|
int Team();
|
||||||
bool CanCollide(int ClientId);
|
bool CanCollide(int ClientId);
|
||||||
bool SameTeam(int ClientId);
|
bool SameTeam(int ClientId);
|
||||||
|
void StopRecording();
|
||||||
bool m_NinjaJetpack;
|
bool m_NinjaJetpack;
|
||||||
int m_TeamBeforeSuper;
|
int m_TeamBeforeSuper;
|
||||||
int m_FreezeTime;
|
int m_FreezeTime;
|
||||||
|
|
Loading…
Reference in a new issue