Skip to content

Commit

Permalink
powerloader vehicle woes
Browse files Browse the repository at this point in the history
  • Loading branch information
harryob committed Sep 19, 2023
1 parent 3eac27d commit 65cc73f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
6 changes: 6 additions & 0 deletions code/modules/vehicles/multitile/multitile_movement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@

var/success = FALSE

if(direction & (direction - 1))
if(direction & EAST)
direction &= ~(EAST)
if(direction & WEST)
direction &= ~(WEST)

if(dir == turn(direction, 180) || dir == direction)
var/old_dir = dir
success = try_move(direction)
Expand Down
6 changes: 3 additions & 3 deletions code/modules/vehicles/powerloader.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,19 @@
if(user.is_mob_incapacitated())
return
if(world.time > l_move_time + move_delay)
if(dir != direction)
l_move_time = world.time
if(dir != direction && !moving_diagonally)
setDir(direction)
handle_rotation()
pick(playsound(src.loc, 'sound/mecha/powerloader_turn.ogg', 25, 1), playsound(src.loc, 'sound/mecha/powerloader_turn2.ogg', 25, 1))
. = TRUE
else
set_glide_size(DELAY_TO_GLIDE_SIZE(move_delay + 1))
. = step(src, direction)
if(.)
pick(playsound(loc, 'sound/mecha/powerloader_step.ogg', 25), playsound(loc, 'sound/mecha/powerloader_step2.ogg', 25))

/obj/vehicle/powerloader/handle_rotation()
if(buckled_mob)
if(buckled_mob && !buckled_mob.moving_diagonally)
buckled_mob.setDir(dir)
switch(dir)
if(EAST)
Expand Down
1 change: 0 additions & 1 deletion code/modules/vehicles/vehicle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
layer = ABOVE_MOB_LAYER //so it sits above objects including mobs
density = TRUE
anchored = TRUE
animate_movement = 1
can_buckle = TRUE

// The mobs that are in each position/seat of the vehicle
Expand Down

0 comments on commit 65cc73f

Please sign in to comment.