spectator fixes, recoil tuning

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1450 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2007-12-01 17:34:05 +00:00
parent 5b7890d820
commit e63d35c4c0
6 changed files with 33 additions and 22 deletions
+26
View File
@@ -811,3 +811,29 @@ void refreshsopmenu(void *menu, bool init)
}
}
void follownextplayer()
{
if(players.length())
{
loopv(players)
{
player1->followplayercn = (player1->followplayercn+1+i) % players.length();
ASSERT(player1->followplayercn < players.length());
if(players[player1->followplayercn] && players[player1->followplayercn]->state == CS_ALIVE) return;
}
}
player1->spectating = SM_FLY;
}
void toggledeathcam()
{
if(player1->spectating == SM_FOLLOWPLAYER) follownextplayer();
else
{
player1->spectating = (player1->spectating+1) % SM_NUM;
if(player1->spectating==SM_FOLLOWPLAYER)
{
follownextplayer();
}
}
}