Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

The HUD crit display now updates properly(crit is when your heart sto…

…ps beating, not when you collapse due to trauma).
  • Loading branch information...
commit 6d5521625dcc6443e8a32284369322b161e81e66 1 parent 615871b
cib authored
Showing with 21 additions and 27 deletions.
  1. +21 −27 code/modules/mob/living/carbon/human/life.dm
View
48 code/modules/mob/living/carbon/human/life.dm
@@ -1225,18 +1225,6 @@
if (!druggy)
see_invisible = 0
-/*
- if (istype(glasses, /obj/item/clothing/glasses))
- sight = glasses.vision_flags
- see_in_dark = 2 + glasses.darkness_view
- see_invisible = invisa_view
-
- if(istype(glasses, /obj/item/clothing/glasses/hud))
- if(client)
- glasses:process_hud(src)
-*/
-//Should finish this up later
-
if (src.sleep && !hal_crit)
@@ -1248,23 +1236,29 @@
if (healths)
if (stat != 2)
- switch(health - halloss)
- if(100 to INFINITY)
- healths.icon_state = "health0"
- if(80 to 100)
- healths.icon_state = "health1"
- if(60 to 80)
- healths.icon_state = "health2"
- if(40 to 60)
- healths.icon_state = "health3"
- if(20 to 40)
- healths.icon_state = "health4"
- if(0 to 20)
- healths.icon_state = "health5"
- else
- healths.icon_state = "health6"
+ // if the mob is not in crit, do a switch
+ if(health - halloss >= config.health_threshold_crit)
+ switch(health - halloss)
+ if(100 to INFINITY)
+ healths.icon_state = "health0"
+ if(80 to 100)
+ healths.icon_state = "health1"
+ if(60 to 80)
+ healths.icon_state = "health2"
+ if(40 to 60)
+ healths.icon_state = "health3"
+ if(20 to 40)
+ healths.icon_state = "health4"
+ else
+ healths.icon_state = "health5"
+ // if he's in crit, display crit icon
+ else
+ healths.icon_state = "health6"
+
+ // if he's dead, display death icon
else
healths.icon_state = "health7"
+
if(hal_screwyhud == 1)
healths.icon_state = "health6"
if(hal_screwyhud == 2)
Please sign in to comment.
Something went wrong with that request. Please try again.