From: Mario Date: Thu, 9 Jul 2015 03:28:32 +0000 (+1000) Subject: Make corpses sink slowly in water X-Git-Tag: xonotic-v0.8.1~38^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4ccdf8536721403c05302f83b9ca1b63e756c6f0;p=xonotic%2Fxonotic-data.pk3dir.git Make corpses sink slowly in water --- diff --git a/qcsrc/common/physics.qc b/qcsrc/common/physics.qc index ea217c5a1..410c27131 100644 --- a/qcsrc/common/physics.qc +++ b/qcsrc/common/physics.qc @@ -1754,7 +1754,19 @@ void PM_Main() #endif if(PHYS_DEAD(self)) + { + // handle water here + vector midpoint = ((self.absmin + self.absmax) * 0.5); + if(pointcontents(midpoint) == CONTENT_WATER) + { + self.velocity = self.velocity * 0.5; + + // do we want this? + //if(pointcontents(midpoint + '0 0 2') == CONTENT_WATER) + //{ self.velocity_z = 70; } + } goto end; + } #ifdef SVQC if (!self.fixangle && !g_bugrigs)