Use default member initializers in IntThing

This commit is contained in:
RaveYard 2022-10-15 13:58:41 +02:00
parent 207352f0c5
commit 8fb35aca7f
2 changed files with 12 additions and 15 deletions

View file

@ -259,21 +259,21 @@ struct MapThing2
struct IntThing struct IntThing
{ {
unsigned short thingid; unsigned short thingid = 0;
fixed_t x; // full precision coordinates for UDMF support fixed_t x = 0; // full precision coordinates for UDMF support
fixed_t y; fixed_t y = 0;
// everything else is not needed or has no extended form in UDMF // everything else is not needed or has no extended form in UDMF
short z; short z = 0;
short angle; short angle = 0;
short type; short type = 0;
short flags; short flags = 0;
int special; int special = 0;
int args[5]; int args[5] = {};
FString arg0str; FString arg0str;
short pitch; // UDMF short pitch = 0; // UDMF
float height; // UDMF float height = 0; // UDMF
float alpha; float alpha = 1.0;
TArray<UDMFKey> props; TArray<UDMFKey> props;
}; };

View file

@ -163,8 +163,6 @@ fixed_t CheckFixed(const char *key)
void FProcessor::ParseThing(IntThing *th) void FProcessor::ParseThing(IntThing *th)
{ {
th->pitch = 0;
SC_MustGetStringName("{"); SC_MustGetStringName("{");
while (!SC_CheckString("}")) while (!SC_CheckString("}"))
{ {
@ -219,7 +217,6 @@ void FProcessor::ParseThing(IntThing *th)
{ {
th->args[4] = CheckInt(key); th->args[4] = CheckInt(key);
} }
th->alpha = 1.0f;
if (!stricmp(key, "alpha")) if (!stricmp(key, "alpha"))
{ {
th->alpha = CheckFloat(key); th->alpha = CheckFloat(key);