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:
+2
-2
@@ -127,8 +127,8 @@ struct physent
|
||||
onfloor = onladder = inwater = jumpnext = crouching = trycrouch = stuck = false;
|
||||
}
|
||||
|
||||
virtual void oncollision() {};
|
||||
virtual void onmoved(const vec &dist) {};
|
||||
virtual void oncollision() {}
|
||||
virtual void onmoved(const vec &dist) {}
|
||||
};
|
||||
|
||||
struct dynent : physent // animated ent
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user