mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Smooth vehicles
This commit is contained in:
@@ -92,7 +92,7 @@
|
||||
bed = null
|
||||
. = ..()
|
||||
if(bed && get_dist(oldloc, loc) <= 2)
|
||||
bed.Move(oldloc)
|
||||
bed.Move(oldloc, get_dir(bed, oldloc), (last_move_diagonal? 2 : 1) * (vehicle_move_delay + config.human_delay))
|
||||
bed.dir = Dir
|
||||
if(bed.has_buckled_mobs())
|
||||
for(var/m in bed.buckled_mobs)
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
origin_tech = "materials=3;engineering=4"
|
||||
|
||||
/obj/vehicle/janicart/Move(atom/OldLoc, Dir)
|
||||
..()
|
||||
. = ..()
|
||||
if(floorbuffer)
|
||||
var/turf/tile = loc
|
||||
if(isturf(tile))
|
||||
|
||||
@@ -153,7 +153,8 @@
|
||||
unbuckle_mob(user)
|
||||
return
|
||||
|
||||
if(world.time < last_vehicle_move + ((last_move_diagonal? 2 : 1) * (vehicle_move_delay + config.human_delay)))
|
||||
var/delay = (last_move_diagonal? 2 : 1) * (vehicle_move_delay + config.human_delay)
|
||||
if(world.time < last_vehicle_move + delay)
|
||||
return
|
||||
last_vehicle_move = world.time
|
||||
|
||||
@@ -161,7 +162,7 @@
|
||||
var/turf/next = get_step(src, direction)
|
||||
if(!Process_Spacemove(direction) || !isturf(loc))
|
||||
return
|
||||
step(src, direction)
|
||||
Move(get_step(src, direction), direction, delay)
|
||||
|
||||
if((direction & (direction - 1)) && (loc == next)) //moved diagonally
|
||||
last_move_diagonal = TRUE
|
||||
@@ -185,7 +186,7 @@
|
||||
to_chat(user, "<span class='warning'>You'll need the keys in one of your hands to drive [src].</span>")
|
||||
|
||||
|
||||
/obj/vehicle/Move(NewLoc, Dir = 0, step_x = 0, step_y = 0)
|
||||
/obj/vehicle/Move(NewLoc, Dir = 0, movetime)
|
||||
. = ..()
|
||||
handle_vehicle_layer()
|
||||
handle_vehicle_offsets()
|
||||
|
||||
Reference in New Issue
Block a user