mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-16 13:12:22 +00:00
Merge pull request #8196 from comma/master
Fixes ship deceleration for south/east directions
This commit is contained in:
@@ -22,17 +22,18 @@ proc/toggle_move_stars(zlevel, direction)
|
|||||||
|
|
||||||
if (moving_levels["zlevel"] != gen_dir)
|
if (moving_levels["zlevel"] != gen_dir)
|
||||||
moving_levels["zlevel"] = gen_dir
|
moving_levels["zlevel"] = gen_dir
|
||||||
for(var/turf/space/S in world)
|
for(var/x = 1 to world.maxx)
|
||||||
if(S.z == zlevel)
|
for(var/y = 1 to world.maxy)
|
||||||
spawn(0)
|
spawn(0)
|
||||||
var/turf/T = S
|
var/turf/space/T = locate(x,y,zlevel)
|
||||||
if(!gen_dir)
|
if (T)
|
||||||
T.icon_state = "[((T.x + T.y) ^ ~(T.x * T.y) + T.z) % 25]"
|
if(!gen_dir)
|
||||||
else
|
T.icon_state = "[((T.x + T.y) ^ ~(T.x * T.y) + T.z) % 25]"
|
||||||
T.icon_state = "speedspace_[gen_dir]_[rand(1,15)]"
|
else
|
||||||
for(var/atom/movable/AM in T)
|
T.icon_state = "speedspace_[gen_dir]_[rand(1,15)]"
|
||||||
if (!AM.anchored)
|
for(var/atom/movable/AM in T)
|
||||||
AM.throw_at(get_step(T,reverse_direction(direction)), 5, 1)
|
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
|
//list used to cache empty zlevels to avoid nedless map bloat
|
||||||
|
|||||||
@@ -76,9 +76,9 @@
|
|||||||
/obj/effect/map/ship/proc/decelerate()
|
/obj/effect/map/ship/proc/decelerate()
|
||||||
if(!is_still() && can_burn())
|
if(!is_still() && can_burn())
|
||||||
if (speed[1])
|
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])
|
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
|
last_burn = world.time
|
||||||
|
|
||||||
/obj/effect/map/ship/proc/accelerate(direction)
|
/obj/effect/map/ship/proc/accelerate(direction)
|
||||||
|
|||||||
Reference in New Issue
Block a user