mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge pull request #4789 from VOREStation/upstream-merge-5967
[MIRROR] Fixes submap footprint miscalculations
This commit is contained in:
@@ -27,8 +27,12 @@
|
|||||||
/datum/map_template/proc/preload_size(path, orientation = 0)
|
/datum/map_template/proc/preload_size(path, orientation = 0)
|
||||||
var/bounds = SSmapping.maploader.load_map(file(path), 1, 1, 1, cropMap=FALSE, measureOnly=TRUE, orientation=orientation)
|
var/bounds = SSmapping.maploader.load_map(file(path), 1, 1, 1, cropMap=FALSE, measureOnly=TRUE, orientation=orientation)
|
||||||
if(bounds)
|
if(bounds)
|
||||||
width = bounds[MAP_MAXX] // Assumes all templates are rectangular, have a single Z level, and begin at 1,1,1
|
if(orientation & (90 | 270))
|
||||||
height = bounds[MAP_MAXY]
|
width = bounds[MAP_MAXY]
|
||||||
|
height = bounds[MAP_MAXX]
|
||||||
|
else
|
||||||
|
width = bounds[MAP_MAXX] // Assumes all templates are rectangular, have a single Z level, and begin at 1,1,1
|
||||||
|
height = bounds[MAP_MAXY]
|
||||||
return bounds
|
return bounds
|
||||||
|
|
||||||
/datum/map_template/proc/initTemplateBounds(var/list/bounds)
|
/datum/map_template/proc/initTemplateBounds(var/list/bounds)
|
||||||
|
|||||||
Reference in New Issue
Block a user