Author
|
Message
|
AlliedModders Donor
|
05-14-2017
, 11:28
[CS:GO] Two small questions about bots
|
#1
|
Currently doing some refactorings in my Timer replay plugin, and got two questions about how bots work together with SM/in general:
1.) Does the CreateFakeClient() function do the same as ServerCommand("bot_add")?
As in, create bots which can be controlled through OnPlayerRunCmd?
Looking at the C++ implementation, it calls engine->CreateFakeClient, while bot_add runs through some more boilerplate code (command handling).
2.) The infamous error "Could not add bot, the game is full", happens quite often as soon as the server reaches 40+ real players on certain maps.
Now, I have already looked into this some time ago, and tried to overcome the problem by manually creating some more info_terrorist_spawn/info_ct_spawn entities in the same origin as one randomly picked, already existing spawn, but that didn't help either.
Looking at some reverse engineered SE2007 binaries, it seems like the amount of available spawns is cached in GameRules::Think() only once (if m_bInitalized is not set).
Now, I would have thought about maybe doing the same thing I have already tried (creating spawns manually), and just patch out the check in the CreateFakeClient/bot_add command, but considering I am only a beginner in RE, that wouldn't be quite easy for me.
Did anyone else have that problem already and somehow found a solution for it?
__________________
Stopped hosting servers as of November 2018, no longer active around here.
|
|
|
|