Physics_WaterMove: Fix the mistake of changing watertype to WaterLevel() which were two different things.

This commit is contained in:
Marco Cawthorne 2022-11-02 14:44:26 -07:00
parent e9f735adc5
commit 841e89e2c5
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
2 changed files with 7 additions and 2 deletions

View File

@ -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);

View File

@ -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;