]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Handling of failure of MoveToTeam.
authorLyberta <lyberta@lyberta.net>
Thu, 1 Jun 2017 14:58:19 +0000 (17:58 +0300)
committerLyberta <lyberta@lyberta.net>
Thu, 1 Jun 2017 14:58:19 +0000 (17:58 +0300)
qcsrc/server/command/sv_cmd.qc

index c403e28f1b4263ed1e5f966e840a482956fdba79..f309f1f392e12813f8785eec4989955e13853f49 100644 (file)
@@ -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