// these entcs_props ids need to be referenced directly
int ENTCS_PROP_ENTNUM_id = 0;
int ENTCS_PROP_ORIGIN_id = 0;
+int ENTCS_PROP_HEALTH_id = 0;
STATIC_INIT(EntCSProps_setglobalids)
{
FOREACH(EntCSProps, true, {
- if (it.registered_id == "ENTCS_PROP_ENTNUM")
- ENTCS_PROP_ENTNUM_id = it.m_id;
- if (it.registered_id == "ENTCS_PROP_ORIGIN")
- ENTCS_PROP_ORIGIN_id = it.m_id;
+ if (it.registered_id == "ENTCS_PROP_ENTNUM") ENTCS_PROP_ENTNUM_id = it.m_id;
+ if (it.registered_id == "ENTCS_PROP_ORIGIN") ENTCS_PROP_ORIGIN_id = it.m_id;
+ if (it.registered_id == "ENTCS_PROP_HEALTH") ENTCS_PROP_HEALTH_id = it.m_id;
});
}
it.m_set(this, player);
this.SendFlags |= BIT(it.m_id);
});
+ if (intermission_running)
+ {
+ // health is set to special values after the game ends, ignore any change
+ this.SendFlags &= ~BIT(ENTCS_PROP_HEALTH_id);
+ }
setorigin(this, this.origin); // relink
}