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
1 changed files with 2 additions and 1 deletions

View File

@ -128,7 +128,7 @@ NSSurfacePropEntity::Respawn(void)
NSRenderableEntity::Respawn();
/* 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);
} else {
health = sh;
@ -343,6 +343,7 @@ NSSurfacePropEntity::NSSurfacePropEntity(void)
#ifdef SERVER
m_iPropData = -1;
m_iMaterial = -1;
max_health = 100;
super::NSRenderableEntity();