NSSurfacePropEntity: Fix bug that I recently introduced which prevents health

from propdata from getting assigned.
This commit is contained in:
Marco Cawthorne 2022-04-05 19:05:00 -07:00
parent 279e8a1cd5
commit af73a3a5b0
Signed by: eukara
GPG key ID: C196CD8BA993248A

View file

@ -128,7 +128,7 @@ NSSurfacePropEntity::Respawn(void)
NSRenderableEntity::Respawn(); NSRenderableEntity::Respawn();
/* only use spawndata's health if we aren't overriding it */ /* only use spawndata's health if we aren't overriding it */
if (HasPropData() == false && sh <= 0) { if (HasPropData() != false && sh <= 0) {
health = (float)GetPropData(PROPINFO_HEALTH); health = (float)GetPropData(PROPINFO_HEALTH);
} else { } else {
health = sh; health = sh;
@ -343,6 +343,7 @@ NSSurfacePropEntity::NSSurfacePropEntity(void)
#ifdef SERVER #ifdef SERVER
m_iPropData = -1; m_iPropData = -1;
m_iMaterial = -1; m_iMaterial = -1;
max_health = 100;
super::NSRenderableEntity(); super::NSRenderableEntity();