diff --git a/code/game/machinery/turrets.dm b/code/game/machinery/turrets.dm index 6254e2bb9d..d324f3dd9c 100644 --- a/code/game/machinery/turrets.dm +++ b/code/game/machinery/turrets.dm @@ -519,9 +519,5 @@ playsound(src, 'sound/weapons/Gunshot.ogg', 50, 1) var/obj/item/projectile/A = new /obj/item/projectile(curloc) src.projectiles-- - A.current = curloc - A.yo = targloc.y - curloc.y - A.xo = targloc.x - curloc.x - A.process() - sleep(2) + A.launch(target) return diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index 6b43943d53..03234e968e 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -37,7 +37,7 @@ playsound(chassis, fire_sound, fire_volume, 1) projectiles-- var/P = new projectile(curloc) - Fire(P, target, aimloc) + Fire(P, target) if(fire_cooldown) sleep(fire_cooldown) if(auto_rearm) @@ -46,16 +46,9 @@ do_after_cooldown() return -/obj/item/mecha_parts/mecha_equipment/weapon/proc/Fire(atom/A, atom/target, turf/aimloc) +/obj/item/mecha_parts/mecha_equipment/weapon/proc/Fire(atom/A, atom/target) var/obj/item/projectile/P = A - P.shot_from = src.name - P.original = target - P.starting = P.loc - P.current = P.loc - P.firer = chassis.occupant - P.yo = aimloc.y - P.loc.y - P.xo = aimloc.x - P.loc.x - P.process() + P.launch(target) /obj/item/mecha_parts/mecha_equipment/weapon/energy name = "general energy weapon" @@ -235,7 +228,7 @@ projectile_energy_cost = 1000 equip_cooldown = 60 -/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/explosive/Fire(atom/movable/AM, atom/target, turf/aimloc) +/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/explosive/Fire(atom/movable/AM, atom/target) var/obj/item/missile/M = AM M.primed = 1 ..() diff --git a/code/modules/mob/living/bot/ed209bot.dm b/code/modules/mob/living/bot/ed209bot.dm index 570e58ec2e..ac15eca6ce 100644 --- a/code/modules/mob/living/bot/ed209bot.dm +++ b/code/modules/mob/living/bot/ed209bot.dm @@ -56,8 +56,6 @@ return last_shot = world.time - var/turf/T = get_turf(src) - var/turf/U = get_turf(A) var/projectile = /obj/item/projectile/beam/stun if(emagged) @@ -66,13 +64,7 @@ playsound(loc, emagged ? 'sound/weapons/Laser.ogg' : 'sound/weapons/Taser.ogg', 50, 1) var/obj/item/projectile/P = new projectile(loc) - P.original = A - P.starting = T - P.current = T - P.yo = U.y - T.y - P.xo = U.x - T.x - spawn() - P.process() + P.launch(A) return // Assembly diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 899a01c3fa..e80c1becff 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -191,13 +191,7 @@ if (!istype(target, /turf)) qdel(A) return - A.current = target - A.starting = get_turf(src) - A.original = get_turf(target) - A.yo = target:y - start:y - A.xo = target:x - start:x - spawn( 0 ) - A.process() + A.launch(target) return /mob/living/simple_animal/hostile/proc/DestroySurroundings()