Re: NEW STEAM: Failure on detecting round, how do YOU do it? -
16-02-2004
I don't like any of the methods, they are all ugly and inaccurate options to choose from. This is not my opinion, I before reading this, I did extensive tests to see if I could find a good solution, I explored each of the options mentioned and they all have problems.
At this point, the statsme code is the only code that will work most of the time, and possibly all the time.
All the other methods do not work 100% and some probably don't even work at all, like the HLTV message detection because the HLTV message is sent at regular intervals during a round and not just during a round start. I gave up on that method quickly.
The RoundTimer message is sent ONLY when there are players in a game. This may work fine for some plugins, but is of no use to plugins that require knowing when a round started no matter if there are players in game or not. Also, because the round start is detected only when the round ends, you should also check for "worldspawn" to detect a fresh mapload or first round after the server started. The problem with "worlspawn" is that there is a delay from that activity to when the round actually starts, so your timing may be off by a few seconds.
In each case, multiple messages will be detected, meaning your code will detect multiple round starts for every round start! This can lead to problems. For example, knowing when the round actually started is not accurate. If you stop your bots from moving until after the roundstart delay, your bots will be stuck for a few seconds after the delay passed depending on when the last round start message was detected.
It's just damn UGLY!
I'll keep searching for a good solution. Does anyone know how to monitor the roundtimer? That's the time telling you how much time is left in the round. I don't think this will help by itself, but it may be part of a foolproof solution.
This is what you get for hacking into someone else's code.
Maker of the (mEAn) Bot.Admin Manager
"In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. van de Snepscheut
|