Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] Fixes AI lag by re-adding idle mode to all AI that was lost with the simple mob to basic mob conversion. #2854

Merged
merged 1 commit into from
Apr 13, 2024

Conversation

Steals-The-PRs
Copy link
Collaborator

Mirrored on Nova: NovaSector/NovaSector#1949
Original PR: tgstation/tgstation#82539

About The Pull Request

Fixes AI lag by re-adding idle mode to all AI that was lost with the simple mob to basic mob conversion.
AI controllers with no clients around for 14 tiles will move into idle mode and stop planning or acting.
AI controllers will now record how much time was spent on planning or un-idling AI controllers.
Mooks and Bots do not currently idle as we want them to be working off-screen for game design purposes.

Why It's Good For The Game

This is an important anti-lag feature that was implemented for simple animals back in the day that never made it to basic mobs or the AI system. We have roughly 250-300+ AI controllers roundstart, with the bulk majority on Lavaland. There is no point in processing things that nobody can see.

Once LemonInTheDark finishes their more advanced system for this, we can utilize that for dynamically waking/sleeping AI based on contextual interest, but for now we might as well implement what we had originally to resolve this issue.

Changelog

🆑 Iamgoofball
fix: Fixes AI lag by re-adding idle mode to all AI that was lost with the simple mob to basic mob conversion.
fix: AI controllers with no clients around for 14 tiles will move into idle mode and stop planning or acting.
fix: AI controllers will now record how much time was spent on planning or un-idling AI controllers.
/:cl:

…with the simple mob to basic mob conversion. (#1949)

* Fixes AI lag by re-adding idle mode to all AI that was lost with the simple mob to basic mob conversion. (#82539)

* 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 <[email protected]>
@ReezeBL ReezeBL merged commit f114fd3 into master Apr 13, 2024
26 checks passed
AnywayFarus added a commit that referenced this pull request Apr 13, 2024
@Iajret Iajret deleted the upstream-mirror-1949 branch April 14, 2024 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants