Merge pull request #37050 from AutomaticFrenzy/patch/fullscreen-cloning

Fix fullscreens added to clientless mobs not stretching properly
This commit is contained in:
Jordan Brown
2018-04-10 20:22:30 -04:00
committed by CitadelStationBot
parent 4b34949340
commit 0a9ca8b073
2 changed files with 9 additions and 4 deletions

View File

@@ -15,11 +15,8 @@
screen.icon_state = "[initial(screen.icon_state)][severity]"
screen.severity = severity
if (client && screen.should_show_to(src))
screen.update_for_view(client.view)
client.screen += screen
if (screen.screen_loc == "CENTER-7,CENTER-7" && screen.view != client.view)
var/list/actualview = getviewsize(client.view)
screen.view = client.view
screen.transform = matrix(actualview[1]/FULLSCREEN_OVERLAY_RESOLUTION_X, 0, 0, 0, actualview[2]/FULLSCREEN_OVERLAY_RESOLUTION_Y, 0)
return screen
@@ -58,6 +55,7 @@
for(var/category in screens)
screen = screens[category]
if(screen.should_show_to(src))
screen.update_for_view(client.view)
client.screen |= screen
else
client.screen -= screen
@@ -73,6 +71,12 @@
var/severity = 0
var/show_when_dead = FALSE
/obj/screen/fullscreen/proc/update_for_view(client_view)
if (screen_loc == "CENTER-7,CENTER-7" && view != client_view)
var/list/actualview = getviewsize(client_view)
view = client_view
transform = matrix(actualview[1]/FULLSCREEN_OVERLAY_RESOLUTION_X, 0, 0, 0, actualview[2]/FULLSCREEN_OVERLAY_RESOLUTION_Y, 0)
/obj/screen/fullscreen/proc/should_show_to(mob/mymob)
if(!show_when_dead && mymob.stat == DEAD)
return FALSE

View File

@@ -828,6 +828,7 @@ GLOBAL_LIST_EMPTY(external_rsc_urls)
//END OF CIT CHANGES
view = new_size
apply_clickcatcher()
mob.reload_fullscreen()
if (isliving(mob))
var/mob/living/M = mob
M.update_damage_hud()