mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-26 18:12:40 +00:00
Fixes non-hitscan projectiles not having muzzle fire effects. (#16902)
Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
@@ -372,6 +372,7 @@
|
||||
if(hitscan)
|
||||
return process_hitscan()
|
||||
else
|
||||
generate_muzzle_flash()
|
||||
if(!isprocessing)
|
||||
START_PROCESSING(SSprojectiles, src)
|
||||
pixel_move(1) //move it now!
|
||||
@@ -616,6 +617,19 @@
|
||||
STOP_PROCESSING(SSprojectiles, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/projectile/proc/generate_muzzle_flash(duration = 3)
|
||||
if(duration <= 0)
|
||||
return
|
||||
if(!muzzle_type || silenced)
|
||||
return
|
||||
var/datum/point/p = trajectory
|
||||
var/atom/movable/thing = new muzzle_type
|
||||
p.move_atom_to_src(thing)
|
||||
var/matrix/M = new
|
||||
M.Turn(original_angle)
|
||||
thing.transform = M
|
||||
QDEL_IN(thing, duration)
|
||||
|
||||
/obj/item/projectile/proc/generate_hitscan_tracers(cleanup = TRUE, duration = 3)
|
||||
if(!length(beam_segments))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user