diff --git a/src/lua_maplib.c b/src/lua_maplib.c
index 7abe820a578e112e1c5489377be2590c8943e510..898651520d77ead06f05ccbe767fe618708e4c20 100644
--- a/src/lua_maplib.c
+++ b/src/lua_maplib.c
@@ -1910,10 +1910,10 @@ static INT32 P_GetOldFOFFlags(ffloor_t *fflr)
 		result |= FF_OLD_SPINBUST;
 	if (fflr->busttype == BT_STRONG)
 		result |= FF_OLD_STRONGBUST;
-	if (fflr->fofflags & FF_OLD_RIPPLE)
-		result |= FOF_RIPPLE;
-	if (fflr->fofflags & FF_OLD_COLORMAPONLY)
-		result |= FOF_COLORMAPONLY;
+	if (fflr->fofflags & FOF_RIPPLE)
+		result |= FF_OLD_RIPPLE;
+	if (fflr->fofflags & FOF_COLORMAPONLY)
+		result |= FF_OLD_COLORMAPONLY;
 	return result;
 }