@Stefan: never forget your bot is a SERVER-SIDE bot ! Hence you can completely drop off the hooking for Health, Battery, WeapPickup messages and such, because you have direct access to them whenever you want in pEdict->v.health, pEdict->v.armorvalue and pEdict->v.weapons respectively !
In CS 1.6, the max speed is available in pEdict->v.maxspeed
In CS 1.5, the max speed was sent to the clients through a pfnSetClientMaxSpeed() call.
Hence the fix is to always look in pEdict->v.maxspeed, and use pfnSetClientMaxSpeed() like this:
Code:
void SetClientMaxspeed (const edict_t *pEdict, float fNewMaxspeed)
{
// this function tells the client whose player entity is pointed to by pEdict to update its
// maximal running speed to fNewMaxspeed. I don't really get why this function is necessary,
// since the entvars of an entity already feature a "maxspeed" variable, which must be
// trackable in the network pack. There are a lot of weirdosities like this one in the Half-
// Life engine.
// is this client a bot ?
if (players[ENTINDEX ((edict_t *) pEdict) - 1].is_racc_bot)
((edict_t *) pEdict)->v.maxspeed = fNewMaxspeed; // update its max speed (CS 1.5 doesn't)
#ifdef METAMOD
RETURN_META (MRES_IGNORED);
#else
(*g_engfuncs.pfnSetClientMaxSpeed) (pEdict, fNewMaxspeed);
#endif
}