From 56e2db38fd8e7ec09809ad6ef682f428d71ff6fe Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 21 Jan 2018 09:10:04 +0100 Subject: [PATCH] - Use FName instead of FString to store arg0str in FMapThing. This is because FMapThing gets memset to 0 and changing that would cause more work than it is worth to keep the string. The only thing it is used for is the color for dynamic lights and those do not need case sensitivity so a name will just do as well, but require less adjustments elsewhere. --- src/doomdata.h | 2 +- src/p_mobj.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/doomdata.h b/src/doomdata.h index cfebe196d..58bfea68a 100644 --- a/src/doomdata.h +++ b/src/doomdata.h @@ -372,7 +372,7 @@ struct FMapThing uint32_t RenderStyle; int FloatbobPhase; int friendlyseeblocks; - FString arg0str; + FNameNoInit arg0str; }; diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 0f77f534d..79f549dd3 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -6098,7 +6098,7 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position) if (i->IsDescendantOf(RUNTIME_CLASS(ADynamicLight))) { auto light = static_cast(mobj); - if (mthing->arg0str.IsNotEmpty()) + if (mthing->arg0str != NAME_None) { PalEntry color = V_GetColor(nullptr, mthing->arg0str); }