mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 19:44:46 +01:00
Add proc set_viewsize() to allow hooking actions when client.view is changed.
- Proc is on mob to simplify the standard use case; maybe someday actually save it there too if desired.
This commit is contained in:
@@ -654,7 +654,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
if(!zoom && !cannotzoom)
|
||||
if(H.hud_used.hud_shown)
|
||||
H.toggle_zoom_hud() // If the user has already limited their HUD this avoids them having a HUD when they zoom in
|
||||
H.client.view = viewsize
|
||||
H.set_viewsize(viewsize)
|
||||
zoom = 1
|
||||
|
||||
var/tilesize = 32
|
||||
@@ -679,7 +679,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
|
||||
H.handle_vision()
|
||||
|
||||
else
|
||||
H.client.view = world.view
|
||||
H.set_viewsize() // Reset to default
|
||||
if(!H.hud_used.hud_shown)
|
||||
H.toggle_zoom_hud()
|
||||
zoom = 0
|
||||
|
||||
Reference in New Issue
Block a user