mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-24 12:51:09 +00:00
- cleaned up the merge and consolidated redundant code.
This commit is contained in:
parent
f83b21ff26
commit
0e017f1e2d
1 changed files with 13 additions and 48 deletions
|
@ -66,7 +66,6 @@
|
|||
|
||||
// State.
|
||||
#include "r_state.h"
|
||||
#include "r_sky.h"
|
||||
|
||||
#include "c_console.h"
|
||||
|
||||
|
@ -1111,46 +1110,6 @@ void P_SpawnSkybox(ASkyViewpoint *origin)
|
|||
}
|
||||
|
||||
|
||||
void P_SpawnHorizon(line_t *line)
|
||||
{
|
||||
ASkyViewpoint *origin = Spawn<ASkyViewpoint>(0, 0, 0, NO_REPLACE);
|
||||
origin->Sector = line->frontsector;
|
||||
origin->flags7 |= MF7_HANDLENODELAY; // mark as 'special'
|
||||
if (line->args[1] == 3) origin->flags |= MF_FLOAT; // well, it actually does 'float'... :P
|
||||
|
||||
|
||||
int s;
|
||||
FSectorTagIterator itr(line->args[0]);
|
||||
while ((s = itr.Next()) >= 0)
|
||||
{
|
||||
SetPortal(§ors[s], line->args[2], origin, 0);
|
||||
}
|
||||
|
||||
for (int j=0;j<numlines;j++)
|
||||
{
|
||||
// Check if this portal needs to be copied to other sectors
|
||||
// This must be done here to ensure that it gets done only after the portal is set up
|
||||
if (lines[j].special == Sector_SetPortal &&
|
||||
lines[j].args[1] == 1 &&
|
||||
(lines[j].args[2] == line->args[2] || lines[j].args[2] == 3) &&
|
||||
lines[j].args[3] == line->args[0])
|
||||
{
|
||||
if (lines[j].args[0] == 0)
|
||||
{
|
||||
SetPortal(lines[j].frontsector, line->args[2], origin, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
FSectorTagIterator itr(lines[j].args[0]);
|
||||
while ((s = itr.Next()) >= 0)
|
||||
{
|
||||
SetPortal(§ors[s], line->args[2], origin, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// P_SetSectorDamage
|
||||
|
@ -1503,7 +1462,13 @@ void P_SpawnSpecials (void)
|
|||
}
|
||||
else if (lines[i].args[1] == 3 || lines[i].args[1] == 4)
|
||||
{
|
||||
P_SpawnHorizon(&lines[i]);
|
||||
line_t *line = &lines[i];
|
||||
ASkyViewpoint *origin = Spawn<ASkyViewpoint>(0, 0, 0, NO_REPLACE);
|
||||
origin->Sector = line->frontsector;
|
||||
origin->flags7 |= MF7_HANDLENODELAY; // mark as 'special'
|
||||
if (line->args[1] == 3) origin->flags |= MF_FLOAT; // well, it actually does 'float'... :P
|
||||
|
||||
CopyPortal(line->args[0], line->args[2], origin, 0, true);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in a new issue