diff --git a/src/r_things.c b/src/r_things.c
index 561399859..228c86a64 100644
--- a/src/r_things.c
+++ b/src/r_things.c
@@ -1206,6 +1206,7 @@ fixed_t R_GetShadowZ(mobj_t *thing, pslope_t **shadowslope)
 		*shadowslope = groundslope;
 
 	return groundz;
+#undef CHECKZ
 }
 
 static void R_ProjectDropShadow(mobj_t *thing, vissprite_t *vis, fixed_t scale, fixed_t tx, fixed_t tz)