- floatified the sector planes.

This should conclude the floating point conversions for now.
This commit is contained in:
Christoph Oelckers 2016-04-03 19:28:53 +02:00
commit fc5f98a0be
3 changed files with 47 additions and 65 deletions

View file

@ -1112,11 +1112,11 @@ bool secplane_t::CopyPlaneIfValid (secplane_t *dest, const secplane_t *opp) cons
FArchive &operator<< (FArchive &arc, secplane_t &plane)
{
arc << plane.a << plane.b << plane.c << plane.d;
//if (plane.c != 0)
arc << plane.normal << plane.D;
if (plane.normal.Z != 0)
{ // plane.c should always be non-0. Otherwise, the plane
// would be perfectly vertical.
plane.ic = DivScale32 (1, plane.c);
// would be perfectly vertical. (But then, don't let this crash on a broken savegame...)
plane.negiC = -1 / plane.normal.Z;
}
return arc;
}