gpGlobals->v_right is NaN sometimes with Linux
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 |
Re: gpGlobals->v_right is NaN sometimes with Linux
Are you using agressive cflags(O3, -ffast-math etc)?
|
Re: gpGlobals->v_right is NaN sometimes with Linux
We tried both with the flags from HLSDK makefile and some standart ones. No luck. :(
|
Re: gpGlobals->v_right is NaN sometimes with Linux
Make sure the bot isn't passing those values to the engine. Division by zero can result in those I believe.
|
Re: gpGlobals->v_right is NaN sometimes with Linux
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).
|
Re: gpGlobals->v_right is NaN sometimes with Linux
Thanks KWo I will make checks this night. :)
|
Re: gpGlobals->v_right is NaN sometimes with Linux
Yes it was MAKE_VECTORS. Thanks for your fast answer.
Markus |
Re: gpGlobals->v_right is NaN sometimes with Linux
Quote:
|
Re: gpGlobals->v_right is NaN sometimes with Linux
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. |
Re: gpGlobals->v_right is NaN sometimes with Linux
It's time for a new release, I think :-)
|
All times are GMT +2. The time now is 02:27. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.