GetPlayerZoomLimits Player View 5.5 OC proplist int player Player whose zoom limits are queried. Returns currently set zoom limits for a player. The return value is a proplist with the following properties: PropertyDescription MaxWidth Maximum width of landscpe in viewport, i.e. how far the player can view if zoomed out as far as possible. May be zero if MaxHeight is nonzero and zoom limits are determined by maximum view height only. MaxHeight Maximum height of landscpe in viewport. May be zero if MaxWidth is nonzero. MinWidth Minimum width of landscpe in viewport, i.e. how far the player can view if zoomed in as far as possible. May be zero if MinHeight is nonzero and zoom limits are determined by minimunm view height only. MinHeight Minimum height of landscpe in viewport. May be zero if MinWidth is nonzero. MaxValue Maximum zoom if set as a direct pixel-to-landscape correspondance value using SetPlayerZoom function. Zero if a direct zoom value is not specified. MinValue Minimum zoom if set as a direct pixel-to-landscape correspondance value using SetPlayerZoom function. Zero if a direct zoom value is not specified.
It is currently not possible to query the current zoom because these values are not synchronized. func ReduceSight(int player) { var zoom_limits = GetPlayerZoomLimits(player); SetPlayerZoomByViewRange(player, zoom_limits.MaxWidth/2, zoom_limits.MaxHeight/2, PLRZOOM_LimitMax); return true; } Halves the view range of a player. SetPlayerZoomByViewRange SetPlayerZoom
Sven22014-05