no spectators in singleplayer

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6335 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lucas GAUTHERON
2011-04-25 18:39:44 +00:00
parent 0de51eab8a
commit 8b6bef25b3
2 changed files with 883 additions and 864 deletions
File diff suppressed because it is too large Load Diff
+6 -1
View File
@@ -216,7 +216,11 @@ void newteam(char *name)
int nt = teamatoi(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'll need to be in a \"dead\" state to become a spectator")); return; }
if(team_isspect(nt))
{
if(player1->state != CS_DEAD) { conoutf(_("you'll need to be in a \"dead\" state to become a spectator")); return; }
if(!multiplayer()) { conoutf(_("you cannot spectate in singleplayer")); return; }
}
if(player1->state == CS_EDITING) conoutf(_("you can't change team while editing"));
else addmsg(SV_SWITCHTEAM, "ri", nt);
}
@@ -331,6 +335,7 @@ void getlocalplayer(const char *attr, const char *value)
COMMANDN(player, getplayer, ARG_3STR);
COMMANDN(player1, getlocalplayer, ARG_2STR);
void deathstate(playerent *pl)
{
if(pl==player1) { if(identexists("onDeathSelf")) execute("onDeathSelf"); }