Cstrike now uses a hash table in the mod to cache calls to
pfnFindEntityByString(), so you won't be able to intercept them any
longer. You could intercept pfnMessageBegin(), the following set of
calls should be unique to round start:

        // reset all players health for HLTV
        MESSAGE_BEGIN( MSG_SPEC, gmsgHLTV );
                WRITE_BYTE( 0 );        // 0 = all players
                WRITE_BYTE( 100 | 128 );
        MESSAGE_END();

        // reset all players FOV for HLTV
        MESSAGE_BEGIN( MSG_SPEC, gmsgHLTV );
                WRITE_BYTE( 0 );        // all players
                WRITE_BYTE( 0 );
        MESSAGE_END();


Note that the bot fix was done independently of the entity hashing.



> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> S. Hendriks
> Sent: Friday, February 13, 2004 6:20 AM
> To: HL Coders List
> Subject: [hlcoders] STEAM Update and messing up bots (Again)
>
> Although with good intentions to fix stuff for bots, Valve
> did it again
> and broke bot support.
>
> I see the bit flags are now working again, thats very nice.
> Although it
> does not matter anymore for any bot author on CS as we adapted our own
> fix a loooong time ago. Nevertheless we switch back to ensure
> we are not
> doing things that the engine does not like.
>
> I also see my bots do not detect a new round anymore, i have done this
> via:
>
> edict_t* pfnFindEntityByString(edict_t *pEdictStartSearchAfter, const
> char *pszField, const char *pszValue)
> {
>       // Counter-Strike - New Round Started
>       if (strcmp(pszValue,"info_map_parameters") == 0)        {
>
>               // New round started.
>               Game.SetNewRound(true);
>         Game.SetRoundTime(gpGlobals->time);
>       }
>
>    RETURN_META_VALUE (MRES_IGNORED, NULL);
> }
>
> This worked all th etime, it worked for CS 1.5 and CS 1.6. My question
> is:
>
> Is there a new way to detect round start? Is there a message
> sent or is
> there some other method to know the new round has started?
> Since the new
> Steam update i am trown back into fixing a bug again that is not even
> mine.
>
> Suggestion:
> - When releasing fixes for bots, TEST THEM FIRST.
>
> Wait, let me rephrase that:
> - When releasing ANYTHING, TEST IT FIRST (and ofcourse, with
> everything.
> Run a bot server, run a metamod server)
>
> I don't mind waiting a bit longer if i am sure the next STEAM
> updates do
> actually do what they claim to do.
>
> -Stefan
> http://realbot.bots-united.com
>
>
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list
> archives, please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to