From 71e3d5187fdb332c6ee23cefceb7b9ef45ad3462 Mon Sep 17 00:00:00 2001 From: Mark van Alphen Date: Wed, 8 May 2019 17:18:27 +0200 Subject: [PATCH 1/2] Lighting fixes: makes sure new_players have a HUD and that sight flags are reset properly --- .../mob/living/carbon/human/species/_species.dm | 3 ++- code/modules/mob/living/life.dm | 2 +- code/modules/mob/new_player/login.dm | 15 +++++---------- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index 18451ff31cf..7b545cd7aa7 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -629,6 +629,8 @@ It'll return null if the organ doesn't correspond, so include null checks when u return has_organ[organ_slot] /datum/species/proc/update_sight(mob/living/carbon/human/H) + H.sight = initial(H.sight) + var/obj/item/organ/internal/eyes/eyes = H.get_int_organ(/obj/item/organ/internal/eyes) if(eyes) H.sight |= eyes.vision_flags @@ -636,7 +638,6 @@ It'll return null if the organ doesn't correspond, so include null checks when u H.see_invisible = eyes.see_invisible H.lighting_alpha = eyes.lighting_alpha else - H.sight = initial(H.sight) H.see_in_dark = initial(H.see_in_dark) H.see_invisible = initial(H.see_invisible) H.lighting_alpha = initial(H.lighting_alpha) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 03182a07ba8..e0c58c484d8 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -211,7 +211,7 @@ sight |= SEE_TURFS sight |= SEE_MOBS sight |= SEE_OBJS - lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE + lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE see_in_dark = 8 see_invisible = SEE_INVISIBLE_OBSERVER sync_lighting_plane_alpha() diff --git a/code/modules/mob/new_player/login.dm b/code/modules/mob/new_player/login.dm index 1c7b06b1ce1..2803df9d5c4 100644 --- a/code/modules/mob/new_player/login.dm +++ b/code/modules/mob/new_player/login.dm @@ -14,19 +14,14 @@ loc = locate(1,1,1) lastarea = loc + if(!hud_used) + create_mob_hud() + if(hud_used) + hud_used.show_hud(hud_used.hud_version) + sight |= SEE_TURFS GLOB.player_list |= src -/* - var/list/watch_locations = list() - for(var/obj/effect/landmark/landmark in GLOB.landmarks_list) - if(landmark.tag == "landmark*new_player") - watch_locations += landmark.loc - - if(watch_locations.len>0) - loc = pick(watch_locations) -*/ - callHook("mob_login", list("client" = client, "mob" = src)) new_player_panel() From 9b60ea5d9535847c9ef2f50093408cc4654111b9 Mon Sep 17 00:00:00 2001 From: Mark van Alphen Date: Wed, 8 May 2019 17:22:24 +0200 Subject: [PATCH 2/2] Make sure the screen is reset, just in case --- code/modules/mob/new_player/login.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/mob/new_player/login.dm b/code/modules/mob/new_player/login.dm index 2803df9d5c4..c67ccb3f60b 100644 --- a/code/modules/mob/new_player/login.dm +++ b/code/modules/mob/new_player/login.dm @@ -14,6 +14,8 @@ loc = locate(1,1,1) lastarea = loc + client.screen = list() // Remove HUD items just in case. + client.images = list() if(!hud_used) create_mob_hud() if(hud_used)