d38c50c...f202506

commit f20250657eda223fddacf812a477727b1a2b507b
Author: Joonas Rikkonen <poe.regalis@gmail.com>
Date:   Wed Mar 20 16:50:39 2019 +0200

    Ending a campaign round by talking to watchman doesn't require any special permissions. Closes #1313
This commit is contained in:
Joonas Rikkonen
2019-03-20 16:51:22 +02:00
parent a8309b5766
commit e8025cc66e
3 changed files with 36 additions and 9 deletions
@@ -995,7 +995,17 @@ namespace Barotrauma.Networking
return;
}
if (!sender.HasPermission(command))
//clients are allowed to end the round by talking with the watchman in multiplayer
//campaign even if they don't have the special permission
if (command == ClientPermissions.ManageRound && inc.PeekBoolean() &&
GameMain.GameSession?.GameMode is MultiPlayerCampaign mpCampaign)
{
if (!mpCampaign.AllowedToEndRound(sender.Character))
{
return;
}
}
else if (!sender.HasPermission(command))
{
Log("Client \"" + sender.Name + "\" sent a server command \"" + command + "\". Permission denied.", ServerLog.MessageType.ServerMessage);
return;