more teamchange fixes

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4615 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
ac_stef
2009-08-08 23:16:54 +00:00
parent 9600193696
commit add0f2e320
4 changed files with 14 additions and 7 deletions
+1
View File
@@ -185,6 +185,7 @@ void newteam(char *name)
int nt = teamatoi(name);
if(nt == player1->team) return; // same team
if(!team_isvalid(nt)) { conoutf("\f3\"%s\" is not a valid team name (try CLA, RVSF or SPECTATOR)", name); return; }
if(team_isspect(nt) && player1->state != CS_DEAD) { conoutf("you need to be dead to become spectator"); return; }
addmsg(SV_TRYTEAM, "ri", nt);
}
else conoutf("your team is: %s", team_string(player1->team));