From 0cace56fc288bd04dd5616f6faa7a0d5a7102f1b Mon Sep 17 00:00:00 2001 From: ac-stef Date: Sat, 1 Feb 2014 14:56:02 +0100 Subject: [PATCH] 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 --- source/src/physics.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/src/physics.cpp b/source/src/physics.cpp index b7bb94ba..4c70de27 100644 --- a/source/src/physics.cpp +++ b/source/src/physics.cpp @@ -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; }