.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   Something about msecval (http://forums.bots-united.com/showthread.php?t=344)

Pierre-Marie Baty 03-02-2004 01:05

Re: Something about msecval
 
"sv_maxspeed was not initialized correctly" because sv_maxspeed is a server CVAR, not a client one, which means that if the game DLL chooses to rely on this value for the players' movements, ALL the players will run at the same speed all the time. This can't be, because CS lets players have different run speeds given the weapon they are carrying. That's why the game DLL of Counter-Strike does NOT rely on sv_maxspeed, but let the clients adapt their max speeds individually, unlike other MODs which don't feature different player run speeds.

strelok 03-02-2004 08:21

Re: Something about msecval
 
2 Pierre-Marie Baty vbmenu_register("postmenu_4927", true);
You function (void SetSpeed (bot_t *pBot)) only for CS 1.5? Where weapon FAMAS, GALIL?


Pierre-Marie Baty 03-02-2004 11:17

Re: Something about msecval
 
right, it's not "my" function, really ; it's eLiTe's function (which he had in his TEAMbot). You'll have to figure out yourself what are the player's max speed when you are carrying a FAMAS or a GALIL.

But I suggest you rather use pBot->pEdict->v.maxspeed like KaCaT said.

Pierre-Marie Baty 03-02-2004 12:25

Re: Something about msecval
 
BTW, KaCaT, does pEdict->v.maxspeed also work for CS 1.5 ?

KaCaT 03-02-2004 16:02

Re: Something about msecval
 
No, it doesn't works for CS 1.5. The value it gives for bots in CS 1.5 always is 1000 8o

Pierre-Marie Baty 03-02-2004 19:44

Re: Something about msecval
 
then how about this instead:
Code:

void pfnSetClientMaxspeed (const edict_t *pEdict, float fNewMaxspeed)
{
  // update this client's max speed (Counter-Strike 1.5 doesn't do it right)
  ((edict_t *) pEdict)->v.maxspeed = fNewMaxspeed;
  (*g_engfuncs.pfnSetClientMaxspeed) (pEdict, fNewMaxspeed);
}

:)

strelok 06-02-2004 07:54

Re: Something about msecval
 
With a speed everything is all right. Thanks. :)
But the problem with freezing has remained. :(

strelok 08-02-2004 13:39

Re: Something about msecval
 
What value should be up to freeze time and what after?

Pierre-Marie Baty 08-02-2004 17:22

Re: Something about msecval
 
the bot's maxspeed should be kept at 0 before freeze time, and raised to the normal value (pBot->pEdict->v.maxspeed in CS 1.6 or f_max_speed passed in pfnSetClientMaxSpeed() in CS 1.5) immediately after it. But I'm not sure your problem comes from here...

Dysangel 30-05-2018 19:16

Re: Something about msecval
 
This is a long shot, but does anyone still have the TEAMbot source code? I would appreciate it if you could mail to me at nboxelite@hotmail.com

I am making multiplayer game in Unreal Engine and would like to use my old bot perception code as a reference, since I had spent a lot of time tweaking it to be fun to play against

I lost the original code a long time ago after a power surge destroyed my PC. Since then I have realised the importance of backups :p


All times are GMT +2. The time now is 14:50.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.