prevent nades from jumping out of water

when nades are thrown in shallow water with high enough speed, they
slow down while in the water - then, when they reach the surface again,
they jump out of the water

this patch takes 90% off of nade topspeed while leaving water
This commit is contained in:
ac-stef
2014-05-16 18:56:17 +02:00
parent e5a0ed37d5
commit 0cace56fc2
+5 -1
View File
@@ -692,7 +692,11 @@ void moveplayer(physent *pl, int moveres, bool local, int curtime)
}
if(pl==player1) pl->vel.z = 0;
}
else if(pl->inwater && !water) audiomgr.playsound(S_SPLASH1, &pl->o);
else if(pl->inwater && !water)
{
audiomgr.playsound(S_SPLASH1, &pl->o);
if(pl->type == ENT_BOUNCE) pl->maxspeed /= 8; // prevent nades from jumping out of water
}
pl->inwater = water;
}