mirror of
https://github.com/DrBeef/Raze.git
synced 2025-02-21 03:01:36 +00:00
- Duke: a few more sector[] replacements in precaching code.
This commit is contained in:
parent
2c1881530a
commit
ca5a014a2d
2 changed files with 18 additions and 14 deletions
|
@ -246,9 +246,10 @@ void cacheit_d(void)
|
|||
|
||||
for (i = 0; i < numsectors; i++)
|
||||
{
|
||||
tloadtile(sector[i].floorpicnum, sector[i].floorpal);
|
||||
tloadtile(sector[i].ceilingpicnum, sector[i].ceilingpal);
|
||||
if (sector[i].ceilingpicnum == LA)
|
||||
auto sectp = §or[i];
|
||||
tloadtile(sectp->floorpicnum, sectp->floorpal);
|
||||
tloadtile(sectp->ceilingpicnum, sectp->ceilingpal);
|
||||
if (sectp->ceilingpicnum == LA)
|
||||
{
|
||||
tloadtile(LA + 1);
|
||||
tloadtile(LA + 2);
|
||||
|
@ -385,13 +386,14 @@ void prelevel_d(int g)
|
|||
if (wal->overpicnum == MIRROR && (wal->cstat & 32) != 0)
|
||||
{
|
||||
j = wal->nextsector;
|
||||
auto sectp = §or[j];
|
||||
|
||||
if (mirrorcnt > 63)
|
||||
I_Error("Too many mirrors (64 max.)");
|
||||
if ((j >= 0) && sector[j].ceilingpicnum != MIRROR)
|
||||
if ((j >= 0) && sectp->ceilingpicnum != MIRROR)
|
||||
{
|
||||
sector[j].ceilingpicnum = MIRROR;
|
||||
sector[j].floorpicnum = MIRROR;
|
||||
sectp->ceilingpicnum = MIRROR;
|
||||
sectp->floorpicnum = MIRROR;
|
||||
mirrorwall[mirrorcnt] = i;
|
||||
mirrorsector[mirrorcnt] = j;
|
||||
mirrorcnt++;
|
||||
|
|
|
@ -390,9 +390,10 @@ void cacheit_r(void)
|
|||
|
||||
for (i = 0; i < numsectors; i++)
|
||||
{
|
||||
tloadtile(sector[i].floorpicnum, sector[i].floorpal);
|
||||
tloadtile(sector[i].ceilingpicnum, sector[i].ceilingpal);
|
||||
if (sector[i].ceilingpicnum == LA)
|
||||
auto sectp = §or[i];
|
||||
tloadtile(sectp->floorpicnum, sectp->floorpal);
|
||||
tloadtile(sectp->ceilingpicnum, sectp->ceilingpal);
|
||||
if (sectp->ceilingpicnum == LA)
|
||||
{
|
||||
tloadtile(LA + 1);
|
||||
tloadtile(LA + 2);
|
||||
|
@ -459,10 +460,11 @@ void prelevel_r(int g)
|
|||
|
||||
for (i = 0; i < numsectors; i++)
|
||||
{
|
||||
if (sector[i].ceilingpicnum == RRTILE2577)
|
||||
auto sectp = §or[i];
|
||||
if (sectp->ceilingpicnum == RRTILE2577)
|
||||
thunderon = 1;
|
||||
|
||||
switch (sector[i].lotag)
|
||||
switch (sectp->lotag)
|
||||
{
|
||||
case 41:
|
||||
{
|
||||
|
@ -484,11 +486,11 @@ void prelevel_r(int g)
|
|||
}
|
||||
for (j = 0; j < numsectors; j++)
|
||||
{
|
||||
if (sector[i].hitag == sector[j].hitag && j != i)
|
||||
if (sectp->hitag == sector[j].hitag && j != i)
|
||||
{
|
||||
// & 32767 to avoid some ordering issues here.
|
||||
// Other code assumes that the lotag is always a sector effector type and can mask the high bit in.
|
||||
addjaildoor(dist, speed, sector[i].hitag, sector[j].lotag & 32767, sound, j);
|
||||
addjaildoor(dist, speed, sectp->hitag, sector[j].lotag & 32767, sound, j);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -523,7 +525,7 @@ void prelevel_r(int g)
|
|||
deletesprite(act);
|
||||
}
|
||||
}
|
||||
addminecart(dist, speed, i, sector[i].hitag, sound, childsectnum);
|
||||
addminecart(dist, speed, i, sectp->hitag, sound, childsectnum);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue