Page 1 of 1

Quake2: Optimizations disabled for CM_TransformedBoxTrace

Posted: Tue Oct 08, 2013 3:02 am
by jitspoe
Curious about this:

Code: Select all

#ifdef _WIN32
#pragma optimize( "", off )
#endif


trace_t		CM_TransformedBoxTrace (vec3_t start, vec3_t end,
						  vec3_t mins, vec3_t maxs,
						  int headnode, int brushmask,
						  vec3_t origin, vec3_t angles)

Anybody know why that was done, and if the optimizer still screws with it (and how I would be able to tell)?

Re: Quake2: Optimizations disabled for CM_TransformedBoxTrac

Posted: Tue Oct 08, 2013 5:24 am
by Spike
probably floating point precision annoyances. disabling optimisations means results get forced to 32bit when stored instead of retaining 80bit precision.
the difference can result in prediction errors when different compilers are used (like linux servers and windows clients).