spectator mode fix

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1449 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2007-12-01 15:42:06 +00:00
parent 780cc3f4f1
commit 5b7890d820
+3 -3
View File
@@ -267,12 +267,12 @@ void recomputecamera()
camera1 = player1;
break;
case SM_FOLLOWPLAYER:
playerent *p = players[player1->followplayercn];
if(!p)
if(!players.inrange(player1->followplayercn) || !players[player1->followplayercn])
{
player1->followplayercn = 0;
player1->spectating = SM_FLY;
return;
}
playerent *p = players[player1->followplayercn];
static physent followcam;
static playerent *lastplayer;
if(lastplayer != p)