NSSurfacePropEntity: Fix bug that I recently introduced which prevents health
from propdata from getting assigned.
This commit is contained in:
parent
279e8a1cd5
commit
af73a3a5b0
1 changed files with 2 additions and 1 deletions
|
@ -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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue