Allow kicking dead players
This commit is contained in:
committed by
Matthias Mailänder
parent
c4bd9fb7aa
commit
bf00577d33
@@ -48,6 +48,9 @@ namespace OpenRA.Mods.Common.Server
|
||||
[TranslationReference]
|
||||
const string KickNone = "notification-kick-none";
|
||||
|
||||
[TranslationReference]
|
||||
const string NoKickSelf = "notification-kick-self";
|
||||
|
||||
[TranslationReference]
|
||||
const string NoKickGameStarted = "notification-no-kick-game-started";
|
||||
|
||||
@@ -794,7 +797,13 @@ namespace OpenRA.Mods.Common.Server
|
||||
}
|
||||
|
||||
var kickClient = server.GetClient(kickConn);
|
||||
if (server.State == ServerState.GameStarted && !kickClient.IsObserver)
|
||||
if (client == kickClient)
|
||||
{
|
||||
server.SendLocalizedMessageTo(conn, NoKickSelf);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!server.CanKickClient(kickClient))
|
||||
{
|
||||
server.SendLocalizedMessageTo(conn, NoKickGameStarted);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user