switching between spect modes, demo recording fixes

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1462 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2007-12-15 20:45:02 +00:00
parent 1da623b451
commit ad52973b6f
8 changed files with 35 additions and 32 deletions
+11 -7
View File
@@ -811,8 +811,9 @@ void refreshsopmenu(void *menu, bool init)
}
}
void follownextplayer()
void followplayer(int i)
{
player1->spectating = SM_FOLLOWPLAYER;
if(players.length())
{
loopv(players)
@@ -827,15 +828,18 @@ void follownextplayer()
void toggledeathcam()
{
if(player1->spectating == SM_NONE) showscores(false);
if(player1->spectating == SM_FOLLOWPLAYER) follownextplayer();
if(player1->spectating == SM_NONE) showscores(false); // disable once
if(player1->spectating == SM_FOLLOWPLAYER) followplayer();
else
{
player1->spectating = (player1->spectating+1) % SM_NUM;
if(player1->spectating==SM_FOLLOWPLAYER)
{
follownextplayer();
}
if(player1->spectating==SM_FOLLOWPLAYER) followplayer();
}
}
COMMAND(followplayer, ARG_1INT);
COMMAND(toggledeathcam, ARG_NONE);
int isalive() { return player1->state==CS_ALIVE ? 1 : 0; }
COMMANDN(alive, isalive, ARG_1EXP);