mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
Merge pull request #5967 from Verkister/patch-21
Fixes submap footprint miscalculations
This commit is contained in:
@@ -40,6 +40,10 @@ var/list/global/map_templates = list()
|
|||||||
/datum/map_template/proc/preload_size(path, orientation = SOUTH)
|
/datum/map_template/proc/preload_size(path, orientation = SOUTH)
|
||||||
var/bounds = maploader.load_map(file(path), 1, 1, 1, cropMap=FALSE, measureOnly=TRUE, orientation=orientation)
|
var/bounds = maploader.load_map(file(path), 1, 1, 1, cropMap=FALSE, measureOnly=TRUE, orientation=orientation)
|
||||||
if(bounds)
|
if(bounds)
|
||||||
|
if(orientation & (90 | 270))
|
||||||
|
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
|
width = bounds[MAP_MAXX] // Assumes all templates are rectangular, have a single Z level, and begin at 1,1,1
|
||||||
height = bounds[MAP_MAXY]
|
height = bounds[MAP_MAXY]
|
||||||
return bounds
|
return bounds
|
||||||
|
|||||||
Reference in New Issue
Block a user