mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Refactors projectile pathing (gameplay change, this will make projectiles more accurate in their linetracing), hitscan light effect improvements (#38933)
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".
This commit is contained in:
committed by
yogstation13-bot
parent
1e2e6a7952
commit
6fee11b7e5
@@ -4,3 +4,20 @@ PROCESSING_SUBSYSTEM_DEF(projectiles)
|
||||
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 ..()
|
||||
|
||||
Reference in New Issue
Block a user