mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Guncode Agony 4.2: Firing Effect Intervallo (#88072)
## About The Pull Request Firing effects now attach themselves to the firer, meaning you don't run over or back from your own muzzle flash if you fire while running. ## Why It's Good For The Game Look better, both when moving into and away from the effect. ## Changelog 🆑 image: Muzzle flash now is attached to your sprite, meaning you won't run over it if you fire while moving /🆑
This commit is contained in:
@@ -57,6 +57,12 @@
|
||||
icon_state = "firing_effect"
|
||||
duration = 3
|
||||
|
||||
/obj/effect/temp_visual/dir_setting/firing_effect/Initialize(mapload, set_dir)
|
||||
. = ..()
|
||||
if (ismovable(loc))
|
||||
var/atom/movable/spawned_inside = loc
|
||||
spawned_inside.vis_contents += src
|
||||
|
||||
/obj/effect/temp_visual/dir_setting/firing_effect/setDir(newdir)
|
||||
switch(newdir)
|
||||
if(NORTH)
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
if(loaded_projectile.firer)
|
||||
firing_dir = get_dir(fired_from, target)
|
||||
if(!loaded_projectile.suppressed && firing_effect_type && !tk_firing(user, fired_from))
|
||||
new firing_effect_type(get_turf(src), firing_dir)
|
||||
new firing_effect_type(user || get_turf(src), firing_dir)
|
||||
|
||||
var/direct_target
|
||||
if(target && curloc.Adjacent(targloc, target=targloc, mover=src)) //if the target is right on our location or adjacent (including diagonally if reachable) we'll skip the travelling code in the proj's fire()
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
projectile_obj.hit_prone_targets = shooter.combat_mode
|
||||
projectile_obj.fire()
|
||||
if(!projectile_obj.suppressed && firing_effect_type)
|
||||
new firing_effect_type(get_turf(src), chassis.dir)
|
||||
new firing_effect_type(chassis || get_turf(src), chassis.dir)
|
||||
playsound(chassis, fire_sound, 50, TRUE)
|
||||
|
||||
log_combat(source, target, "fired [projectile_obj] at", src, "from [chassis] at [get_area_name(src, TRUE)]")
|
||||
|
||||
Reference in New Issue
Block a user