add view range respects widescreen (#33581)

It will simply increment the x and y independently

This prevents a runtime of trying to add a number to a string
This commit is contained in:
oranges
2017-12-17 17:09:13 +13:00
committed by CitadelStationBot
parent 220e1cd8cf
commit d919eae075
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -673,6 +673,13 @@ GLOBAL_LIST(external_rsc_urls)
return TRUE
. = ..()
/client/proc/rescale_view(change, min, max)
var/viewscale = getviewsize(view)
var/x = viewscale[1]
var/y = viewscale[2]
x = Clamp(x+change, min, max)
y = Clamp(y+change, min,max)
change_view("[x]x[y]")
/client/proc/change_view(new_size)
if (isnull(new_size))
+1 -1
View File
@@ -471,7 +471,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set hidden = TRUE
var/max_view = client.prefs.unlock_content ? GHOST_MAX_VIEW_RANGE_MEMBER : GHOST_MAX_VIEW_RANGE_DEFAULT
if(input)
client.change_view(Clamp(client.view + input, 7, max_view))
client.rescale_view(input, 7, max_view)
/mob/dead/observer/verb/boo()
set category = "Ghost"