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

Use actual bots instead of fake client for interpolation, fix bots having no sound, increase bots limit, reworked name update logic #340

Merged
merged 6 commits into from
Jul 15, 2022

Conversation

zer0k-z
Copy link
Contributor

@zer0k-z zer0k-z commented Jun 6, 2022

Resolves #335.

A fake client is not a bot. The client doesn't store data for interpolation if the bot isn't initialized properly. Using bot_add should preserve the "no bot in server" behavior. Modifying bot_quota cvar is also an option, but that might mess with other plugins that happen to use bots as well.

Bot name updating now no longer requires the player to be put out of spectator mode, spec_target_updated event is fired instead.

@Szwagi
Copy link
Contributor

Szwagi commented Jun 9, 2022

Does bot_kick behave as intended when there are 2 bots with the same name?

@zer0k-z
Copy link
Contributor Author

zer0k-z commented Jun 9, 2022

bot_add should ensure that they don't share the same name. More precisely, the server take a profile from a bot inside BotProfile.db, and as long as that file doesn't have duplicates, there won't be 2 bots with the same name.

@zer0k-z
Copy link
Contributor Author

zer0k-z commented Jun 9, 2022

On why this fix works, it seems like previously the bot manager was responsible for generating user commands for bots, and the fake client isn't managed by the bot manager and doesn't generate a proper user command by themselves either, therefore breaking the interpolation process.

@zealain zealain merged commit 5a80d96 into KZGlobalTeam:dev Jul 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants