- 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.
This commit is contained in:
Christoph Oelckers 2018-01-21 09:10:04 +01:00
parent c93d025088
commit 56e2db38fd
2 changed files with 2 additions and 2 deletions

View File

@ -372,7 +372,7 @@ struct FMapThing
uint32_t RenderStyle;
int FloatbobPhase;
int friendlyseeblocks;
FString arg0str;
FNameNoInit arg0str;
};

View File

@ -6098,7 +6098,7 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
if (i->IsDescendantOf(RUNTIME_CLASS(ADynamicLight)))
{
auto light = static_cast<ADynamicLight*>(mobj);
if (mthing->arg0str.IsNotEmpty())
if (mthing->arg0str != NAME_None)
{
PalEntry color = V_GetColor(nullptr, mthing->arg0str);
}