Physics_WaterMove: Fix the mistake of changing watertype to WaterLevel() which were two different things.
This commit is contained in:
parent
e9f735adc5
commit
841e89e2c5
|
@ -575,11 +575,16 @@ CSQC_Ent_Remove(void)
|
||||||
{
|
{
|
||||||
if (self.isCSQC) {
|
if (self.isCSQC) {
|
||||||
NSEntity me = (NSEntity)self;
|
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();
|
me.OnRemoveEntity();
|
||||||
|
|
||||||
|
/* frees one slot the engine won't free for us */
|
||||||
if (me.skeletonindex)
|
if (me.skeletonindex)
|
||||||
skel_delete(me.skeletonindex);
|
skel_delete(me.skeletonindex);
|
||||||
|
|
||||||
|
/* we're done, remove it once and for all */
|
||||||
remove(self);
|
remove(self);
|
||||||
} else {
|
} else {
|
||||||
remove(self);
|
remove(self);
|
||||||
|
|
|
@ -269,12 +269,12 @@ NSClientPlayer::Physics_WaterMove(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef SERVER
|
#ifdef SERVER
|
||||||
if (WaterLevel() == CONTENT_LAVA) {
|
if (watertype == CONTENT_LAVA) {
|
||||||
if (m_flPainTime < time) {
|
if (m_flPainTime < time) {
|
||||||
Damage_Apply(this, world, 10 * WaterLevel(), 0, DMG_BURN);
|
Damage_Apply(this, world, 10 * WaterLevel(), 0, DMG_BURN);
|
||||||
m_flPainTime = time + 0.2;
|
m_flPainTime = time + 0.2;
|
||||||
}
|
}
|
||||||
} else if (WaterLevel() == CONTENT_SLIME) {
|
} else if (watertype == CONTENT_SLIME) {
|
||||||
if (m_flPainTime < time) {
|
if (m_flPainTime < time) {
|
||||||
Damage_Apply(this, world, 4 * WaterLevel(), 0, DMG_ACID);
|
Damage_Apply(this, world, 4 * WaterLevel(), 0, DMG_ACID);
|
||||||
m_flPainTime = time + 1;
|
m_flPainTime = time + 1;
|
||||||
|
|
Loading…
Reference in New Issue