.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Releases, Installers, Docs & Coding (http://forums.bots-united.com/forumdisplay.php?f=48)
-   -   POD-bot back into shape. (http://forums.bots-united.com/showthread.php?t=833)

sPlOrYgOn 01-04-2004 06:34

Re: POD-bot back into shape.
 
time to test my C++ debugging skills :D
[edit]
it might be because he removed that flag to fix the glass problem...
because when i join a map that I don't have waypoints for the map is brighter.. but when i join a map with waypoints and add bots the map looks darker..
[/edit]
[edit2]
i noticed that
Code:

/*  for (i = gpGlobals->maxClients + 1; i < gpGlobals->maxEntities; i++)
  {
      pent = INDEXENT (i);

      if (!FNullEnt (pent)
          && (strcmp (STRING (pent->v.classname), "func_wall") == 0)
          && (pent->v.rendermode == kRenderTransTexture))
        pent->v.flags &= ~FL_WORLDBRUSH;
  }*/

was commented out.. wasn't this the glass fix?
[/edit2]
[edit3]
i don't get it.. i used to be able to compile.. but now it says i'm missing files that metamod requires like pthread.h, unistd.h, and dlfcn.h...
[/edit3]
[edit4]
uncommented it and it did nothing :o
i know absolutely nothing :D
[/edit4]
[edit5]
this is probably one of the reasons to have a cvs repository...
then we could look at what got changed and see if theres a screw up somewhere..
[/edit5]

Pierre-Marie Baty 01-04-2004 07:56

Re: POD-bot back into shape.
 
It looks like I've done something wrong again !

Don't go to bed just yet, there might be a little fix in 1/2 an hour or so.....

sPlOrYgOn 01-04-2004 07:59

Re: POD-bot back into shape.
 
don't worry.. its barely 21:00 over here :D

Pierre-Marie Baty 01-04-2004 08:12

Re: POD-bot back into shape.
 
HERE's the fix fix fix!
Code:

void UTIL_ClampAngle (float *fAngle)
{
  // Whistler, TEST your bugfixes before submitting them!!! :D
  if (*fAngle >= 180)
          *fAngle -= 360 * ((int) (*fAngle / 360) + 1); // and not 0.5
  if (*fAngle < -180)
          *fAngle += 360 * ((int) (-*fAngle / 360) + 1); // and not 0.5
  if ((*fAngle >= 180) || (*fAngle < -180))
          *fAngle = 0; // heck, if we're still above the limit then something's REALLY fuckedup!
}

void UTIL_ClampVector (Vector *vecAngles)
{
  // Whistler, TEST your bugfixes before submitting them!!! :D
  if (vecAngles->x >= 180)
          vecAngles->x -= 360 * ((int) (vecAngles->x / 360) + 1); // and not 0.5
  if (vecAngles->x < -180)
          vecAngles->x += 360 * ((int) (-vecAngles->x / 360) + 1); // and not 0.5
  if (vecAngles->y >= 180)
          vecAngles->y -= 360 * ((int) (vecAngles->y / 360) + 1); // and not 0.5
  if (vecAngles->y < -180)
          vecAngles->y += 360 * ((int) (-vecAngles->y / 360) + 1); // and not 0.5
  vecAngles->z = 0.0;
  if (vecAngles->x > 89)
          vecAngles->x = 89;
  else if (vecAngles->x < -89)
          vecAngles->x = -89;
  if ((vecAngles->x >= 180) || (vecAngles->x < -180))
          vecAngles->x = 0; // heck, if we're still above the limit then something's REALLY fuckedup!
  if ((vecAngles->y >= 180) || (vecAngles->y < -180))
          vecAngles->y = 0; // heck, if we're still above the limit then something's REALLY fuckedup!
}

I'm compiling a nunux library and then I'll wrap all this up together in a .zip file.

sPlOrYgOn 01-04-2004 08:14

Re: POD-bot back into shape.
 
You're quick finding this stuff :D
[edit]
you're right i changed it and it worked :D
[/edit]

Pierre-Marie Baty 01-04-2004 08:38

Re: POD-bot back into shape.
 
lol, 4 years experience always make a difference :D

the bot is uploaded
http://racc.bots-united.com/releases/podbot.zip
this one should work as expected...

sPlOrYgOn 01-04-2004 08:54

Re: POD-bot back into shape.
 
good job :D
they work!

Austin 01-04-2004 11:05

Re: POD-bot back into shape.
 
Pm, does this email no longer work for you?
pm@racc-ai.com
I put in a menu SF wanted and tried to send you the modifield files but the email bounced. Send me your latest email please.

I added a new menu for SF to set the autopathMaxDistance.
I add two commands.
wpmenu autopathmaxdistance
wpmenu apmd
They both will bring up the same menu that lets you set the auto path max distance.

You can get the source code changes here:
http://austinbots.com/misc/pod2.6Changes.zip

To make it easy for you to put these changes into your code I commented the changes with:
// ??? ABS
Here are the places that were changed:
----------------------------------------
C:\CS\DEV\BOTS\PM POD2.6\PODBOT\SRC\bot.h(280): // ??? ABS menu to ----------------------------------------
C:\CS\DEV\BOTS\PM POD2.6\PODBOT\SRC\bot_globals.cpp(629): // ??? ABS ----------------------------------------
C:\CS\DEV\BOTS\PM POD2.6\PODBOT\SRC\bot_globals.h(209): // ??? ABS
----------------------------------------
Find '// ??' in 'C:\CS\DEV\BOTS\PM POD2.6\PODBOT\SRC\dll.cpp' :
C:\CS\DEV\BOTS\PM POD2.6\PODBOT\SRC\dll.cpp(994): // ??? ABS
C:\CS\DEV\BOTS\PM POD2.6\PODBOT\SRC\dll.cpp(1066): // ??? ABS comamnd C:\CS\DEV\BOTS\PM POD2.6\PODBOT\SRC\dll.cpp(1898): // ??? ABS

Please put these changes in and remove the // ??? ABS comments, thanks!
Also:

Can you include your custom "makeres" build command?
=> 'makeres' is not recognized as an internal or external command,

Another weirdness is I get these message at LINK time.
I have an include path pointing to these and other mm utils I build don't have this problem.
Linking...
Creating library .\Release/podbot_mm.lib and object .\Release/podbot_mm.exp
C:\CS\Dev\SDK\MM\metamod\metamod\osdep.h(103): Could not find the file dlfcn.h.
C:\CS\Dev\SDK\MM\metamod\metamod\osdep.h(172): Could not find the file unistd.h.
C:\CS\Dev\SDK\MM\metamod\metamod\osdep.h(182): Could not find the file unistd.h.
C:\CS\Dev\SDK\MM\metamod\metamod\osdep.h(226): Could not find the file pthread.h.
C:\CS\Dev\SDK\MM\metamod\metamod\osdep.h(103): Could not find the file dlfcn.h.
...
Got any idea why I should get this building pod2.6?
(the path IS fine and works with other mm builds.)
It is WEIRD that it builds fine but gives me these header errors at L-I-N-K time! WEIRD?

Finally.
Please give me a link to the HL SDK you are using, and the metamod SDK you are using, or that I should be using now.

Thanks a lot!

SoUlFaThEr 01-04-2004 14:13

Re: POD-bot back into shape.
 
1 Attachment(s)
the crouch waypoint navigation is still...somehow not right yet.

they only crouch-bounce when approaching a crouch waypoint.

here a very quick demo...seeing the waypoints hopefully....

Pierre-Marie Baty 01-04-2004 19:46

Re: POD-bot back into shape.
 
1 Attachment(s)
hmmm yes... this issue is typical of a flat ground where waypoints have the same height. I've added an offset to handle the case. Tell me if it works better. Thanks for the demo

http://racc.bots-united.com/releases/podbot.zip

@Austin: the email bounced because I simply forgot that my domain expired one week ago! I've just bought a one year extension but it'll take some days before the DNS update. In the meantime my preferred email address is pm@bots-united.com
You should check the thread "CZ released" in the Offtopic forum, memed provides a link to an updated SDK that we use on the Bots United server. Also I didn't get your changes at all !?? Your archive only contains bot.cpp, util.cpp and waypoint.cpp, I see no bot_globals.cpp, bot.h or dll.cpp... ???:(
Also I get the same warnings too at link time, but it doesn't prevent the DLL to be built. I believe it's a problem in the metamod source code. dlfcn.h, unistd.h and pthread.h are UNIX headers that have no equivalents in Windows. Will Day cares very little about native Windows compilers.

Oh BTW here's my makeres utility (it updates the version info of the DLL automatically and does a lot of other stuff at compile time with the .res files) :


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

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