Forum

Quake2: Optimizations disabled for CM_TransformedBoxTrace

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Quake2: Optimizations disabled for CM_TransformedBoxTrace

Postby jitspoe » Tue Oct 08, 2013 3:02 am

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)?
jitspoe
 
Posts: 217
Joined: Mon Jan 17, 2005 5:27 am

Re: Quake2: Optimizations disabled for CM_TransformedBoxTrac

Postby Spike » Tue Oct 08, 2013 5:24 am

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).
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest