From 007fbc52da9f17baa80ed9ba1ef381e20e7ec16d Mon Sep 17 00:00:00 2001 From: Eidolon Date: Mon, 29 Jan 2024 18:29:38 -0600 Subject: [PATCH] Make UDMF mandatory for play As per many previous conversations, we need to enforce the UDMF requirement now if we want to introduce a new hardware renderer in the future. Requiring UDMF ensures that maps are always built with extended nodes, which both solves vertex imprecision issues and ensures all subsectors are closed, making writing a hardware renderer significantly easier and less prone to subsector bugs. --- src/p_setup.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/p_setup.cpp b/src/p_setup.cpp index 32e62d59e..dfcac4ea3 100644 --- a/src/p_setup.cpp +++ b/src/p_setup.cpp @@ -3117,8 +3117,6 @@ static void P_LoadTextmap(void) side_t *sd; mapthing_t *mt; - CONS_Alert(CONS_NOTICE, "UDMF support is still a work-in-progress; its specs and features are prone to change until it is fully implemented.\n"); - /// Given the UDMF specs, some fields are given a default value. /// If an element's field has a default value set, it is omitted /// from the textmap, and therefore we have to account for it by @@ -8668,6 +8666,16 @@ boolean P_LoadLevel(boolean fromnetsave, boolean reloadinggamestate) P_MapEnd(); // tm.thing is no longer needed from this point onwards + if (!udmf && !P_CanWriteTextmap()) + { + // *Playing* binary maps is disabled; the support is kept in the code for binary map conversions only. + // This is to make sure people use UDMF and, indirectly, guarantee that they will ship their PWAD + // maps with extended GL nodes, as per UDMF requirement. We can retrofit a modern hardware renderer + // into the game in the future without disrupting existing PWADs, which does not suffer from the issues + // of the current GL renderer. + I_Error("Playing binary maps is disabled; please convert to UDMF TEXTMAP and rebuild nodes."); + } + if (!fromnetsave) { INT32 buf = gametic % BACKUPTICS;