From: Lyberta Date: Thu, 1 Jun 2017 14:58:19 +0000 (+0300) Subject: Handling of failure of MoveToTeam. X-Git-Tag: xonotic-v0.8.5~2482^2~27 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7bfed84be708917605d7d70deb5d72763526bd43;p=xonotic%2Fxonotic-data.pk3dir.git Handling of failure of MoveToTeam. --- diff --git a/qcsrc/server/command/sv_cmd.qc b/qcsrc/server/command/sv_cmd.qc index c403e28f1..f309f1f39 100644 --- a/qcsrc/server/command/sv_cmd.qc +++ b/qcsrc/server/command/sv_cmd.qc @@ -1099,9 +1099,15 @@ void GameCommand_moveplayer(float request, float argc) // If so, lets continue and finally move the player client.team_forced = 0; - MoveToTeam(client, team_id, 6); - successful = strcat(successful, (successful ? ", " : ""), playername(client, false)); - LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", playername(client, false), ") has been moved to the ", Team_ColoredFullName(team_id), "^7.\n"); + if (MoveToTeam(client, team_id, 6)) + { + successful = strcat(successful, (successful ? ", " : ""), playername(client, false)); + LOG_INFO("Player ", ftos(GetFilteredNumber(t)), " (", playername(client, false), ") has been moved to the ", Team_ColoredFullName(team_id), "^7.\n"); + } + else + { + LOG_INFO("Unable to move player ", ftos(GetFilteredNumber(t)), " (", playername(client, false), ")"); + } continue; } else