diff --git a/src/r_things.c b/src/r_things.c
index 561399859d675b8802018fbb64ce3d5911cb6aa9..228c86a643695c12ef6d5f379fae83b782e6497e 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)