mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 11:34:19 +01:00
Improve shuttle parallax stopping
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
if(id_tag == "s_docking_airlock")
|
||||
INVOKE_ASYNC(src, .proc/lock)
|
||||
|
||||
/mob/onShuttleMove(turf/oldT, turf/T1, rotation, travelDir)
|
||||
/mob/onShuttleMove(turf/oldT, turf/T1, rotation)
|
||||
if(!move_on_shuttle)
|
||||
return 0
|
||||
. = ..()
|
||||
@@ -44,7 +44,6 @@
|
||||
else
|
||||
shake_camera(src, 7, 1)
|
||||
|
||||
client.new_parallax_movedir = travelDir ? WEST : NORTH
|
||||
update_parallax_contents()
|
||||
|
||||
/mob/living/carbon/onShuttleMove()
|
||||
@@ -59,14 +58,8 @@
|
||||
if(smooth)
|
||||
queue_smooth(src)
|
||||
|
||||
/mob/postDock(obj/docking_port/S1, transit, list/parallax_mobs)
|
||||
if(!client)
|
||||
return
|
||||
if(transit)
|
||||
parallax_mobs.Add(src)
|
||||
return
|
||||
client.new_parallax_movedir = 0
|
||||
update_parallax_contents()
|
||||
/mob/postDock()
|
||||
update_parallax_contents()
|
||||
|
||||
/obj/machinery/door/airlock/postDock(obj/docking_port/stationary/S1)
|
||||
. = ..()
|
||||
|
||||
@@ -215,7 +215,6 @@
|
||||
var/roundstart_move //id of port to send shuttle to at roundstart
|
||||
var/travelDir = 0 //direction the shuttle would travel in
|
||||
var/rebuildable = 0 //can build new shuttle consoles for this one
|
||||
var/list/parallax_mobs = list() //mobs to unparallax
|
||||
|
||||
var/obj/docking_port/stationary/destination
|
||||
var/obj/docking_port/stationary/previous
|
||||
@@ -493,9 +492,10 @@
|
||||
var/turf/simulated/Ts1 = T1
|
||||
Ts1.copy_air_with_tile(T0)
|
||||
|
||||
areaInstance.moving = TRUE
|
||||
//move mobile to new location
|
||||
for(var/atom/movable/AM in T0)
|
||||
AM.onShuttleMove(T0, T1, rotation, travelDir)
|
||||
AM.onShuttleMove(T0, T1, rotation)
|
||||
|
||||
if(rotation)
|
||||
T1.shuttleRotate(rotation)
|
||||
@@ -513,19 +513,12 @@
|
||||
T0.CalculateAdjacentTurfs()
|
||||
SSair.add_to_active(T0,1)
|
||||
|
||||
areaInstance.moving = transit
|
||||
for(var/A1 in L1)
|
||||
var/turf/T1 = A1
|
||||
T1.postDock(S1)
|
||||
for(var/atom/movable/M in T1)
|
||||
M.postDock(S1, transit, parallax_mobs)
|
||||
|
||||
// For mobs who move away from a transiting shuttle for whatever reason (teleportation, jumping, etc) so that they don't get stuck parallaxing
|
||||
if(!transit)
|
||||
for(var/mob/M in parallax_mobs)
|
||||
if(M.client && M.client.new_parallax_movedir)
|
||||
M.client.new_parallax_movedir = 0
|
||||
M.update_parallax_contents()
|
||||
parallax_mobs = list()
|
||||
M.postDock(S1)
|
||||
|
||||
loc = S1.loc
|
||||
dir = S1.dir
|
||||
|
||||
Reference in New Issue
Block a user