diff --git a/src/doomdef.h b/src/doomdef.h
index fbfcf573a413dd7858a93008d81a422f99d9c178..d5ba877c971c9ecf3d8d2304731f09f6e99f97f4 100644
--- a/src/doomdef.h
+++ b/src/doomdef.h
@@ -428,6 +428,15 @@ INT32 I_GetKey(void);
 #define max(x, y) (((x) > (y)) ? (x) : (y))
 #endif
 
+// Floating point comparison epsilons from float.h
+#ifndef FLT_EPSILON
+#define FLT_EPSILON 1.1920928955078125e-7f
+#endif
+
+#ifndef DBL_EPSILON
+#define DBL_EPSILON 2.2204460492503131e-16
+#endif
+
 // An assert-type mechanism.
 #ifdef PARANOIA
 #define I_Assert(e) ((e) ? (void)0 : I_Error("assert failed: %s, file %s, line %d", #e, __FILE__, __LINE__))
diff --git a/src/r_data.c b/src/r_data.c
index e0b9a8147f858bd2c4ae740202da6ebd60175b6d..a21ba49ae9c3ae83efc88cf7376fb50af96a3a35 100644
--- a/src/r_data.c
+++ b/src/r_data.c
@@ -1220,7 +1220,7 @@ INT32 R_CreateColormap(char *p1, char *p2, char *p3)
 			continue;
 		if (maskcolor == extra_colormaps[i].maskcolor
 			&& fadecolor == extra_colormaps[i].fadecolor
-			&& fabsf((float)(maskamt - extra_colormaps[i].maskamt)) < 1.0E-36f
+			&& fabs(maskamt - extra_colormaps[i].maskamt) < DBL_EPSILON
 			&& fadestart == extra_colormaps[i].fadestart
 			&& fadeend == extra_colormaps[i].fadeend
 			&& fog == extra_colormaps[i].fog)
diff --git a/src/r_segs.c b/src/r_segs.c
index 6bdc8eabc988bfd22d31fdee6f12c4cd23f03907..6d6ba1efd1c0dd7a62cfd130df0e2cc08adfa133 100644
--- a/src/r_segs.c
+++ b/src/r_segs.c
@@ -1126,9 +1126,6 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor)
 			// Get data for the column
 			col = (column_t *)((UINT8 *)R_GetColumn(texnum,maskedtexturecol[dc_x]) - 3);
 
-			// guess what I just fixed? -monster psychic cat
-			dc_colormap = colormaps;
-
 			// SoM: New code does not rely on R_DrawColumnShadowed_8 which
 			// will (hopefully) put less strain on the stack.
 			if (dc_numlights)