mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Remove projectiles on team change
This commit is contained in:
parent
c7192d703e
commit
877ab41dd7
|
@ -150,6 +150,11 @@ void CGameWorld::Reset()
|
|||
GameServer()->CreateAllEntities(false);
|
||||
}
|
||||
|
||||
void CGameWorld::RemoveEntitiesFromPlayer(int PlayerId)
|
||||
{
|
||||
RemoveEntitiesFromPlayers(&PlayerId, 1);
|
||||
}
|
||||
|
||||
void CGameWorld::RemoveEntitiesFromPlayers(int PlayerIds[], int NumPlayers)
|
||||
{
|
||||
for(auto *pEnt : m_apFirstEntityTypes)
|
||||
|
|
|
@ -121,6 +121,7 @@ public:
|
|||
*/
|
||||
void RemoveEntity(CEntity *pEntity);
|
||||
|
||||
void RemoveEntitiesFromPlayer(int PlayerId);
|
||||
void RemoveEntitiesFromPlayers(int PlayerIds[], int NumPlayers);
|
||||
|
||||
/*
|
||||
|
|
|
@ -413,6 +413,7 @@ void CGameTeams::SetForceCharacterTeam(int ClientID, int Team)
|
|||
GetPlayer(ClientID)->m_VotedForPractice = false;
|
||||
GetPlayer(ClientID)->m_SwapTargetsClientID = -1;
|
||||
}
|
||||
m_pGameContext->m_World.RemoveEntitiesFromPlayer(ClientID);
|
||||
}
|
||||
|
||||
if(Team != TEAM_SUPER && (m_aTeamState[Team] == TEAMSTATE_EMPTY || m_aTeamLocked[Team]))
|
||||
|
|
Loading…
Reference in a new issue