From 4ccdf8536721403c05302f83b9ca1b63e756c6f0 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 9 Jul 2015 13:28:32 +1000 Subject: [PATCH] Make corpses sink slowly in water --- qcsrc/common/physics.qc | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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) -- 2.39.2