]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/command/cmd.qc
CTF: rename an entity field; remove some redundant code
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / cmd.qc
index bc5d560a3f398d8d424be49ad3f5763adc9ad6eb..ea9610b16073048fc10fd73ac97a09e1147c8065 100644 (file)
@@ -159,8 +159,8 @@ void ClientCommand_mv_getpicture(entity caller, float request, float argc)  // i
        }
 }
 
-bool spawnAllowed(entity this);
-void JoinOrShowTeamSelection(entity this);
+bool joinAllowed(entity this);
+void Join(entity this);
 void ClientCommand_join(entity caller, float request)
 {
        switch (request)
@@ -169,8 +169,8 @@ void ClientCommand_join(entity caller, float request)
                {
                        if (!gameover)
                        if (IS_CLIENT(caller) && !IS_PLAYER(caller))
-                       if (spawnAllowed(caller))
-                               JoinOrShowTeamSelection(caller);
+                       if (joinAllowed(caller))
+                               Join(caller);
 
                        return;  // never fall through to usage
                }
@@ -477,9 +477,11 @@ void ClientCommand_spectate(entity caller, float request)
 
                                if (mutator_returnvalue == MUT_SPECCMD_RETURN) return;
 
-                               if ((IS_PLAYER(caller) || mutator_returnvalue == MUT_SPECCMD_FORCE) && autocvar_sv_spectate == 1) ClientKill_TeamChange(caller, -2); // observe
+                               if ((IS_PLAYER(caller) || mutator_returnvalue == MUT_SPECCMD_FORCE))
+                               if (autocvar_sv_spectate == 1)
+                                       ClientKill_TeamChange(caller, -2); // observe
                        }
-                       return;                                                                                                                        // never fall through to usage
+                       return; // never fall through to usage
                }
 
                default: