Open d47081 opened 7 months ago
Well, in last commit have fixed players online counter and make code optimizations:
BotCreate
- as calling twicecount
variable to online
as more clear, defined it also on init with integer data typeAfter this commit I need additional time for tests, it looks better just doubts that everything stable.
Last 2 commits includes:
max_bots
, this bug was depended of real players quantity in previous session)CBot::Spawn
state now BOT_IS_RESPAWNING
instead of BOT_IDLE
/ is_used
is TRUE
testing..
Everything works, but I found bots and players sometimes freeze / stuck - maybe after disconnection. It happened on high online and/or session is closer to map rotate.
I think this problem related with slot.state
changes, it's not frames or CPU issue as debug of timing works well.
Update for PR #422
Removes bot state reset on bot thinking, also the
kicked
state was changed fromBOT_IDLE
toBOT_NEED_TO_RESPAWN
I think this model more useful in bot container and looks not conflicting with it logic. That allows to respawn configured bots only (from queue not from default
BOT_IDLE
slots registry)Solution looks stable, but please let me test it for few days before merge.