ref: a63d5778cb72c91bf1b14aaa4453a0239cc4a823
parent: b8fdee42392c7a7692bb60483cc906dfa3acf62d
author: Konstantinn Bonnet <[email protected]>
date: Sat Feb 28 12:20:35 EST 2015
fix probably typos in world.c and mathlib.c - world.c: prototype mismatch; probably left over from old code - mathlib.c: doesn't make sense for it to be #ifndef PARANOID, given that that def's purpose is to do a bunch of error checking for bugs in the code
--- a/mathlib.c
+++ b/mathlib.c
@@ -472,13 +472,11 @@
int q, r;
double x;
-#ifndef PARANOID
+#ifdef PARANOID
if (denom <= 0.0)
Sys_Error ("FloorDivMod: bad denominator %d\n", denom);
-
-// if ((floor(numer) != numer) || (floor(denom) != denom))
-// Sys_Error ("FloorDivMod: non-integer numer or denom %f %f\n",
-// numer, denom);
+ if (floor(numer) != numer || floor(denom) != denom)
+ Sys_Error ("FloorDivMod: non-integer numer or denom %f %f\n", numer, denom);
#endif
if (numer >= 0.0)
--- a/world.c
+++ b/world.c
@@ -609,10 +609,8 @@
return false;
#ifdef PARANOID
- /* FIXME */
- /*if (SV_HullPointContents (sv_hullmodel, mid, node->children[side])*/
- if (SV_HullPointContents (hull, mid, node->children[side])
- == CONTENTS_SOLID)
+ /* was sv_hullmodel */
+ if (SV_HullPointContents (hull, node->children[side], mid) == CONTENTS_SOLID)
{
Con_Printf ("mid PointInHullSolid\n");
return false;
@@ -619,8 +617,7 @@
}
#endif
- if (SV_HullPointContents (hull, node->children[side^1], mid)
- != CONTENTS_SOLID)
+ if (SV_HullPointContents (hull, node->children[side^1], mid) != CONTENTS_SOLID)
// go past the node
return SV_RecursiveHullCheck (hull, node->children[side^1], midf, p2f, mid, p2, trace);