mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- RR: cleaned up STAT_DESTRUCT init code a bit
This commit is contained in:
parent
8818a3f1cb
commit
bc56b5a28f
1 changed files with 28 additions and 24 deletions
|
@ -4133,10 +4133,14 @@ void destroyit(DDukeActor *actor)
|
||||||
if (lotag == a2->s->lotag)
|
if (lotag == a2->s->lotag)
|
||||||
{
|
{
|
||||||
sectnum = spr->s->sectnum;
|
sectnum = spr->s->sectnum;
|
||||||
wallstart = sector[sectnum].wallptr;
|
|
||||||
wallend = wallstart + sector[sectnum].wallnum;
|
auto destsect = §or[sectnum];
|
||||||
wallstart2 = sector[it_sect].wallptr;
|
auto srcsect = §or[it_sect];
|
||||||
wallend2 = wallstart2 + sector[it_sect].wallnum;
|
|
||||||
|
wallstart = destsect->wallptr;
|
||||||
|
wallend = wallstart + destsect->wallnum;
|
||||||
|
wallstart2 = srcsect->wallptr;
|
||||||
|
wallend2 = wallstart2 + srcsect->wallnum;
|
||||||
for (wi = wallstart, wj = wallstart2; wi < wallend; wi++, wj++)
|
for (wi = wallstart, wj = wallstart2; wi < wallend; wi++, wj++)
|
||||||
{
|
{
|
||||||
wall[wi].picnum = wall[wj].picnum;
|
wall[wi].picnum = wall[wj].picnum;
|
||||||
|
@ -4152,27 +4156,27 @@ void destroyit(DDukeActor *actor)
|
||||||
wall[wall[wi].nextwall].cstat = 0;
|
wall[wall[wi].nextwall].cstat = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sector[sectnum].floorz = sector[it_sect].floorz;
|
destsect->floorz = srcsect->floorz;
|
||||||
sector[sectnum].ceilingz = sector[it_sect].ceilingz;
|
destsect->ceilingz = srcsect->ceilingz;
|
||||||
sector[sectnum].ceilingstat = sector[it_sect].ceilingstat;
|
destsect->ceilingstat = srcsect->ceilingstat;
|
||||||
sector[sectnum].floorstat = sector[it_sect].floorstat;
|
destsect->floorstat = srcsect->floorstat;
|
||||||
sector[sectnum].ceilingpicnum = sector[it_sect].ceilingpicnum;
|
destsect->ceilingpicnum = srcsect->ceilingpicnum;
|
||||||
sector[sectnum].ceilingheinum = sector[it_sect].ceilingheinum;
|
destsect->ceilingheinum = srcsect->ceilingheinum;
|
||||||
sector[sectnum].ceilingshade = sector[it_sect].ceilingshade;
|
destsect->ceilingshade = srcsect->ceilingshade;
|
||||||
sector[sectnum].ceilingpal = sector[it_sect].ceilingpal;
|
destsect->ceilingpal = srcsect->ceilingpal;
|
||||||
sector[sectnum].ceilingxpan_ = sector[it_sect].ceilingxpan_;
|
destsect->ceilingxpan_ = srcsect->ceilingxpan_;
|
||||||
sector[sectnum].ceilingypan_ = sector[it_sect].ceilingypan_;
|
destsect->ceilingypan_ = srcsect->ceilingypan_;
|
||||||
sector[sectnum].floorpicnum = sector[it_sect].floorpicnum;
|
destsect->floorpicnum = srcsect->floorpicnum;
|
||||||
sector[sectnum].floorheinum = sector[it_sect].floorheinum;
|
destsect->floorheinum = srcsect->floorheinum;
|
||||||
sector[sectnum].floorshade = sector[it_sect].floorshade;
|
destsect->floorshade = srcsect->floorshade;
|
||||||
sector[sectnum].floorpal = sector[it_sect].floorpal;
|
destsect->floorpal = srcsect->floorpal;
|
||||||
sector[sectnum].floorxpan_ = sector[it_sect].floorxpan_;
|
destsect->floorxpan_ = srcsect->floorxpan_;
|
||||||
sector[sectnum].floorypan_ = sector[it_sect].floorypan_;
|
destsect->floorypan_ = srcsect->floorypan_;
|
||||||
sector[sectnum].visibility = sector[it_sect].visibility;
|
destsect->visibility = srcsect->visibility;
|
||||||
sectorextra[sectnum] = sectorextra[it_sect]; // TRANSITIONAL: at least rename this.
|
sectorextra[sectnum] = sectorextra[it_sect]; // TRANSITIONAL: at least rename this.
|
||||||
sector[sectnum].lotag = sector[it_sect].lotag;
|
destsect->lotag = srcsect->lotag;
|
||||||
sector[sectnum].hitag = sector[it_sect].hitag;
|
destsect->hitag = srcsect->hitag;
|
||||||
sector[sectnum].extra = sector[it_sect].extra;
|
destsect->extra = srcsect->extra;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
it1.Reset(actor->s->sectnum);
|
it1.Reset(actor->s->sectnum);
|
||||||
|
|
Loading…
Reference in a new issue