Merge pull request #11421 from Citadel-Station-13/kevinz000-patch-2

Fixes the "blind while not unconscious bug", alternatively, "if in doubt, assume something is coded in the worst possible way and is held together by duct tape and prayers"
This commit is contained in:
Ghom
2020-03-11 13:17:47 +01:00
committed by GitHub
4 changed files with 9 additions and 5 deletions
@@ -21,7 +21,8 @@
if(IsUnconscious() || IsSleeping() || getOxyLoss() > 50 || (HAS_TRAIT(src, TRAIT_DEATHCOMA)) || health <= crit_threshold)
if(stat == CONSCIOUS)
stat = UNCONSCIOUS
blind_eyes(1)
if(!eye_blind)
blind_eyes(1)
update_mobility()
else
if(stat == UNCONSCIOUS)
+2 -1
View File
@@ -813,7 +813,8 @@
return
if(IsUnconscious() || IsSleeping() || getOxyLoss() > 50 || (HAS_TRAIT(src, TRAIT_DEATHCOMA)) || (health <= HEALTH_THRESHOLD_FULLCRIT && !HAS_TRAIT(src, TRAIT_NOHARDCRIT)))
stat = UNCONSCIOUS
blind_eyes(1)
if(!eye_blind)
blind_eyes(1)
if(combatmode)
toggle_combat_mode(TRUE, TRUE)
else
+2 -1
View File
@@ -490,7 +490,8 @@
GLOB.alive_mob_list += src
suiciding = 0
stat = UNCONSCIOUS //the mob starts unconscious,
blind_eyes(1)
if(!eye_blind)
blind_eyes(1)
updatehealth() //then we check if the mob should wake up.
update_mobility()
update_sight()
@@ -968,7 +968,8 @@
if(IsUnconscious() || IsStun() || IsParalyzed() || getOxyLoss() > maxHealth*0.5)
if(stat == CONSCIOUS)
stat = UNCONSCIOUS
blind_eyes(1)
if(!eye_blind)
blind_eyes(1)
update_mobility()
update_headlamp()
else
@@ -1236,4 +1237,4 @@
if(usr.stat == DEAD)
return //won't work if dead
ai_roster()
ai_roster()