mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
cl experimental: Hitscanning tracers now have lighting effects experimental: Projectile pathing has been changed - instead of moving to a turf 32 pixels forward using byond's built in step_towards() proc, it now increments 2 pixel 16 times (subject to change). While this will increase the processing overhead, this will more or less eliminate cases of "projectiles clipping past corners in some angles but not others".
24 lines
708 B
Plaintext
24 lines
708 B
Plaintext
PROCESSING_SUBSYSTEM_DEF(projectiles)
|
|
name = "Projectiles"
|
|
wait = 1
|
|
stat_tag = "PP"
|
|
flags = SS_NO_INIT|SS_TICKER
|
|
var/global_max_tick_moves = 10
|
|
var/global_pixel_speed = 2
|
|
var/global_iterations_per_move = 16
|
|
|
|
/datum/controller/subsystem/processing/projectiles/proc/set_pixel_speed(new_speed)
|
|
global_pixel_speed = new_speed
|
|
for(var/i in processing)
|
|
var/obj/item/projectile/P = i
|
|
if(istype(P)) //there's non projectiles on this too.
|
|
P.set_pixel_speed(new_speed)
|
|
|
|
/datum/controller/subsystem/processing/projectiles/vv_edit_var(var_name, var_value)
|
|
switch(var_name)
|
|
if(NAMEOF(src, global_pixel_speed))
|
|
set_pixel_speed(var_value)
|
|
return TRUE
|
|
else
|
|
return ..()
|