From af73a3a5b0548f6e23fe2e258c6999d9b323bf32 Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Tue, 5 Apr 2022 19:05:00 -0700 Subject: [PATCH] NSSurfacePropEntity: Fix bug that I recently introduced which prevents health from propdata from getting assigned. --- src/gs-entbase/shared/NSSurfacePropEntity.qc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gs-entbase/shared/NSSurfacePropEntity.qc b/src/gs-entbase/shared/NSSurfacePropEntity.qc index 16d95cab..fc8c1a6b 100644 --- a/src/gs-entbase/shared/NSSurfacePropEntity.qc +++ b/src/gs-entbase/shared/NSSurfacePropEntity.qc @@ -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();