mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Send switch state of team 0 if character is not alive
This commit is contained in:
parent
b75c5b015f
commit
ae7e6c05f0
|
@ -629,9 +629,9 @@ void IGameController::Snap(int SnappingClient)
|
|||
pRaceData->m_RaceFlags = protocol7::RACEFLAG_HIDE_KILLMSG | protocol7::RACEFLAG_KEEP_WANTED_WEAPON;
|
||||
}
|
||||
|
||||
if(GameServer()->Collision()->m_pSwitchers && pPlayer && pPlayer->GetCharacter())
|
||||
if(GameServer()->Collision()->m_pSwitchers)
|
||||
{
|
||||
int Team = pPlayer->GetCharacter()->Team();
|
||||
int Team = pPlayer && pPlayer->GetCharacter() ? pPlayer->GetCharacter()->Team() : 0;
|
||||
CNetObj_SwitchState *pSwitchState = static_cast<CNetObj_SwitchState *>(Server()->SnapNewItem(NETOBJTYPE_SWITCHSTATE, Team, sizeof(CNetObj_SwitchState)));
|
||||
if(!pSwitchState)
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue