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:
+877
-863
File diff suppressed because it is too large
Load Diff
@@ -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"); }
|
||||
|
||||
Reference in New Issue
Block a user