From 841e89e2c560c8ad034078fc38969e6a4f6877ed Mon Sep 17 00:00:00 2001 From: Marco Cawthorne Date: Wed, 2 Nov 2022 14:44:26 -0700 Subject: [PATCH] Physics_WaterMove: Fix the mistake of changing watertype to WaterLevel() which were two different things. --- src/client/entry.qc | 5 +++++ src/shared/player_pmove.qc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/client/entry.qc b/src/client/entry.qc index eef29705..94f6bcd9 100644 --- a/src/client/entry.qc +++ b/src/client/entry.qc @@ -575,11 +575,16 @@ CSQC_Ent_Remove(void) { if (self.isCSQC) { NSEntity me = (NSEntity)self; + + /* we don't want to call Destroy, as that's delayed by a frame... + so we need to call this ourselves */ me.OnRemoveEntity(); + /* frees one slot the engine won't free for us */ if (me.skeletonindex) skel_delete(me.skeletonindex); + /* we're done, remove it once and for all */ remove(self); } else { remove(self); diff --git a/src/shared/player_pmove.qc b/src/shared/player_pmove.qc index 6b8022cc..46562372 100644 --- a/src/shared/player_pmove.qc +++ b/src/shared/player_pmove.qc @@ -269,12 +269,12 @@ NSClientPlayer::Physics_WaterMove(void) } #ifdef SERVER - if (WaterLevel() == CONTENT_LAVA) { + if (watertype == CONTENT_LAVA) { if (m_flPainTime < time) { Damage_Apply(this, world, 10 * WaterLevel(), 0, DMG_BURN); m_flPainTime = time + 0.2; } - } else if (WaterLevel() == CONTENT_SLIME) { + } else if (watertype == CONTENT_SLIME) { if (m_flPainTime < time) { Damage_Apply(this, world, 4 * WaterLevel(), 0, DMG_ACID); m_flPainTime = time + 1;