mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
- renamed DDukeActor::getSector.
This commit is contained in:
parent
2247509a67
commit
aada3f3d19
11 changed files with 97 additions and 97 deletions
|
@ -2114,7 +2114,7 @@ void forcesphereexplode(DDukeActor *actor)
|
|||
|
||||
void watersplash2(DDukeActor* actor)
|
||||
{
|
||||
auto sectp = actor->getSector();
|
||||
auto sectp = actor->sector();
|
||||
int* t = &actor->temp_data[0];
|
||||
t[0]++;
|
||||
if (t[0] == 1)
|
||||
|
@ -2644,7 +2644,7 @@ void handle_se00(DDukeActor* actor, int LASERLINE)
|
|||
{
|
||||
auto s = actor->s;
|
||||
int* t = &actor->temp_data[0];
|
||||
sectortype *sect = actor->getSector();
|
||||
sectortype *sect = actor->sector();
|
||||
|
||||
int zchange = 0;
|
||||
|
||||
|
@ -2832,7 +2832,7 @@ void handle_se14(DDukeActor* actor, bool checkstat, int RPG, int JIBS6)
|
|||
{
|
||||
auto s = actor->s;
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sc = actor->getSector();
|
||||
auto sc = actor->sector();
|
||||
int st = s->lotag;
|
||||
|
||||
if (actor->GetOwner() == nullptr)
|
||||
|
@ -3036,7 +3036,7 @@ void handle_se30(DDukeActor *actor, int JIBS6)
|
|||
{
|
||||
auto s = actor->s;
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sc = actor->getSector();
|
||||
auto sc = actor->sector();
|
||||
|
||||
auto Owner = actor->GetOwner();
|
||||
if (Owner == nullptr)
|
||||
|
@ -3207,7 +3207,7 @@ void handle_se02(DDukeActor *actor)
|
|||
{
|
||||
auto s = actor->s;
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sc = actor->getSector();
|
||||
auto sc = actor->sector();
|
||||
int sh = s->hitag;
|
||||
|
||||
if (t[4] > 0 && t[0] == 0)
|
||||
|
@ -3283,7 +3283,7 @@ void handle_se03(DDukeActor *actor)
|
|||
{
|
||||
auto s = actor->s;
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sc = actor->getSector();
|
||||
auto sc = actor->sector();
|
||||
int sh = s->hitag;
|
||||
|
||||
if (t[4] == 0) return;
|
||||
|
@ -3336,7 +3336,7 @@ void handle_se04(DDukeActor *actor)
|
|||
{
|
||||
auto s = actor->s;
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sc = actor->getSector();
|
||||
auto sc = actor->sector();
|
||||
int sh = s->hitag;
|
||||
int j;
|
||||
|
||||
|
@ -3404,7 +3404,7 @@ void handle_se05(DDukeActor* actor, int FIRELASER)
|
|||
{
|
||||
auto s = actor->s;
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sc = actor->getSector();
|
||||
auto sc = actor->sector();
|
||||
int j, l, m;
|
||||
|
||||
int x, p = findplayer(actor, &x);
|
||||
|
@ -3497,7 +3497,7 @@ void handle_se08(DDukeActor *actor, bool checkhitag1)
|
|||
// work only if its moving
|
||||
auto s = actor->s;
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sc = actor->getSector();
|
||||
auto sc = actor->sector();
|
||||
int st = s->lotag;
|
||||
int sh = s->hitag;
|
||||
|
||||
|
@ -3532,7 +3532,7 @@ void handle_se08(DDukeActor *actor, bool checkhitag1)
|
|||
if (((ac->s->lotag) == st) && (ac->s->hitag) == sh)
|
||||
{
|
||||
sn = ac->s->sectnum;
|
||||
auto sect = ac->getSector();
|
||||
auto sect = ac->sector();
|
||||
int m = ac->s->shade;
|
||||
|
||||
for (auto& wal : wallsofsector(sect))
|
||||
|
@ -3583,7 +3583,7 @@ void handle_se10(DDukeActor* actor, const int* specialtags)
|
|||
{
|
||||
auto s = actor->s;
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sc = actor->getSector();
|
||||
auto sc = actor->sector();
|
||||
int sh = s->hitag;
|
||||
|
||||
if ((sc->lotag & 0xff) == 27 || (sc->floorz > sc->ceilingz && (sc->lotag & 0xff) != 23) || sc->lotag == 32791 - 65536)
|
||||
|
@ -3626,7 +3626,7 @@ void handle_se11(DDukeActor *actor)
|
|||
{
|
||||
auto s = actor->s;
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sc = actor->getSector();
|
||||
auto sc = actor->sector();
|
||||
if (t[5] > 0)
|
||||
{
|
||||
t[5]--;
|
||||
|
@ -3690,7 +3690,7 @@ void handle_se12(DDukeActor *actor, int planeonly)
|
|||
{
|
||||
auto s = actor->s;
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sc = actor->getSector();
|
||||
auto sc = actor->sector();
|
||||
if (t[0] == 3 || t[3] == 1) //Lights going off
|
||||
{
|
||||
sc->floorpal = 0;
|
||||
|
@ -3708,7 +3708,7 @@ void handle_se12(DDukeActor *actor, int planeonly)
|
|||
sc->ceilingshade = t[2];
|
||||
t[0] = 0;
|
||||
|
||||
DukeSectIterator it(s->sectnum);
|
||||
DukeSectIterator it(sc);
|
||||
while (auto a2 = it.Next())
|
||||
{
|
||||
if (a2->s->cstat & 16)
|
||||
|
@ -3771,7 +3771,7 @@ void handle_se13(DDukeActor* actor)
|
|||
{
|
||||
auto s = actor->s;
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sc = actor->getSector();
|
||||
auto sc = actor->sector();
|
||||
if (t[2])
|
||||
{
|
||||
int j = (s->yvel << 5) | 1;
|
||||
|
@ -3885,7 +3885,7 @@ void handle_se16(DDukeActor* actor, int REACTOR, int REACTOR2)
|
|||
{
|
||||
auto s = actor->s;
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sc = actor->getSector();
|
||||
auto sc = actor->sector();
|
||||
|
||||
t[2] += 32;
|
||||
if (sc->floorz < sc->ceilingz) s->shade = 0;
|
||||
|
@ -3930,7 +3930,7 @@ void handle_se17(DDukeActor* actor)
|
|||
{
|
||||
auto s = actor->s;
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sc = actor->getSector();
|
||||
auto sc = actor->sector();
|
||||
int sh = s->hitag;
|
||||
|
||||
int q = t[0] * (s->yvel << 2);
|
||||
|
@ -3983,7 +3983,7 @@ void handle_se17(DDukeActor* actor)
|
|||
while ((act2 = it.Next()))
|
||||
{
|
||||
if (actor != act2 && (act2->s->lotag) == 17)
|
||||
if ((sc->hitag - t[0]) == (act2->getSector()->hitag) && sh == (act2->s->hitag))
|
||||
if ((sc->hitag - t[0]) == (act2->sector()->hitag) && sh == (act2->s->hitag))
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -4044,7 +4044,7 @@ void handle_se17(DDukeActor* actor)
|
|||
void handle_se18(DDukeActor *actor, bool morecheck)
|
||||
{
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sc = actor->getSector();
|
||||
auto sc = actor->sector();
|
||||
|
||||
if (t[0])
|
||||
{
|
||||
|
@ -4141,7 +4141,7 @@ void handle_se18(DDukeActor *actor, bool morecheck)
|
|||
void handle_se19(DDukeActor *actor, int BIGFORCE)
|
||||
{
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sc = actor->getSector();
|
||||
auto sc = actor->sector();
|
||||
int sh = actor->s->hitag;
|
||||
|
||||
if (t[0])
|
||||
|
@ -4177,9 +4177,9 @@ void handle_se19(DDukeActor *actor, int BIGFORCE)
|
|||
auto a2Owner = a2->GetOwner();
|
||||
if (a2->s->lotag == 0 && a2->s->hitag == sh && a2Owner)
|
||||
{
|
||||
auto sectp = a2Owner->getSector();
|
||||
a2->getSector()->floorpal = a2->getSector()->ceilingpal = sectp->floorpal;
|
||||
a2->getSector()->floorshade = a2->getSector()->ceilingshade = sectp->floorshade;
|
||||
auto sectp = a2Owner->sector();
|
||||
a2->sector()->floorpal = a2->sector()->ceilingpal = sectp->floorpal;
|
||||
a2->sector()->floorshade = a2->sector()->ceilingshade = sectp->floorshade;
|
||||
a2Owner->temp_data[0] = 2;
|
||||
}
|
||||
}
|
||||
|
@ -4203,7 +4203,7 @@ void handle_se19(DDukeActor *actor, int BIGFORCE)
|
|||
case 0:
|
||||
if (ac->s->hitag == sh && ac->GetOwner())
|
||||
{
|
||||
auto sectp = ac->getSector();
|
||||
auto sectp = ac->sector();
|
||||
sectp->floorshade = sectp->ceilingshade = ac->GetOwner()->s->shade;
|
||||
sectp->floorpal = sectp->ceilingpal = ac->GetOwner()->s->pal;
|
||||
}
|
||||
|
@ -4238,7 +4238,7 @@ void handle_se20(DDukeActor* actor)
|
|||
{
|
||||
auto s = actor->s;
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sc = actor->getSector();
|
||||
auto sc = actor->sector();
|
||||
|
||||
if (t[0] == 0) return;
|
||||
if (t[0] == 1) s->xvel = 8;
|
||||
|
@ -4271,7 +4271,7 @@ void handle_se20(DDukeActor* actor)
|
|||
a2->s->x += x;
|
||||
a2->s->y += l;
|
||||
setsprite(a2, a2->s->pos);
|
||||
if (a2->getSector()->floorstat & 2)
|
||||
if (a2->sector()->floorstat & 2)
|
||||
if (a2->s->statnum == 2)
|
||||
makeitfall(a2);
|
||||
}
|
||||
|
@ -4311,7 +4311,7 @@ void handle_se21(DDukeActor* actor)
|
|||
{
|
||||
auto s = actor->s;
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sc = actor->getSector();
|
||||
auto sc = actor->sector();
|
||||
int* lp;
|
||||
|
||||
if (t[0] == 0) return;
|
||||
|
@ -4349,7 +4349,7 @@ void handle_se21(DDukeActor* actor)
|
|||
void handle_se22(DDukeActor* actor)
|
||||
{
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sc = actor->getSector();
|
||||
auto sc = actor->sector();
|
||||
if (t[1])
|
||||
{
|
||||
if (getanimationgoal(anim_ceilingz, actor->temp_sect) >= 0)
|
||||
|
@ -4368,7 +4368,7 @@ void handle_se26(DDukeActor* actor)
|
|||
{
|
||||
auto s = actor->s;
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sc = actor->getSector();
|
||||
auto sc = actor->sector();
|
||||
int x, l;
|
||||
|
||||
s->xvel = 32;
|
||||
|
@ -4548,7 +4548,7 @@ void handle_se24(DDukeActor *actor, const int16_t *list1, const int16_t *list2,
|
|||
}
|
||||
}
|
||||
}
|
||||
if (scroll) actor->getSector()->addfloorxpan(actor->s->yvel / 128.f);
|
||||
if (scroll) actor->sector()->addfloorxpan(actor->s->yvel / 128.f);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
@ -4560,7 +4560,7 @@ void handle_se24(DDukeActor *actor, const int16_t *list1, const int16_t *list2,
|
|||
void handle_se25(DDukeActor* actor, int t_index, int snd1, int snd2)
|
||||
{
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sec = actor->getSector();
|
||||
auto sec = actor->sector();
|
||||
|
||||
if (sec->floorz <= sec->ceilingz)
|
||||
actor->s->shade = 0;
|
||||
|
@ -4599,7 +4599,7 @@ void handle_se32(DDukeActor *actor)
|
|||
{
|
||||
auto s = actor->s;
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sc = actor->getSector();
|
||||
auto sc = actor->sector();
|
||||
|
||||
if (t[0] == 1)
|
||||
{
|
||||
|
@ -4667,7 +4667,7 @@ void handle_se35(DDukeActor *actor, int SMALLSMOKE, int EXPLOSION2)
|
|||
{
|
||||
auto s = actor->s;
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sc = actor->getSector();
|
||||
auto sc = actor->sector();
|
||||
|
||||
if (sc->ceilingz > s->z)
|
||||
for (int j = 0; j < 8; j++)
|
||||
|
@ -4753,7 +4753,7 @@ void handle_se128(DDukeActor *actor)
|
|||
void handle_se130(DDukeActor *actor, int countmax, int EXPLOSION2)
|
||||
{
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sc = actor->getSector();
|
||||
auto sc = actor->sector();
|
||||
|
||||
if (t[0] > countmax)
|
||||
{
|
||||
|
@ -4788,7 +4788,7 @@ void handle_se31(DDukeActor* actor, bool choosedir)
|
|||
{
|
||||
auto s = actor->s;
|
||||
int* t = &actor->temp_data[0];
|
||||
auto sec = actor->getSector();
|
||||
auto sec = actor->sector();
|
||||
|
||||
if (t[0] == 1)
|
||||
{
|
||||
|
|
|
@ -2101,7 +2101,7 @@ void movetransports_d(void)
|
|||
if (ps[p].GetActor()->s->extra > 0)
|
||||
S_PlayActorSound(DUKE_UNDERWATER, act2);
|
||||
ps[p].oposz = ps[p].pos.z =
|
||||
Owner->getSector()->ceilingz + (7 << 8);
|
||||
Owner->sector()->ceilingz + (7 << 8);
|
||||
|
||||
ps[p].posxv = 4096 - (krand() & 8192);
|
||||
ps[p].posyv = 4096 - (krand() & 8192);
|
||||
|
@ -2119,7 +2119,7 @@ void movetransports_d(void)
|
|||
S_PlayActorSound(DUKE_GASP, act2);
|
||||
|
||||
ps[p].oposz = ps[p].pos.z =
|
||||
Owner->getSector()->floorz - (7 << 8);
|
||||
Owner->sector()->floorz - (7 << 8);
|
||||
|
||||
ps[p].jumping_toggle = 1;
|
||||
ps[p].jumping_counter = 0;
|
||||
|
@ -2243,7 +2243,7 @@ void movetransports_d(void)
|
|||
{
|
||||
spr2->x += (Owner->s->x - spr->x);
|
||||
spr2->y += (Owner->s->y - spr->y);
|
||||
spr2->z -= spr->z - Owner->getSector()->floorz;
|
||||
spr2->z -= spr->z - Owner->sector()->floorz;
|
||||
spr2->ang = Owner->s->ang;
|
||||
|
||||
spr2->backupang();
|
||||
|
@ -2280,7 +2280,7 @@ void movetransports_d(void)
|
|||
case 1:
|
||||
spr2->x += (Owner->s->x - spr->x);
|
||||
spr2->y += (Owner->s->y - spr->y);
|
||||
spr2->z = Owner->getSector()->ceilingz + ll;
|
||||
spr2->z = Owner->sector()->ceilingz + ll;
|
||||
|
||||
spr2->backupz();
|
||||
|
||||
|
@ -2290,7 +2290,7 @@ void movetransports_d(void)
|
|||
case 2:
|
||||
spr2->x += (Owner->s->x - spr->x);
|
||||
spr2->y += (Owner->s->y - spr->y);
|
||||
spr2->z = Owner->getSector()->floorz - ll;
|
||||
spr2->z = Owner->sector()->floorz - ll;
|
||||
|
||||
spr2->backupz();
|
||||
|
||||
|
@ -3450,7 +3450,7 @@ void handle_se06_d(DDukeActor* actor)
|
|||
auto s = actor->s;
|
||||
auto t = &actor->temp_data[0];
|
||||
|
||||
auto sc = actor->getSector();
|
||||
auto sc = actor->sector();
|
||||
int sh = s->hitag;
|
||||
|
||||
int k = sc->extra;
|
||||
|
@ -3599,7 +3599,7 @@ void moveeffectors_d(void) //STATNUM 3
|
|||
DukeStatIterator it(STAT_EFFECTOR);
|
||||
while (auto act = it.Next())
|
||||
{
|
||||
auto sc = act->getSector();
|
||||
auto sc = act->sector();
|
||||
switch (act->s->lotag)
|
||||
{
|
||||
case SE_0_ROTATING_SECTOR:
|
||||
|
@ -3771,7 +3771,7 @@ void moveeffectors_d(void) //STATNUM 3
|
|||
while (auto act = it.Next())
|
||||
{
|
||||
if (act->s->lotag != SE_29_WAVES) continue;
|
||||
auto sc = act->getSector();
|
||||
auto sc = act->sector();
|
||||
if (sc->wallnum != 4) continue;
|
||||
auto wal = sc->firstWall() + 2;
|
||||
alignflorslope(act->s->sectnum, wal->x, wal->y, wal->nextSector()->floorz);
|
||||
|
|
|
@ -1669,7 +1669,7 @@ void movetransports_r(void)
|
|||
{
|
||||
k = 2;
|
||||
ps[p].oposz = ps[p].pos.z =
|
||||
Owner->getSector()->ceilingz + (7 << 8);
|
||||
Owner->sector()->ceilingz + (7 << 8);
|
||||
}
|
||||
|
||||
if (onfloorz && sectlotag == 161 && ps[p].pos.z < (sectp->ceilingz + (6 << 8)))
|
||||
|
@ -1677,7 +1677,7 @@ void movetransports_r(void)
|
|||
k = 2;
|
||||
if (ps[p].GetActor()->s->extra <= 0) break;
|
||||
ps[p].oposz = ps[p].pos.z =
|
||||
Owner->getSector()->floorz - (49 << 8);
|
||||
Owner->sector()->floorz - (49 << 8);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1692,7 +1692,7 @@ void movetransports_r(void)
|
|||
}
|
||||
S_PlayActorSound(DUKE_UNDERWATER, ps[p].GetActor());
|
||||
ps[p].oposz = ps[p].pos.z =
|
||||
Owner->getSector()->ceilingz + (7 << 8);
|
||||
Owner->sector()->ceilingz + (7 << 8);
|
||||
if (ps[p].OnMotorcycle)
|
||||
ps[p].moto_underwater = 1;
|
||||
}
|
||||
|
@ -1708,7 +1708,7 @@ void movetransports_r(void)
|
|||
S_PlayActorSound(DUKE_GASP, ps[p].GetActor());
|
||||
|
||||
ps[p].oposz = ps[p].pos.z =
|
||||
Owner->getSector()->floorz - (7 << 8);
|
||||
Owner->sector()->floorz - (7 << 8);
|
||||
}
|
||||
|
||||
if (k == 1)
|
||||
|
@ -1846,7 +1846,7 @@ void movetransports_r(void)
|
|||
{
|
||||
spr2->x += (Owner->s->x - spr->x);
|
||||
spr2->y += (Owner->s->y - spr->y);
|
||||
spr2->z -= spr->z - Owner->getSector()->floorz;
|
||||
spr2->z -= spr->z - Owner->sector()->floorz;
|
||||
spr2->ang = Owner->s->ang;
|
||||
|
||||
spr2->backupang();
|
||||
|
@ -1880,7 +1880,7 @@ void movetransports_r(void)
|
|||
case ST_1_ABOVE_WATER:
|
||||
spr2->x += (Owner->s->x - spr->x);
|
||||
spr2->y += (Owner->s->y - spr->y);
|
||||
spr2->z = Owner->getSector()->ceilingz + ll;
|
||||
spr2->z = Owner->sector()->ceilingz + ll;
|
||||
|
||||
spr2->backupz();
|
||||
|
||||
|
@ -1890,7 +1890,7 @@ void movetransports_r(void)
|
|||
case ST_2_UNDERWATER:
|
||||
spr2->x += (Owner->s->x - spr->x);
|
||||
spr2->y += (Owner->s->y - spr->y);
|
||||
spr2->z = Owner->getSector()->floorz - ll;
|
||||
spr2->z = Owner->sector()->floorz - ll;
|
||||
|
||||
spr2->backupz();
|
||||
|
||||
|
@ -1902,7 +1902,7 @@ void movetransports_r(void)
|
|||
if (!isRRRA()) break;
|
||||
spr2->x += (Owner->s->x - spr->x);
|
||||
spr2->y += (Owner->s->y - spr->y);
|
||||
spr2->z = Owner->getSector()->ceilingz + ll2;
|
||||
spr2->z = Owner->sector()->ceilingz + ll2;
|
||||
|
||||
spr2->backupz();
|
||||
|
||||
|
@ -1916,7 +1916,7 @@ void movetransports_r(void)
|
|||
if (!isRRRA()) break;
|
||||
spr2->x += (Owner->s->x - spr->x);
|
||||
spr2->y += (Owner->s->y - spr->y);
|
||||
spr2->z = Owner->getSector()->floorz - ll2;
|
||||
spr2->z = Owner->sector()->floorz - ll2;
|
||||
|
||||
spr2->backupz();
|
||||
|
||||
|
@ -2963,7 +2963,7 @@ void moveactors_r(void)
|
|||
if (sectp->lotag == 1)
|
||||
{
|
||||
auto j = spawn(act, WATERSPLASH2);
|
||||
if (j) j->s->z = j->getSector()->floorz;
|
||||
if (j) j->s->z = j->sector()->floorz;
|
||||
}
|
||||
deletesprite(act);
|
||||
continue;
|
||||
|
@ -3351,7 +3351,7 @@ void handle_se06_r(DDukeActor *actor)
|
|||
auto s = actor->s;
|
||||
auto t = &actor->temp_data[0];
|
||||
|
||||
auto sc = actor->getSector();
|
||||
auto sc = actor->sector();
|
||||
int sh = s->hitag;
|
||||
|
||||
int k = sc->extra;
|
||||
|
@ -3375,7 +3375,7 @@ void handle_se06_r(DDukeActor *actor)
|
|||
auto ns = spawn(actor, HULK);
|
||||
if (ns)
|
||||
{
|
||||
ns->s->z = ns->getSector()->ceilingz;
|
||||
ns->s->z = ns->sector()->ceilingz;
|
||||
ns->s->pal = 33;
|
||||
}
|
||||
if (!hulkspawn)
|
||||
|
@ -3433,7 +3433,7 @@ void handle_se06_r(DDukeActor *actor)
|
|||
}
|
||||
else pn = UFO1_RRRA;
|
||||
auto ns = spawn(actor, pn);
|
||||
if (ns) ns->s->z = ns->getSector()->ceilingz;
|
||||
if (ns) ns->s->z = ns->sector()->ceilingz;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3473,7 +3473,7 @@ void moveeffectors_r(void) //STATNUM 3
|
|||
DukeStatIterator it(STAT_EFFECTOR);
|
||||
while (auto act = it.Next())
|
||||
{
|
||||
auto sc = act->getSector();
|
||||
auto sc = act->sector();
|
||||
int st = act->s->lotag;
|
||||
|
||||
auto t = &act->temp_data[0];
|
||||
|
@ -3658,7 +3658,7 @@ void moveeffectors_r(void) //STATNUM 3
|
|||
while (auto act = it.Next())
|
||||
{
|
||||
if (act->s->lotag != SE_29_WAVES) continue;
|
||||
auto sc = act->getSector();
|
||||
auto sc = act->sector();
|
||||
if (sc->wallnum != 4) continue;
|
||||
auto wal = sc->firstWall() + 2;
|
||||
alignflorslope(act->s->sectnum, wal->x, wal->y, wal->nextSector()->floorz);
|
||||
|
@ -4142,7 +4142,7 @@ void destroyit(DDukeActor *actor)
|
|||
{
|
||||
sectnum = spr->s->sectnum;
|
||||
|
||||
auto destsect = spr->getSector();
|
||||
auto destsect = spr->sector();
|
||||
auto srcsect = it_sect;
|
||||
|
||||
auto destwal = destsect->firstWall();
|
||||
|
|
|
@ -50,7 +50,7 @@ void ballreturn(DDukeActor *ball)
|
|||
{
|
||||
act2->s->lotag = 100;
|
||||
act2->s->extra++;
|
||||
pinsectorresetdown(act2->getSector());
|
||||
pinsectorresetdown(act2->sector());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1965,7 +1965,7 @@ int ParseState::parse(void)
|
|||
break;
|
||||
case concmd_larrybird:
|
||||
insptr++;
|
||||
ps[g_p].pos.z = ps[g_p].GetActor()->getSector()->ceilingz;
|
||||
ps[g_p].pos.z = ps[g_p].GetActor()->sector()->ceilingz;
|
||||
ps[g_p].GetActor()->s->z = ps[g_p].pos.z;
|
||||
break;
|
||||
case concmd_destroyit:
|
||||
|
|
|
@ -126,11 +126,11 @@ static void shootmelee(DDukeActor *actor, int p, int sx, int sy, int sz, int sa,
|
|||
ny = hity + (effector->GetOwner()->s->y - effector->s->y);
|
||||
if (hitsectp->lotag == 161)
|
||||
{
|
||||
nz = effector->GetOwner()->getSector()->floorz;
|
||||
nz = effector->GetOwner()->sector()->floorz;
|
||||
}
|
||||
else
|
||||
{
|
||||
nz = effector->GetOwner()->getSector()->ceilingz;
|
||||
nz = effector->GetOwner()->sector()->ceilingz;
|
||||
}
|
||||
hitscan(nx, ny, nz, effector->GetOwner()->s->sectnum, bcos(sa), bsin(sa), zvel << 6,
|
||||
&hitsectp, &wal, &hitsprt, &hitx, &hity, &hitz, CLIPMASK1);
|
||||
|
@ -288,11 +288,11 @@ static void shootweapon(DDukeActor* actor, int p, int sx, int sy, int sz, int sa
|
|||
ny = hity + (effector->GetOwner()->s->y - effector->s->y);
|
||||
if (hitsectp->lotag == 161)
|
||||
{
|
||||
nz = effector->GetOwner()->getSector()->floorz;
|
||||
nz = effector->GetOwner()->sector()->floorz;
|
||||
}
|
||||
else
|
||||
{
|
||||
nz = effector->GetOwner()->getSector()->ceilingz;
|
||||
nz = effector->GetOwner()->sector()->ceilingz;
|
||||
}
|
||||
hitscan(nx, ny, nz, effector->GetOwner()->s->sectnum, bcos(sa), bsin(sa), zvel << 6,
|
||||
&hitsectp, &wal, &hitsprt, &hitx, &hity, &hitz, CLIPMASK1);
|
||||
|
|
|
@ -1023,7 +1023,7 @@ void enterlevel(MapRecord *mi, int gamemode)
|
|||
for (int i = connecthead; i >= 0; i = connectpoint2[i])
|
||||
{
|
||||
bool clearweapon = !!(currentLevel->flags & LEVEL_CLEARWEAPONS);
|
||||
int pn = ps[i].GetActor()->getSector()->floorpicnum;
|
||||
int pn = ps[i].GetActor()->sector()->floorpicnum;
|
||||
if (pn == TILE_HURTRAIL || pn == TILE_FLOORSLIME || pn == TILE_FLOORPLASMA)
|
||||
{
|
||||
resetinventory(i);
|
||||
|
|
|
@ -458,7 +458,7 @@ bool activatewarpelevators(DDukeActor* actor, int d) //Parm = sectoreffectornum
|
|||
if (act2->s->lotag == SE_17_WARP_ELEVATOR || (isRRRA() && act2->s->lotag == SE_18_INCREMENTAL_SECTOR_RISE_FALL))
|
||||
if (act2->s->hitag == actor->s->hitag)
|
||||
if ((abs(sect->floorz - actor->temp_data[2]) > act2->s->yvel) ||
|
||||
(act2->getSector()->hitag == (sect->hitag - d)))
|
||||
(act2->sector()->hitag == (sect->hitag - d)))
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -686,7 +686,7 @@ static void handle_st29(sectortype* sptr, DDukeActor* actor)
|
|||
if ((act2->s->lotag == 22) &&
|
||||
(act2->s->hitag == sptr->hitag))
|
||||
{
|
||||
act2->getSector()->extra = -act2->getSector()->extra;
|
||||
act2->sector()->extra = -act2->sector()->extra;
|
||||
|
||||
act2->temp_sect = sptr;
|
||||
act2->temp_data[1] = 1;
|
||||
|
@ -824,7 +824,7 @@ static void handle_st23(sectortype* sptr, DDukeActor* actor)
|
|||
}
|
||||
if (!act2) return;
|
||||
|
||||
int l = act2->getSector()->lotag & 0x8000;
|
||||
int l = act2->sector()->lotag & 0x8000;
|
||||
|
||||
if (act2)
|
||||
{
|
||||
|
@ -832,7 +832,7 @@ static void handle_st23(sectortype* sptr, DDukeActor* actor)
|
|||
|
||||
while (auto act3 = it.Next())
|
||||
{
|
||||
if (l == (act3->getSector()->lotag & 0x8000) && act3->s->lotag == SE_11_SWINGING_DOOR && act2->s->hitag == act3->s->hitag && act3->temp_data[4])
|
||||
if (l == (act3->sector()->lotag & 0x8000) && act3->s->lotag == SE_11_SWINGING_DOOR && act2->s->hitag == act3->s->hitag && act3->temp_data[4])
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -841,10 +841,10 @@ static void handle_st23(sectortype* sptr, DDukeActor* actor)
|
|||
it.Reset(STAT_EFFECTOR);
|
||||
while (auto act3 = it.Next())
|
||||
{
|
||||
if (l == (act3->getSector()->lotag & 0x8000) && act3->s->lotag == SE_11_SWINGING_DOOR && act2->s->hitag == act3->s->hitag)
|
||||
if (l == (act3->sector()->lotag & 0x8000) && act3->s->lotag == SE_11_SWINGING_DOOR && act2->s->hitag == act3->s->hitag)
|
||||
{
|
||||
if (act3->getSector()->lotag & 0x8000) act3->getSector()->lotag &= 0x7fff;
|
||||
else act3->getSector()->lotag |= 0x8000;
|
||||
if (act3->sector()->lotag & 0x8000) act3->sector()->lotag &= 0x7fff;
|
||||
else act3->sector()->lotag |= 0x8000;
|
||||
act3->temp_data[4] = 1;
|
||||
act3->temp_data[3] = -act3->temp_data[3];
|
||||
if (q == 0)
|
||||
|
@ -885,11 +885,11 @@ static void handle_st25(sectortype* sptr, DDukeActor* actor)
|
|||
{
|
||||
if (act3->s->lotag == 15)
|
||||
{
|
||||
act3->getSector()->lotag ^= 0x8000; // Toggle the open or close
|
||||
act3->sector()->lotag ^= 0x8000; // Toggle the open or close
|
||||
act3->s->ang += 1024;
|
||||
if (act3->temp_data[4]) callsound(act3->getSector(), act3);
|
||||
callsound(act3->getSector(), act3);
|
||||
if (act3->getSector()->lotag & 0x8000) act3->temp_data[4] = 1;
|
||||
if (act3->temp_data[4]) callsound(act3->sector(), act3);
|
||||
callsound(act3->sector(), act3);
|
||||
if (act3->sector()->lotag & 0x8000) act3->temp_data[4] = 1;
|
||||
else act3->temp_data[4] = 2;
|
||||
}
|
||||
}
|
||||
|
@ -1104,11 +1104,11 @@ void operateactivators(int low, int plnum)
|
|||
{
|
||||
if (act->s->picnum == ACTIVATORLOCKED)
|
||||
{
|
||||
act->getSector()->lotag ^= 16384;
|
||||
act->sector()->lotag ^= 16384;
|
||||
|
||||
if (plnum >= 0)
|
||||
{
|
||||
if (act->getSector()->lotag & 16384)
|
||||
if (act->sector()->lotag & 16384)
|
||||
FTA(4, &ps[plnum]);
|
||||
else FTA(8, &ps[plnum]);
|
||||
}
|
||||
|
@ -1120,20 +1120,20 @@ void operateactivators(int low, int plnum)
|
|||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
if (act->getSector()->floorz != act->getSector()->ceilingz)
|
||||
if (act->sector()->floorz != act->sector()->ceilingz)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (act->getSector()->floorz == act->getSector()->ceilingz)
|
||||
if (act->sector()->floorz == act->sector()->ceilingz)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (act->getSector()->lotag < 3)
|
||||
if (act->sector()->lotag < 3)
|
||||
{
|
||||
DukeSectIterator it(act->s->sectnum);
|
||||
while (auto a2 = it.Next())
|
||||
|
@ -1147,16 +1147,16 @@ void operateactivators(int low, int plnum)
|
|||
case SE_31_FLOOR_RISE_FALL:
|
||||
case SE_32_CEILING_RISE_FALL:
|
||||
a2->temp_data[0] = 1 - a2->temp_data[0];
|
||||
callsound(act->getSector(), a2);
|
||||
callsound(act->sector(), a2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (k == -1 && (act->getSector()->lotag & 0xff) == 22)
|
||||
k = callsound(act->getSector(), act);
|
||||
if (k == -1 && (act->sector()->lotag & 0xff) == 22)
|
||||
k = callsound(act->sector(), act);
|
||||
|
||||
operatesectors(act->getSector(), act);
|
||||
operatesectors(act->sector(), act);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1242,8 +1242,8 @@ void allignwarpelevators(void)
|
|||
{
|
||||
if ((act2->s->lotag) == SE_17_WARP_ELEVATOR && act != act2 && act->s->hitag == act2->s->hitag)
|
||||
{
|
||||
act2->getSector()->floorz = act->getSector()->floorz;
|
||||
act2->getSector()->ceilingz = act->getSector()->ceilingz;
|
||||
act2->sector()->floorz = act->sector()->floorz;
|
||||
act2->sector()->ceilingz = act->sector()->ceilingz;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -560,7 +560,7 @@ bool checkhitswitch_d(int snum, walltype* wwal, DDukeActor *act)
|
|||
switch (other->s->lotag)
|
||||
{
|
||||
case SE_12_LIGHT_SWITCH:
|
||||
other->getSector()->floorpal = 0;
|
||||
other->sector()->floorpal = 0;
|
||||
other->temp_data[0]++;
|
||||
if (other->temp_data[0] == 2)
|
||||
other->temp_data[0]++;
|
||||
|
@ -1664,7 +1664,7 @@ void checksectors_d(int snum)
|
|||
}
|
||||
|
||||
if (p->newOwner == nullptr && neartagsprite == nullptr && ntsector == nullptr && ntwall == nullptr)
|
||||
if (isanunderoperator(p->GetActor()->getSector()->lotag))
|
||||
if (isanunderoperator(p->GetActor()->sector()->lotag))
|
||||
ntsector = p->GetActor()->s->sector();
|
||||
|
||||
if (ntsector && (ntsector->lotag & 16384))
|
||||
|
@ -1820,9 +1820,9 @@ void checksectors_d(int snum)
|
|||
}
|
||||
operatesectors(ntsector, p->GetActor());
|
||||
}
|
||||
else if ((p->GetActor()->getSector()->lotag & 16384) == 0)
|
||||
else if ((p->GetActor()->sector()->lotag & 16384) == 0)
|
||||
{
|
||||
if (isanunderoperator(p->GetActor()->getSector()->lotag))
|
||||
if (isanunderoperator(p->GetActor()->sector()->lotag))
|
||||
{
|
||||
DukeSectIterator it(p->GetActor()->s->sectnum);
|
||||
while (auto act = it.Next())
|
||||
|
|
|
@ -844,7 +844,7 @@ bool checkhitswitch_r(int snum, walltype* wwal, DDukeActor* act)
|
|||
if (!isRRRA()) break;
|
||||
[[fallthrough]];
|
||||
case SE_12_LIGHT_SWITCH:
|
||||
other->getSector()->floorpal = 0;
|
||||
other->sector()->floorpal = 0;
|
||||
other->temp_data[0]++;
|
||||
if (other->temp_data[0] == 2)
|
||||
other->temp_data[0]++;
|
||||
|
@ -2611,7 +2611,7 @@ void checksectors_r(int snum)
|
|||
}
|
||||
|
||||
if (p->newOwner == nullptr && neartagsprite == nullptr && ntsector == nullptr && ntwall == nullptr)
|
||||
if (isanunderoperator(p->GetActor()->getSector()->lotag))
|
||||
if (isanunderoperator(p->GetActor()->sector()->lotag))
|
||||
ntsector = p->GetActor()->s->sector();
|
||||
|
||||
if (ntsector && (ntsector->lotag & 16384))
|
||||
|
@ -2770,9 +2770,9 @@ void checksectors_r(int snum)
|
|||
FTA(41, p);
|
||||
}
|
||||
}
|
||||
else if ((p->GetActor()->getSector()->lotag & 16384) == 0)
|
||||
else if ((p->GetActor()->sector()->lotag & 16384) == 0)
|
||||
{
|
||||
if (isanunderoperator(p->GetActor()->getSector()->lotag))
|
||||
if (isanunderoperator(p->GetActor()->sector()->lotag))
|
||||
{
|
||||
DukeSectIterator it(p->GetActor()->s->sectnum);
|
||||
while (auto act = it.Next())
|
||||
|
|
|
@ -96,7 +96,7 @@ struct DDukeActor
|
|||
return s->yvel;
|
||||
}
|
||||
|
||||
sectortype* getSector() const
|
||||
sectortype* sector() const
|
||||
{
|
||||
return s->sector();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue