From 0fa5957c13f9c763a2ec12f96501f601004816cb Mon Sep 17 00:00:00 2001 From: flowtron Date: Wed, 6 Oct 2010 21:11:34 +0000 Subject: [PATCH] avoid playerstate confusion in local non-coop mode and switching team in editmode (found by SKB) git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5721 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/clientgame.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index f21bb736..c91f7f87 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -188,7 +188,8 @@ void newteam(char *name) if(nt == player1->team) return; // same team if(!team_isvalid(nt)) { conoutf(_("%c3\"%s\" is not a valid team name (try CLA, RVSF or SPECTATOR)"), CC, name); return; } if(team_isspect(nt) && player1->state != CS_DEAD) { conoutf(_("you need to be dead to become spectator")); return; } - addmsg(SV_SWITCHTEAM, "ri", nt); + if(player1->state == CS_EDITING) conoutf(_("you can't change team while editing")); + else addmsg(SV_SWITCHTEAM, "ri", nt); } else conoutf(_("your team is: %s"), team_string(player1->team)); }