.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > SDK Programming discussions > Half-Life 1 SDK
Half-Life 1 SDK For developments focused around Half-Life (and its mods) Half-Life

Reply
 
Thread Tools
gpGlobals->v_right is NaN sometimes with Linux
Old
  (#1)
markus_heiden
Moderator / E[POD]bot developer
 
markus_heiden's Avatar
 
Status: Offline
Posts: 66
Join Date: Oct 2005
Location: Hamburg / Germany
Default gpGlobals->v_right is NaN sometimes with Linux - 10-09-2006

Hi,

I got a strange problem with the hlsdk which only appears on Linux dedicated servers. With Epodbot sometimes the globals gpGlobals->v_right and gpGlobals->v_forward from the engine are NaNs. I did not figured out yet why this happens nor why it only happens with linux.

May this behaviour be caused by engine calls with wrong parameters?
Or needs the hlsdk special gcc compiler options?
Or does it only run stable with special versions of glibc etc.?

Has anyone ever heard of similar problems?

Markus
  
Reply With Quote
Re: gpGlobals->v_right is NaN sometimes with Linux
Old
  (#2)
Rick
Council Member
 
Rick's Avatar
 
Status: Offline
Posts: 690
Join Date: Dec 2003
Location: Holland
Default Re: gpGlobals->v_right is NaN sometimes with Linux - 10-09-2006

Are you using agressive cflags(O3, -ffast-math etc)?
  
Reply With Quote
Re: gpGlobals->v_right is NaN sometimes with Linux
Old
  (#3)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,620
Join Date: Jul 2004
Location: Bulgaria
Default Re: gpGlobals->v_right is NaN sometimes with Linux - 10-09-2006

We tried both with the flags from HLSDK makefile and some standart ones. No luck.
  
Reply With Quote
Re: gpGlobals->v_right is NaN sometimes with Linux
Old
  (#4)
DrEvil
Member
 
DrEvil's Avatar
 
Status: Offline
Posts: 142
Join Date: Jan 2004
Location: Los Angeles, CA
Default Re: gpGlobals->v_right is NaN sometimes with Linux - 10-09-2006

Make sure the bot isn't passing those values to the engine. Division by zero can result in those I believe.


Omni-bot AI framework
http://www.omni-bot.com

Foxbot - for Team Fortress Classic
http://www.foxbot.net


  
Reply With Quote
Re: gpGlobals->v_right is NaN sometimes with Linux
Old
  (#5)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,425
Join Date: Apr 2004
Default Re: gpGlobals->v_right is NaN sometimes with Linux - 11-09-2006

Make sure You "clamp" the angles in between -180 +180 range before calling MAKE_VECTORS(v_angles) which changes the gpGlobals->v_right and gpGlobals->v_forward (I believe You are using this method).
  
Reply With Quote
Re: gpGlobals->v_right is NaN sometimes with Linux
Old
  (#6)
The Storm
Council Member / E[POD]bot developer
 
The Storm's Avatar
 
Status: Offline
Posts: 1,620
Join Date: Jul 2004
Location: Bulgaria
Default Re: gpGlobals->v_right is NaN sometimes with Linux - 11-09-2006

Thanks KWo I will make checks this night.
  
Reply With Quote
Re: gpGlobals->v_right is NaN sometimes with Linux
Old
  (#7)
markus_heiden
Moderator / E[POD]bot developer
 
markus_heiden's Avatar
 
Status: Offline
Posts: 66
Join Date: Oct 2005
Location: Hamburg / Germany
Default Re: gpGlobals->v_right is NaN sometimes with Linux - 11-09-2006

Yes it was MAKE_VECTORS. Thanks for your fast answer.

Markus
  
Reply With Quote
Re: gpGlobals->v_right is NaN sometimes with Linux
Old
  (#8)
KWo
Developer of PODBot mm
 
KWo's Avatar
 
Status: Offline
Posts: 3,425
Join Date: Apr 2004
Default Re: gpGlobals->v_right is NaN sometimes with Linux - 11-09-2006

Quote:
Originally Posted by markus_heiden View Post
Yes it was MAKE_VECTORS.
So - it means You found it and it's already fixed?
  
Reply With Quote
Re: gpGlobals->v_right is NaN sometimes with Linux
Old
  (#9)
markus_heiden
Moderator / E[POD]bot developer
 
markus_heiden's Avatar
 
Status: Offline
Posts: 66
Join Date: Oct 2005
Location: Hamburg / Germany
Default Re: gpGlobals->v_right is NaN sometimes with Linux - 18-09-2006

I fixed it now. But it had nothing to do with UTIL_MakeVectors(). I simply didn't know that v_forward etc. are the return values from UTIL_MakeVectors(). Nevertheless I fixed several errors in the math code of epodbot and ensured that only wrapped angles are passed to UTIL_MakeVectors(). So the code should be much more stable now at all.

The problem was that the index into the array with the skill dependant aim constants exceeded the array size. With gcc there were some nans values after the array, with msvc there were valid floats. So it seemed that this was a linux problem, but it wasn't.
  
Reply With Quote
Re: gpGlobals->v_right is NaN sometimes with Linux
Old
  (#10)
markus_heiden
Moderator / E[POD]bot developer
 
markus_heiden's Avatar
 
Status: Offline
Posts: 66
Join Date: Oct 2005
Location: Hamburg / Germany
Default Re: gpGlobals->v_right is NaN sometimes with Linux - 18-09-2006

It's time for a new release, I think :-)
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com