Quake2: Optimizations disabled for CM_TransformedBoxTrace

Discuss programming topics for the various GPL'd game engine sources.
Post Reply
jitspoe
Posts: 217
Joined: Mon Jan 17, 2005 5:27 am

Quake2: Optimizations disabled for CM_TransformedBoxTrace

Post 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)?
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: Quake2: Optimizations disabled for CM_TransformedBoxTrac

Post 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).
Post Reply