From 15b95cc02304ee4fd09d12fee03a488ec12b8b67 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 27 Jan 2017 10:50:35 +0100 Subject: [PATCH] - fixed: DECORATE was creating a new global constant namespace for each single included file, not just once per DECORATE lump. --- src/r_data/sprites.cpp | 2 +- src/scripting/decorate/thingdef_parse.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/r_data/sprites.cpp b/src/r_data/sprites.cpp index b384211fc..7fb59ef94 100644 --- a/src/r_data/sprites.cpp +++ b/src/r_data/sprites.cpp @@ -63,7 +63,7 @@ static bool R_InstallSpriteLump (FTextureID lump, unsigned frame, char rot, bool if (frame >= MAX_SPRITE_FRAMES || rotation > 16) { - Printf (TEXTCOLOR_RED"R_InstallSpriteLump: Bad frame characters in lump %s\n", TexMan[lump]->Name.GetChars()); + Printf (TEXTCOLOR_RED "R_InstallSpriteLump: Bad frame characters in lump %s\n", TexMan[lump]->Name.GetChars()); return false; } diff --git a/src/scripting/decorate/thingdef_parse.cpp b/src/scripting/decorate/thingdef_parse.cpp index 9b78ef3d5..505585937 100644 --- a/src/scripting/decorate/thingdef_parse.cpp +++ b/src/scripting/decorate/thingdef_parse.cpp @@ -1217,9 +1217,8 @@ static void ParseDamageDefinition(FScanner &sc) // //========================================================================== -void ParseDecorate (FScanner &sc) +void ParseDecorate (FScanner &sc, PNamespace *ns) { - auto ns = Namespaces.NewNamespace(sc.LumpNum); // Get actor class name. for(;;) { @@ -1245,7 +1244,7 @@ void ParseDecorate (FScanner &sc) } FScanner newscanner; newscanner.Open(sc.String); - ParseDecorate(newscanner); + ParseDecorate(newscanner, ns); break; } @@ -1308,6 +1307,7 @@ void ParseAllDecorate() while ((lump = Wads.FindLump("DECORATE", &lastlump)) != -1) { FScanner sc(lump); - ParseDecorate(sc); + auto ns = Namespaces.NewNamespace(sc.LumpNum); + ParseDecorate(sc, ns); } } \ No newline at end of file