bounce sound for grenades
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2072 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -385,6 +385,7 @@ void moveplayer(physent *pl, int moveres, bool local, int curtime)
|
||||
}
|
||||
}
|
||||
|
||||
bool collided = false;
|
||||
if(!editfly) loopi(moveres) // discrete steps collision detection & sliding
|
||||
{
|
||||
const float f = 1.0f/moveres;
|
||||
@@ -394,7 +395,8 @@ void moveplayer(physent *pl, int moveres, bool local, int curtime)
|
||||
pl->o.y += f*d.y;
|
||||
pl->o.z += f*d.z;
|
||||
hitplayer = NULL;
|
||||
if(collide(pl, false, drop, rise)) continue;
|
||||
if(collide(pl, false, drop, rise)) continue;
|
||||
else collided = true;
|
||||
if(pl->type==ENT_CAMERA) return;
|
||||
if(pl->type==ENT_PLAYER && hitplayer)
|
||||
{
|
||||
@@ -438,6 +440,8 @@ void moveplayer(physent *pl, int moveres, bool local, int curtime)
|
||||
break;
|
||||
}
|
||||
|
||||
if(collided) pl->oncollision();
|
||||
|
||||
if(pl->type==ENT_CAMERA) return;
|
||||
else if(pl->type!=ENT_BOUNCE)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user