don't let dead players slide

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@3023 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-10-14 21:54:03 +00:00
parent 564d5aa7d2
commit 4c7b092357
2 changed files with 9 additions and 3 deletions
+7 -1
View File
@@ -468,7 +468,13 @@ void moveplayer(physent *pl, int moveres, bool local, int curtime)
}
pl->o == oo;
}
if(pl->type==ENT_CAMERA) return;
if(pl->type==ENT_CAMERA || (pl->type==ENT_PLAYER && pl->state==CS_DEAD))
{
pl->o.x -= f*d.x;
pl->o.y -= f*d.y;
pl->o.z -= f*d.z;
break;
}
if(pl->type==ENT_PLAYER && hitplayer)
{
float dx = hitplayer->o.x-pl->o.x, dy = hitplayer->o.y-pl->o.y, mag = sqrtf(dx*dx+dy*dy);