![]() |
Re: Something about msecval
[Off-topic]
I think there are alot of tiny bots out there on the net, afterall with Botman's template code and readme, it's amazingly easy to get a basic bot in a mod. As for my bot, I released the first version a month ago or so, but it's nothing more than a modified HPBbot. It's for the mod Science and Industry (www.planethalflife.com/si) and it's more like a "Can I pull it off" release. There's some errors in the logic (Bots really like to kill scis) and it only comes with waypoints for 1 map. And it's not fully compatible with the latest version (97b). Try it if you like, but don't expect too much http://users.pandora.be/piele/MBFbot.zip . These days I seem to be stuck in an endless redesign cycle, I simply can not decide on what's the best way to handle things, so I keep changing stuff around :/ [/Offtopic] |
Re: Something about msecval
Quote:
|
Re: Something about msecval
@Bert: Okay, well, good luck, and btw when you come up with a "production release" of your bot we can make you part of Bots United perhaps (website, forum, etc.) :)
@botmeister: I find it curious that you never did. It's the way to do things, all CS bots hook pfnSetClientMaxSpeed() actually ! How come you never tried that ? |
Re: Something about msecval
Quote:
I'm not sure how you would use the function just yet void (*pfnSetClientMaxspeed) (const edict_t *pEdict, float fNewMaxspeed); Can you give me a hint or two to move things along? |
Re: Something about msecval
in your array of bots, have a variable for each bot to store its current max speed. When pfnSetClientMaxspeed() is called upon a bot entity, send fNewMaxspeed to this variable. And when pfnRunPlayerMove() happens for the same bot, use this variable as the move_speed and strafe_speed parameter (if you want to make the bot run or strafe full speed, else divide it by two.)
|
Re: Something about msecval
Quote:
Anyhow, what I'm doing is simply passing on everything I get from the pfnRunPlayerMove() hook which was called by the actual bot mod, so I don't understand why on some servers the bots run around real fast. I'll have another look at my code, perhaps there's a problem with passing on the same speeds all the time. |
Re: Something about msecval
[QUOTE=Are you sure your problem comes from here ?[/QUOTE]
And if I use this code: if (pBot->msecdel <= gpGlobals->time) { pBot->msecdel = gpGlobals->time + 1.0; if (pBot->msecnum > 0) pBot->msecval = 800/pBot->msecnum; pBot->msecnum = 0; } else pBot->msecnum++; if (pBot->msecval < 1) pBot->msecval = 1; if (pBot->msecval > 100) pBot->msecval = 100; bots move slowly (I with primary weapon run faster, than they with a knife). Also do not freeze. |
Re: Something about msecval
@ botmeister: each time a player switches to a new weapon, his run speed changes. The function that the MOD code calls in the engine to change the client's max speed is SetClientMaxSpeed(). So yes, grab the value that is passed, and use it for your bots ; i.e. do this:
Code:
void pfnSetClientMaxspeed (const edict_t *pEdict, float fNewMaxspeed) |
Re: Something about msecval
2 Pierre-Marie Baty: It not a problem cs1.6. In cs1.5 all too most, but time of freezing is longer.
|
Re: Something about msecval
curious...
does it occur also if you set the mp_freezetime CVAR to 0 ? |
All times are GMT +2. The time now is 04:04. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.