- Added the MF2_PASSMOBJ for P_Thing_Spawn() from January 4, 2003, to

DLevelScript::DoSpawn().
- Changed VectorNormalize() (and VectorNormalize2) to use doubles for storing
  the vector lengths, fixing desyncs between GCC/VC++ games that happened
  because the two compilers produced slightly different results for some
  slopes. GCC kept them in registers, so they were never truncated to floats.
  VC++ stored them to memory and reloaded them in order to truncate them to
  the defined precision. Lesson learned: Floating point numbers in local
  variables should always be doubles to produce the best code with VC++ that
  has the best chance of matching GCC's default behavior.
- Removed netget and netsend function pointers. PacketGet and PacketSend are
  now called directly.
- Fixed: Watching a demo from the point of view of someone other than the
  first player could cause a crash when the demo ended.
- Removed invcount from the expression evaluator at Grubber's suggestion,
  because it doesn't work.
- Fixed: vid_nowidescreen should fire off setsizeneeded so that changes to it
  can happen immediately instead of at the next resolution change.


SVN r355 (trunk)
This commit is contained in:
Randy Heit 2006-10-20 01:58:26 +00:00
commit 35ca16ba4f
8 changed files with 47 additions and 61 deletions

View file

@ -64,39 +64,39 @@ int VectorCompare (const vec3_t v1, const vec3_t v2)
vec_t VectorNormalize (vec3_t v)
{
float length, ilength;
double length, ilength;
length = v[0]*v[0] + v[1]*v[1] + v[2]*v[2];
length = sqrtf (length);
length = sqrt (length);
if (length)
{
ilength = 1/length;
v[0] *= ilength;
v[1] *= ilength;
v[2] *= ilength;
v[0] = vec_t(v[0] * ilength);
v[1] = vec_t(v[1] * ilength);
v[2] = vec_t(v[2] * ilength);
}
return length;
return vec_t(length);
}
vec_t VectorNormalize2 (const vec3_t v, vec3_t out)
{
float length, ilength;
double length, ilength;
length = v[0]*v[0] + v[1]*v[1] + v[2]*v[2];
length = sqrtf (length);
length = sqrt (length);
if (length)
{
ilength = 1/length;
out[0] = v[0]*ilength;
out[1] = v[1]*ilength;
out[2] = v[2]*ilength;
out[0] = vec_t(v[0] * ilength);
out[1] = vec_t(v[1] * ilength);
out[2] = vec_t(v[2] * ilength);
}
return length;
return vec_t(length);
}