monster_scientist: Force health reset on health and base_health... that's

a bug. We need to backtrace that some time.
This commit is contained in:
Marco Cawthorne 2021-03-24 07:54:14 +01:00
parent 27f94f7073
commit 7124ce1005

View file

@ -257,6 +257,8 @@ monster_scientist::Respawn(void)
CBaseNPC::Respawn(); CBaseNPC::Respawn();
m_iFlags |= MONSTER_CANFOLLOW; m_iFlags |= MONSTER_CANFOLLOW;
PlayerUse = OnPlayerUse; PlayerUse = OnPlayerUse;
health = base_health = Skill_GetValue("scientist_health", 20);
takedamage = DAMAGE_YES;
if (autocvar_sh_scialert) { if (autocvar_sh_scialert) {
m_iFlags |= MONSTER_FEAR; m_iFlags |= MONSTER_FEAR;
@ -307,9 +309,9 @@ monster_scientist::monster_scientist(void)
model = "models/scientist.mdl"; model = "models/scientist.mdl";
base_mins = [-16,-16,0]; base_mins = [-16,-16,0];
base_maxs = [16,16,72]; base_maxs = [16,16,72];
base_health = Skill_GetValue("scientist_health", 20);
CBaseNPC::CBaseNPC(); CBaseNPC::CBaseNPC();
precache_model(m_oldModel); precache_model(m_oldModel);
base_health = Skill_GetValue("scientist_health", 20);
if (m_iBody == -1) { if (m_iBody == -1) {
/* This stuff needs to be persistent because we can't guarantee that /* This stuff needs to be persistent because we can't guarantee that