Quote:
Originally Posted by Pierre-Marie Baty
when the time limit is reached it's the GAME DLL which decides of the level change, not the engine. The game DLL thus tells the engine about the level change, by calling ServerDeactivate() properly, followed by a new ServerActivate(). Then the engine executes the level change, *upon GameDLL command* (and not by itself). Since the game DLL calls them in the engine, our bot DLL can hook them.
Were it the engine only, that decided to change maps, not only the server would be shutdown abruptly (because the game DLL wouldn't even be told), but we couldn't even hook it since nothing from the process passes through the bot DLL.
|
Pierre, we ought to be able to get something that's not ugly to work for this.
I don;t have my head fully wrapped around the problem yet, so please bare with me if I ask you a few silly questions.
With a CHANGELEVEL command, it seems the server will autokick all the bots out and on next round they won't automatically respawn unless your bot code does this. The problem is knowing how many bots to respawn and what the status of each bot was (eg skin, skill, ect)
Correct?
Some assumptions:
a. CHANGELEVEL is the only way to change a map without knowing in advance.
b. All other methods to change a map can be trapped in advance.
c. We can always reliably detect when a new map has loaded.
My first question:
Why won't this work?
On each new map detection, you should be able to scan through your bot list, and for each bot that is flagged as "spawned" but is missing, you respawn it. I am assuming that your bot code will keep all the needed details inside your bot list structure.