mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge pull request #7474 from ChillerDragon/pr_mod_crash
Fix crash in mod controller
This commit is contained in:
commit
ccd767aea4
|
@ -731,8 +731,10 @@ int IGameController::ClampTeam(int Team)
|
|||
|
||||
CClientMask IGameController::GetMaskForPlayerWorldEvent(int Asker, int ExceptID)
|
||||
{
|
||||
// Send all world events to everyone by default
|
||||
return CClientMask().set().reset(ExceptID);
|
||||
if(Asker == -1)
|
||||
return CClientMask().set().reset(ExceptID);
|
||||
|
||||
return Teams().TeamMask(GameServer()->GetDDRaceTeam(Asker), ExceptID, Asker);
|
||||
}
|
||||
|
||||
void IGameController::InitTeleporter()
|
||||
|
|
|
@ -146,7 +146,7 @@ public:
|
|||
virtual bool CanJoinTeam(int Team, int NotThisID);
|
||||
int ClampTeam(int Team);
|
||||
|
||||
virtual CClientMask GetMaskForPlayerWorldEvent(int Asker, int ExceptID = -1);
|
||||
CClientMask GetMaskForPlayerWorldEvent(int Asker, int ExceptID = -1);
|
||||
virtual void InitTeleporter();
|
||||
|
||||
// DDRace
|
||||
|
|
|
@ -200,11 +200,3 @@ void CGameControllerDDRace::DoTeamChange(class CPlayer *pPlayer, int Team, bool
|
|||
|
||||
IGameController::DoTeamChange(pPlayer, Team, DoChatMsg);
|
||||
}
|
||||
|
||||
CClientMask CGameControllerDDRace::GetMaskForPlayerWorldEvent(int Asker, int ExceptID)
|
||||
{
|
||||
if(Asker == -1)
|
||||
return CClientMask().set().reset(ExceptID);
|
||||
|
||||
return Teams().TeamMask(GameServer()->GetDDRaceTeam(Asker), ExceptID, Asker);
|
||||
}
|
||||
|
|
|
@ -24,8 +24,6 @@ public:
|
|||
|
||||
void DoTeamChange(class CPlayer *pPlayer, int Team, bool DoChatMsg = true) override;
|
||||
|
||||
CClientMask GetMaskForPlayerWorldEvent(int Asker, int ExceptID = -1) override;
|
||||
|
||||
std::shared_ptr<CScoreLoadBestTimeResult> m_pLoadBestTimeResult;
|
||||
};
|
||||
#endif // GAME_SERVER_GAMEMODES_DDRACE_H
|
||||
|
|
Loading…
Reference in a new issue