mirror of
https://github.com/ZDoom/ZDRay.git
synced 2025-01-25 00:51:20 +00:00
- changed UDMF plane parser to use the same rules as GZDoom, namely to accept the plane only if all 4 parameters are present.
This commit is contained in:
parent
2555eec131
commit
03a95e090f
1 changed files with 11 additions and 11 deletions
|
@ -353,7 +353,7 @@ void FProcessor::ParseSector(IntSector *sec)
|
||||||
memset(&sec->data, 0, sizeof(sec->data));
|
memset(&sec->data, 0, sizeof(sec->data));
|
||||||
sec->data.lightlevel = 160;
|
sec->data.lightlevel = 160;
|
||||||
|
|
||||||
bool ceilingplane = false, floorplane = false;
|
int ceilingplane = 0, floorplane = 0;
|
||||||
|
|
||||||
SC_MustGetStringName("{");
|
SC_MustGetStringName("{");
|
||||||
while (!SC_CheckString("}"))
|
while (!SC_CheckString("}"))
|
||||||
|
@ -391,42 +391,42 @@ void FProcessor::ParseSector(IntSector *sec)
|
||||||
}
|
}
|
||||||
else if (stricmp(key, "ceilingplane_a") == 0)
|
else if (stricmp(key, "ceilingplane_a") == 0)
|
||||||
{
|
{
|
||||||
ceilingplane = true;
|
ceilingplane|=1;
|
||||||
sec->ceilingplane.a = CheckFloat(key);
|
sec->ceilingplane.a = CheckFloat(key);
|
||||||
}
|
}
|
||||||
else if (stricmp(key, "ceilingplane_b") == 0)
|
else if (stricmp(key, "ceilingplane_b") == 0)
|
||||||
{
|
{
|
||||||
ceilingplane = true;
|
ceilingplane|=2;
|
||||||
sec->ceilingplane.b = CheckFloat(key);
|
sec->ceilingplane.b = CheckFloat(key);
|
||||||
}
|
}
|
||||||
else if (stricmp(key, "ceilingplane_c") == 0)
|
else if (stricmp(key, "ceilingplane_c") == 0)
|
||||||
{
|
{
|
||||||
ceilingplane = true;
|
ceilingplane|=4;
|
||||||
sec->ceilingplane.c = CheckFloat(key);
|
sec->ceilingplane.c = CheckFloat(key);
|
||||||
}
|
}
|
||||||
else if (stricmp(key, "ceilingplane_d") == 0)
|
else if (stricmp(key, "ceilingplane_d") == 0)
|
||||||
{
|
{
|
||||||
ceilingplane = true;
|
ceilingplane|=8;
|
||||||
sec->ceilingplane.d = CheckFloat(key);
|
sec->ceilingplane.d = CheckFloat(key);
|
||||||
}
|
}
|
||||||
else if (stricmp(key, "floorplane_a") == 0)
|
else if (stricmp(key, "floorplane_a") == 0)
|
||||||
{
|
{
|
||||||
floorplane = true;
|
floorplane|=1;
|
||||||
sec->floorplane.a = CheckFloat(key);
|
sec->floorplane.a = CheckFloat(key);
|
||||||
}
|
}
|
||||||
else if (stricmp(key, "floorplane_b") == 0)
|
else if (stricmp(key, "floorplane_b") == 0)
|
||||||
{
|
{
|
||||||
floorplane = true;
|
floorplane|=2;
|
||||||
sec->floorplane.b = CheckFloat(key);
|
sec->floorplane.b = CheckFloat(key);
|
||||||
}
|
}
|
||||||
else if (stricmp(key, "floorplane_c") == 0)
|
else if (stricmp(key, "floorplane_c") == 0)
|
||||||
{
|
{
|
||||||
floorplane = true;
|
floorplane|=4;
|
||||||
sec->floorplane.c = CheckFloat(key);
|
sec->floorplane.c = CheckFloat(key);
|
||||||
}
|
}
|
||||||
else if (stricmp(key, "floorplane_d") == 0)
|
else if (stricmp(key, "floorplane_d") == 0)
|
||||||
{
|
{
|
||||||
floorplane = true;
|
floorplane|=8;
|
||||||
sec->floorplane.d = CheckFloat(key);
|
sec->floorplane.d = CheckFloat(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -435,7 +435,7 @@ void FProcessor::ParseSector(IntSector *sec)
|
||||||
sec->props.Push(k);
|
sec->props.Push(k);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ceilingplane)
|
if (ceilingplane != 15)
|
||||||
{
|
{
|
||||||
sec->ceilingplane.a = 0.0f;
|
sec->ceilingplane.a = 0.0f;
|
||||||
sec->ceilingplane.b = 0.0f;
|
sec->ceilingplane.b = 0.0f;
|
||||||
|
@ -452,7 +452,7 @@ void FProcessor::ParseSector(IntSector *sec)
|
||||||
sec->ceilingplane.d = -sec->ceilingplane.d;
|
sec->ceilingplane.d = -sec->ceilingplane.d;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!floorplane)
|
if (floorplane != 15)
|
||||||
{
|
{
|
||||||
sec->floorplane.a = 0.0f;
|
sec->floorplane.a = 0.0f;
|
||||||
sec->floorplane.b = 0.0f;
|
sec->floorplane.b = 0.0f;
|
||||||
|
|
Loading…
Reference in a new issue