Merge branch 'Lyberta/TeamplayOverhaul2' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / command / cmd.qc
index 1b398a8b21c2e27274bf66dfb9e86660b78b40df..915fea7ee0ca2ca02ffb14d9341d539b4b4a7d14 100644 (file)
@@ -121,7 +121,7 @@ void ClientCommand_clientversion(entity caller, int request, int argc)  // inter
                                        {
                                                // JoinBestTeam(caller, false, true);
                                        }
-                                       else if (teamplay && !autocvar_sv_spectate && !(caller.team_forced > 0))
+                                       else if (teamplay && !autocvar_sv_spectate && !(Player_GetForcedTeamIndex(caller) > 0))
                                        {
                                                TRANSMUTE(Observer, caller);  // really?
                                                stuffcmd(caller, "menu_showteamselect\n");
@@ -397,7 +397,7 @@ void ClientCommand_selectteam(entity caller, int request, int argc)
                                sprint(caller, "^7selectteam can only be used in teamgames\n");
                                return;
                        }
-                       if (caller.team_forced > 0)
+                       if (Player_GetForcedTeamIndex(caller) > 0)
                        {
                                sprint(caller, "^7selectteam can not be used as your team is forced\n");
                                return;