mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-24 16:06:46 +01:00
subsystem changes (#5332)
1. de-tickers basically everything that doesn't need to be a ticker (so most of them) 2. makes SSdpc not awful (thanks @Lohikar) --------- Co-authored-by: silicons <no@you.cat>
This commit is contained in:
@@ -29,6 +29,7 @@ SUBSYSTEM_DEF(timer)
|
||||
name = "Timer"
|
||||
wait = 1 // SS_TICKER subsystem, so wait is in ticks
|
||||
init_order = INIT_ORDER_TIMER
|
||||
runlevels = RUNLEVELS_ALL
|
||||
priority = FIRE_PRIORITY_TIMER
|
||||
subsystem_flags = SS_TICKER|SS_NO_INIT
|
||||
|
||||
@@ -664,6 +665,10 @@ SUBSYSTEM_DEF(timer)
|
||||
stack_trace("addtimer called with a callback assigned to a qdeleted object. In the future such timers will not \
|
||||
be supported and may refuse to run or run with a 0 wait")
|
||||
|
||||
if (wait == 0 && !flags)
|
||||
SSdpc.queued_calls += callback
|
||||
return
|
||||
|
||||
wait = max(CEILING(wait, world.tick_lag), world.tick_lag)
|
||||
|
||||
if(wait >= INFINITY)
|
||||
|
||||
Reference in New Issue
Block a user