Skip to content

Commit

Permalink
Update carbon.dm (#1526)
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixRuin authored Dec 25, 2024
1 parent 2fee208 commit 1fcd41b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions code/modules/mob/living/carbon/carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@
if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates.
return

if(glasses)
if(glasses && istype(glasses, /obj/item/clothing/head))
var/obj/item/clothing/glasses/G = glasses
sight |= G.vision_flags
see_in_dark = max(G.darkness_view, see_in_dark)
Expand All @@ -618,10 +618,8 @@
see_invisible = min(G.invis_view, see_invisible)
if(!isnull(G.lighting_alpha))
lighting_alpha = min(lighting_alpha, G.lighting_alpha)
if(head)
if(head && istype(head, /obj/item/clothing/head))
var/obj/item/clothing/head/H = head
if(!istype(H, /obj/item/clothing/head))
return
sight |= H.vision_flags
see_in_dark = max(H.darkness_view, see_in_dark)

Expand Down

0 comments on commit 1fcd41b

Please sign in to comment.