diff --git a/code/game/mecha/combat/honker.dm b/code/game/mecha/combat/honker.dm index 82c68bb63d9..ddde576642d 100644 --- a/code/game/mecha/combat/honker.dm +++ b/code/game/mecha/combat/honker.dm @@ -110,7 +110,7 @@ output += "" return output -/obj/mecha/combat/honker/mechstep(direction) +/obj/mecha/combat/honker/mechstep(direction, old_dir) var/result = step(src, direction) if(result) if(!squeak) @@ -118,6 +118,8 @@ squeak = 1 else squeak = 0 + if(strafe) + set_dir(old_dir) return result /obj/mecha/combat/honker/Topic(href, href_list) diff --git a/code/game/mecha/combat/marauder.dm b/code/game/mecha/combat/marauder.dm index 340730d0d9f..341c24b6e56 100644 --- a/code/game/mecha/combat/marauder.dm +++ b/code/game/mecha/combat/marauder.dm @@ -82,49 +82,43 @@ return ..() -/obj/mecha/combat/marauder/relaymove(mob/user,direction) - if(user != src.occupant) //While not "realistic", this piece is player friendly. - user.forceMove(get_turf(src)) - to_chat(user, "You climb out from [src]") - return 0 +/obj/mecha/combat/marauder/do_move(direction) if(!can_move) - return 0 - if(zoom) - if(world.time - last_message > 20) - src.occupant_message("Unable to move while in zoom mode.") - last_message = world.time - return 0 - if(connected_port) - if(world.time - last_message > 20) - src.occupant_message("Unable to move while connected to the air system port") - last_message = world.time - return 0 + return FALSE + if(!thrusters && src.pr_inertial_movement.active()) - return 0 + return FALSE + if(state || !has_charge(step_energy_drain)) - return 0 - var/tmp_step_in = step_in + return FALSE + var/tmp_step_energy_drain = step_energy_drain var/move_result = 0 - if(internal_damage&MECHA_INT_CONTROL_LOST) + var/old_dir = dir + if(internal_damage & MECHA_INT_CONTROL_LOST) move_result = mechsteprand() - else if(src.dir!=direction) + else if(dir != direction && !strafe) move_result = mechturn(direction) else - move_result = mechstep(direction) + move_result = mechstep(direction, old_dir) if(move_result) + can_move = 0 if(istype(src.loc, /turf/space)) if(!src.check_for_support()) src.pr_inertial_movement.start(list(src,direction)) if(thrusters) src.pr_inertial_movement.set_process_args(list(src,direction)) tmp_step_energy_drain = step_energy_drain*2 - - can_move = 0 - spawn(tmp_step_in) can_move = 1 + else + src.log_message("Movement control lost. Inertial movement started.") + spawn(step_in) + can_move = 1 use_power(tmp_step_energy_drain) - return 1 - return 0 + return TRUE + + return FALSE + + /obj/mecha/combat/marauder/verb/toggle_thrusters() diff --git a/code/game/mecha/medical/medical.dm b/code/game/mecha/medical/medical.dm index a566bbe8cf1..ae20caee36e 100644 --- a/code/game/mecha/medical/medical.dm +++ b/code/game/mecha/medical/medical.dm @@ -7,10 +7,12 @@ playsound(src,'sound/mecha/mechmove01.ogg',40,1) return 1 -/obj/mecha/medical/mechstep(direction) +/obj/mecha/medical/mechstep(direction, old_dir) var/result = step(src,direction) if(result) playsound(src,'sound/mecha/mechstep.ogg',25,1) + if(strafe) + set_dir(old_dir) return result /obj/mecha/medical/mechsteprand()