mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 06:42:08 +00:00
- 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:
parent
c93d025088
commit
56e2db38fd
2 changed files with 2 additions and 2 deletions
|
@ -372,7 +372,7 @@ struct FMapThing
|
||||||
uint32_t RenderStyle;
|
uint32_t RenderStyle;
|
||||||
int FloatbobPhase;
|
int FloatbobPhase;
|
||||||
int friendlyseeblocks;
|
int friendlyseeblocks;
|
||||||
FString arg0str;
|
FNameNoInit arg0str;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6098,7 +6098,7 @@ AActor *P_SpawnMapThing (FMapThing *mthing, int position)
|
||||||
if (i->IsDescendantOf(RUNTIME_CLASS(ADynamicLight)))
|
if (i->IsDescendantOf(RUNTIME_CLASS(ADynamicLight)))
|
||||||
{
|
{
|
||||||
auto light = static_cast<ADynamicLight*>(mobj);
|
auto light = static_cast<ADynamicLight*>(mobj);
|
||||||
if (mthing->arg0str.IsNotEmpty())
|
if (mthing->arg0str != NAME_None)
|
||||||
{
|
{
|
||||||
PalEntry color = V_GetColor(nullptr, mthing->arg0str);
|
PalEntry color = V_GetColor(nullptr, mthing->arg0str);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue