From 1596c28328f028fe532a2badfc1af37bdde6da11 Mon Sep 17 00:00:00 2001 From: Chinsky Date: Sat, 21 Feb 2015 21:38:47 +0300 Subject: [PATCH 1/2] Fixes ship deceleration for south/east directions --- code/WorkInProgress/Chinsky/overmap/ships/ship.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/WorkInProgress/Chinsky/overmap/ships/ship.dm b/code/WorkInProgress/Chinsky/overmap/ships/ship.dm index b080c41b071..ba2364e63c2 100644 --- a/code/WorkInProgress/Chinsky/overmap/ships/ship.dm +++ b/code/WorkInProgress/Chinsky/overmap/ships/ship.dm @@ -75,9 +75,9 @@ /obj/effect/map/ship/proc/decelerate() if(!is_still() && can_burn()) if (speed[1]) - adjust_speed(-SIGN(speed[1]) * min(get_acceleration(),speed[1]), 0) + adjust_speed(-SIGN(speed[1]) * min(get_acceleration(),abs(speed[1])), 0) if (speed[2]) - adjust_speed(0, -SIGN(speed[2]) * min(get_acceleration(),speed[2])) + adjust_speed(0, -SIGN(speed[2]) * min(get_acceleration(),abs(speed[2]))) last_burn = world.time /obj/effect/map/ship/proc/accelerate(direction) From 9e1a2315cd4456482b24b3980b7db692eb3803ca Mon Sep 17 00:00:00 2001 From: Chinsky Date: Sun, 22 Feb 2015 11:13:09 +0300 Subject: [PATCH 2/2] Changes loop for space tiles from world one to for over coordinates. It would raise infinite loop warnings otherwise when used with big zlevels. --- code/modules/overmap/_defines.dm | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/code/modules/overmap/_defines.dm b/code/modules/overmap/_defines.dm index c81cbb1ae67..23b6e588459 100644 --- a/code/modules/overmap/_defines.dm +++ b/code/modules/overmap/_defines.dm @@ -22,17 +22,18 @@ proc/toggle_move_stars(zlevel, direction) if (moving_levels["zlevel"] != gen_dir) moving_levels["zlevel"] = gen_dir - for(var/turf/space/S in world) - if(S.z == zlevel) + for(var/x = 1 to world.maxx) + for(var/y = 1 to world.maxy) spawn(0) - var/turf/T = S - if(!gen_dir) - T.icon_state = "[((T.x + T.y) ^ ~(T.x * T.y) + T.z) % 25]" - else - T.icon_state = "speedspace_[gen_dir]_[rand(1,15)]" - for(var/atom/movable/AM in T) - if (!AM.anchored) - AM.throw_at(get_step(T,reverse_direction(direction)), 5, 1) + var/turf/space/T = locate(x,y,zlevel) + if (T) + if(!gen_dir) + T.icon_state = "[((T.x + T.y) ^ ~(T.x * T.y) + T.z) % 25]" + else + T.icon_state = "speedspace_[gen_dir]_[rand(1,15)]" + for(var/atom/movable/AM in T) + if (!AM.anchored) + AM.throw_at(get_step(T,reverse_direction(direction)), 5, 1) //list used to cache empty zlevels to avoid nedless map bloat