From 47d849f84934b593ca86941ec4402fd55ea7ad05 Mon Sep 17 00:00:00 2001 From: Drulikar Date: Sat, 2 Nov 2024 02:00:41 -0500 Subject: [PATCH 1/2] Fix sentries mismatching firer and shooter --- code/modules/defenses/sentry.dm | 2 +- code/modules/defenses/sentry_flamer.dm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/defenses/sentry.dm b/code/modules/defenses/sentry.dm index 6c9c5ad68fea..02bccde9fa37 100644 --- a/code/modules/defenses/sentry.dm +++ b/code/modules/defenses/sentry.dm @@ -313,7 +313,7 @@ new_projectile.damage *= damage_mult new_projectile.accuracy *= accuracy_mult GIVE_BULLET_TRAIT(new_projectile, /datum/element/bullet_trait_iff, faction_group) - new_projectile.fire_at(target, src, owner_mob, new_projectile.ammo.max_range, new_projectile.ammo.shell_speed, null, FALSE) + new_projectile.fire_at(target, owner_mob, src, new_projectile.ammo.max_range, new_projectile.ammo.shell_speed, null, FALSE) muzzle_flash(Get_Angle(get_turf(src), target)) ammo.current_rounds-- track_shot() diff --git a/code/modules/defenses/sentry_flamer.dm b/code/modules/defenses/sentry_flamer.dm index 2c5e9ae62677..fb6b8d199e1e 100644 --- a/code/modules/defenses/sentry_flamer.dm +++ b/code/modules/defenses/sentry_flamer.dm @@ -32,7 +32,7 @@ var/obj/projectile/P = new(create_cause_data(initial(name), owner_mob)) P.generate_bullet(new ammo.default_ammo) GIVE_BULLET_TRAIT(P, /datum/element/bullet_trait_iff, faction_group) - P.fire_at(A, src, owner_mob, P.ammo.max_range, P.ammo.shell_speed, null) + P.fire_at(A, owner_mob, src, P.ammo.max_range, P.ammo.shell_speed, null) ammo.current_rounds-- track_shot() if(ammo.current_rounds == 0) From f27a0c0a4aa45998bcced324f4a87332a6795c72 Mon Sep 17 00:00:00 2001 From: Drulikar Date: Sat, 2 Nov 2024 02:13:11 -0500 Subject: [PATCH 2/2] Fix cause_data for sentry flamer --- code/modules/defenses/sentry_flamer.dm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/modules/defenses/sentry_flamer.dm b/code/modules/defenses/sentry_flamer.dm index fb6b8d199e1e..fcdd54708609 100644 --- a/code/modules/defenses/sentry_flamer.dm +++ b/code/modules/defenses/sentry_flamer.dm @@ -28,11 +28,11 @@ accuracy_mult = 0.1 fire_delay = 0.5 -/obj/structure/machinery/defenses/sentry/flamer/actual_fire(atom/A) - var/obj/projectile/P = new(create_cause_data(initial(name), owner_mob)) - P.generate_bullet(new ammo.default_ammo) - GIVE_BULLET_TRAIT(P, /datum/element/bullet_trait_iff, faction_group) - P.fire_at(A, owner_mob, src, P.ammo.max_range, P.ammo.shell_speed, null) +/obj/structure/machinery/defenses/sentry/flamer/actual_fire(atom/target) + var/obj/projectile/new_projectile = new(src, create_cause_data(initial(name), owner_mob, src)) + new_projectile.generate_bullet(new ammo.default_ammo) + GIVE_BULLET_TRAIT(new_projectile, /datum/element/bullet_trait_iff, faction_group) + new_projectile.fire_at(target, owner_mob, src, new_projectile.ammo.max_range, new_projectile.ammo.shell_speed, null, FALSE) ammo.current_rounds-- track_shot() if(ammo.current_rounds == 0)