mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-21 12:08:55 +01:00
[MIRROR] Fixes AI lag by re-adding idle mode to all AI that was lost with the simple mob to basic mob conversion. (#27296)
Fixes AI lag by re-adding idle mode to all AI that was lost with the simple mob to basic mob conversion. Co-authored-by: Iamgoofball <iamgoofball@gmail.com> Co-authored-by: Waterpig <wtryoutube@seznam.cz>
This commit is contained in:
co-authored by
Iamgoofball
Waterpig
parent
89677f37ba
commit
2429a2821a
@@ -27,6 +27,7 @@
|
||||
var/current_pathing_attempts = 0
|
||||
///if we cant reach it after this many attempts, add it to our ignore list
|
||||
var/max_pathing_attempts = 25
|
||||
can_idle = FALSE // we want these to be running always
|
||||
|
||||
/datum/ai_controller/basic_controller/bot/TryPossessPawn(atom/new_pawn)
|
||||
. = ..()
|
||||
|
||||
@@ -26,6 +26,7 @@ GLOBAL_LIST_INIT(mook_commands, list(
|
||||
/datum/ai_planning_subtree/mine_walls/mook,
|
||||
/datum/ai_planning_subtree/wander_away_from_village,
|
||||
)
|
||||
can_idle = FALSE // these guys are intended to operate even if nobody's around
|
||||
|
||||
///check for faction if not a ash walker, otherwise just attack
|
||||
/datum/targeting_strategy/basic/mook/faction_check(datum/ai_controller/controller, mob/living/living_mob, mob/living/the_target)
|
||||
|
||||
@@ -173,7 +173,6 @@
|
||||
/mob/living/basic/living_limb_flesh/proc/wake_up(atom/limb)
|
||||
visible_message(span_warning("[src] begins flailing around!"))
|
||||
Shake(6, 6, 0.5 SECONDS)
|
||||
ai_controller.set_ai_status(AI_STATUS_ON)
|
||||
ai_controller.set_ai_status(AI_STATUS_IDLE)
|
||||
forceMove(limb.drop_location())
|
||||
qdel(limb)
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
var/fake_dt = SSai_controllers.wait * 0.1
|
||||
// Set AI - AIs by default are off in z-levels with no client, we have to force it on.
|
||||
biter.ai_controller.set_ai_status(AI_STATUS_ON)
|
||||
biter.ai_controller.can_idle = FALSE
|
||||
// Select behavior - this will queue finding the cable
|
||||
biter.ai_controller.SelectBehaviors(fake_dt)
|
||||
// Process behavior - this will execute the "locate the cable" behavior
|
||||
|
||||
Reference in New Issue
Block a user