mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 00:58:26 +01:00
Converts AI controller processing subsystems to use currentrun (#94905)
## About The Pull Request this makes it so `SSai_controllers` and its subtypes use a `currentrun` loop, instead of directly looping thru `GLOB.ai_controllers_by_status[planning_status]` ## Why It's Good For The Game most other processing subsystems do this, why shouldn't we? it should ensure all ai controllers get to process, even if the server's under load. ## Changelog no player-facing changes, prolly
This commit is contained in:
@@ -84,6 +84,10 @@ multiple modular subtrees with behaviors
|
||||
UnpossessPawn(FALSE)
|
||||
if(ai_status)
|
||||
GLOB.ai_controllers_by_status[ai_status] -= src
|
||||
for(var/datum/controller/subsystem/ai_controllers/controller_subsystem in Master.subsystems)
|
||||
if(controller_subsystem.planning_status == ai_status)
|
||||
controller_subsystem.currentrun -= src
|
||||
break
|
||||
our_cells = null
|
||||
set_movement_target(type, null)
|
||||
if(ai_movement.moving_controllers[src])
|
||||
@@ -431,6 +435,10 @@ multiple modular subtrees with behaviors
|
||||
//remove old status, if we've got one
|
||||
if(ai_status)
|
||||
GLOB.ai_controllers_by_status[ai_status] -= src
|
||||
for(var/datum/controller/subsystem/ai_controllers/controller_subsystem in Master.subsystems)
|
||||
if(controller_subsystem.planning_status == ai_status)
|
||||
controller_subsystem.currentrun -= src
|
||||
break
|
||||
remove_from_unplanned_controllers()
|
||||
stop_previous_processing()
|
||||
ai_status = new_ai_status
|
||||
|
||||
Reference in New Issue
Block a user