mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
Fixes loading maps in standard dmm format. (#39160)
As opposed to tgm. Also minor performance tweak for these since we don't support jagged maps.
This commit is contained in:
@@ -119,9 +119,8 @@ GLOBAL_DATUM_INIT(_preloader, /datum/map_preloader, new)
|
||||
bounds[MAP_MAXY] = max(bounds[MAP_MAXY], CLAMP(min(gridSet.ycrd, world.maxy), y_lower, y_upper))
|
||||
|
||||
var/maxx = gridSet.xcrdStart
|
||||
if(measureOnly)
|
||||
for(var/line in gridLines)
|
||||
maxx = max(maxx, gridSet.xcrdStart + length(line) / key_len - 1)
|
||||
if(gridLines.len) //Not an empty map
|
||||
maxx = max(maxx, gridSet.xcrdStart + length(gridLines[1]) / key_len - 1)
|
||||
|
||||
bounds[MAP_MAXX] = CLAMP(max(bounds[MAP_MAXX], cropMap ? min(maxx, world.maxx) : maxx), x_lower, x_upper)
|
||||
CHECK_TICK
|
||||
|
||||
Reference in New Issue
Block a user