- Duke: replaced most read access to DDukeActor::floorz/ceilingz with a wrapper function.

This commit is contained in:
Christoph Oelckers 2022-02-04 00:36:51 +01:00
parent 793e9b7623
commit 4787bddddd
11 changed files with 70 additions and 70 deletions

View file

@ -1270,7 +1270,7 @@ void bounce(DDukeActor* actor)
int daang = getangle(sectp->firstWall()->delta());
int k, l;
if (actor->int_pos().Z < (actor->__int_floorz + actor->__int_ceilingz) >> 1)
if (actor->int_pos().Z < (actor->actor_int_floorz() + actor->actor_int_ceilingz()) >> 1)
k = sectp->ceilingheinum;
else
k = sectp->floorheinum;
@ -1645,7 +1645,7 @@ void recon(DDukeActor *actor, int explosion, int firelaser, int attacksnd, int p
actor->spr.ang += 96;
actor->spr.xvel = 128;
int j = ssp(actor, CLIPMASK0);
if (j != 1 || actor->int_pos().Z > actor->__int_floorz)
if (j != 1 || actor->int_pos().Z > actor->actor_int_floorz())
{
for (int l = 0; l < 16; l++)
RANDOMSCRAP(actor);
@ -1659,8 +1659,8 @@ void recon(DDukeActor *actor, int explosion, int firelaser, int attacksnd, int p
}
else
{
if (actor->int_pos().Z > actor->__int_floorz - (48 << 8))
actor->set_int_z(actor->__int_floorz - (48 << 8));
if (actor->int_pos().Z > actor->actor_int_floorz() - (48 << 8))
actor->set_int_z(actor->actor_int_floorz() - (48 << 8));
}
int x;
@ -1799,7 +1799,7 @@ void ooz(DDukeActor *actor)
{
getglobalz(actor);
int j = (actor->__int_floorz - actor->__int_ceilingz) >> 9;
int j = (actor->actor_int_floorz() - actor->actor_int_ceilingz()) >> 9;
if (j > 255) j = 255;
int x = 25 - (j >> 1);
@ -1808,7 +1808,7 @@ void ooz(DDukeActor *actor)
actor->spr.yrepeat = j;
actor->spr.xrepeat = x;
actor->set_int_z(actor->__int_floorz);
actor->set_int_z(actor->actor_int_floorz());
}
//---------------------------------------------------------------------------
@ -2320,7 +2320,7 @@ bool bloodpool(DDukeActor* actor, bool puke)
int x;
int p = findplayer(actor, &x);
actor->set_int_z(actor->__int_floorz - (FOURSLEIGHT));
actor->set_int_z(actor->actor_int_floorz() - (FOURSLEIGHT));
if (actor->temp_data[2] < 32)
{
@ -2449,7 +2449,7 @@ void glasspieces(DDukeActor* actor)
return;
}
if (actor->int_pos().Z == actor->__int_floorz - (FOURSLEIGHT) && actor->temp_data[0] < 3)
if (actor->int_pos().Z == actor->actor_int_floorz() - (FOURSLEIGHT) && actor->temp_data[0] < 3)
{
actor->spr.zvel = -((3 - actor->temp_data[0]) << 8) - (krand() & 511);
if (sectp->lotag == 2)
@ -3900,8 +3900,8 @@ void handle_se17(DDukeActor* actor)
ps[p].bobpos.Y = ps[p].opos.Y = ps[p].pos.Y;
ps[p].opos.Z = ps[p].pos.Z;
ps[p].truefz = act3->__int_floorz;
ps[p].truecz = act3->__int_ceilingz;
ps[p].truefz = act3->actor_int_floorz();
ps[p].truecz = act3->actor_int_ceilingz();
ps[p].bobcounter = 0;
ChangeActorSect(act3, act2->sector());
@ -4401,7 +4401,7 @@ void handle_se24(DDukeActor *actor, bool scroll, int shift)
wallswitchcheck(a2))
continue;
if (a2->int_pos().Z > (a2->__int_floorz - (16 << 8)))
if (a2->int_pos().Z > (a2->actor_int_floorz() - (16 << 8)))
{
a2->add_int_pos({ x >> shift , y >> shift, 0 });
@ -4880,7 +4880,7 @@ void makeitfall(DDukeActor* actor)
actor->__int_floorz = actor->sector()->int_floorz();
}
if( actor->int_pos().Z < actor->__int_floorz-(FOURSLEIGHT) )
if( actor->int_pos().Z < actor->actor_int_floorz()-(FOURSLEIGHT) )
{
if( actor->sector()->lotag == 2 && actor->spr.zvel > 3122 )
actor->spr.zvel = 3144;
@ -4889,9 +4889,9 @@ void makeitfall(DDukeActor* actor)
else actor->spr.zvel = 6144;
actor->add_int_z(actor->spr.zvel);
}
if( actor->int_pos().Z >= actor->__int_floorz-(FOURSLEIGHT) )
if( actor->int_pos().Z >= actor->actor_int_floorz()-(FOURSLEIGHT) )
{
actor->set_int_z(actor->__int_floorz - FOURSLEIGHT);
actor->set_int_z(actor->actor_int_floorz() - FOURSLEIGHT);
actor->spr.zvel = 0;
}
}
@ -5113,7 +5113,7 @@ void fall_common(DDukeActor *actor, int playernum, int JIBS6, int DRONE, int BLO
}
else actor->cgg--;
if (actor->int_pos().Z < (actor->__int_floorz - FOURSLEIGHT))
if (actor->int_pos().Z < (actor->actor_int_floorz() - FOURSLEIGHT))
{
actor->spr.zvel += c;
actor->add_int_z(actor->spr.zvel);
@ -5122,7 +5122,7 @@ void fall_common(DDukeActor *actor, int playernum, int JIBS6, int DRONE, int BLO
}
else
{
actor->set_int_z(actor->__int_floorz - FOURSLEIGHT);
actor->set_int_z(actor->actor_int_floorz() - FOURSLEIGHT);
if (badguy(actor) || (actor->isPlayer() && actor->GetOwner()))
{

View file

@ -500,7 +500,7 @@ int movesprite_ex_d(DDukeActor* actor, int xchange, int ychange, int zchange, un
if (dasectp != actor->sector())
ChangeActorSect(actor, dasectp);
int daz = actor->int_pos().Z + ((zchange * TICSPERFRAME) >> 3);
if ((daz > actor->__int_ceilingz) && (daz <= actor->__int_floorz))
if ((daz > actor->actor_int_ceilingz()) && (daz <= actor->actor_int_floorz()))
actor->set_int_z(daz);
else if (result.type == kHitNone)
return result.setSector(dasectp);
@ -1552,14 +1552,14 @@ static void weaponcommon_d(DDukeActor* proj)
if (coll.type != kHitSprite && proj->spr.picnum != FREEZEBLAST)
{
if (proj->int_pos().Z < proj->__int_ceilingz)
if (proj->int_pos().Z < proj->actor_int_ceilingz())
{
coll.setSector(proj->sector());
proj->spr.zvel = -1;
}
else
if ((proj->int_pos().Z > proj->__int_floorz && proj->sector()->lotag != 1) ||
(proj->int_pos().Z > proj->__int_floorz + (16 << 8) && proj->sector()->lotag == 1))
if ((proj->int_pos().Z > proj->actor_int_floorz() && proj->sector()->lotag != 1) ||
(proj->int_pos().Z > proj->actor_int_floorz() + (16 << 8) && proj->sector()->lotag == 1))
{
coll.setSector(proj->sector());
if (proj->sector()->lotag != 1)
@ -2353,7 +2353,7 @@ static void greenslime(DDukeActor *actor)
actor->spr.zvel = 0;
actor->spr.cstat &= ~CSTAT_SPRITE_YFLIP;
if ((sectp->ceilingstat & CSTAT_SECTOR_SKY) || (actor->__int_ceilingz + 6144) < actor->int_pos().Z)
if ((sectp->ceilingstat & CSTAT_SECTOR_SKY) || (actor->actor_int_ceilingz() + 6144) < actor->int_pos().Z)
{
actor->add_int_z(2048);
actor->temp_data[0] = 3;
@ -2387,7 +2387,7 @@ static void greenslime(DDukeActor *actor)
actor->spr.yrepeat = 16 + bsin(actor->temp_data[1], -13);
if (rnd(4) && (sectp->ceilingstat & CSTAT_SECTOR_SKY) == 0 &&
abs(actor->__int_floorz - actor->__int_ceilingz)
abs(actor->actor_int_floorz() - actor->actor_int_ceilingz())
< (192 << 8))
{
actor->spr.zvel = 0;
@ -2404,9 +2404,9 @@ static void greenslime(DDukeActor *actor)
if (actor->spr.zvel > -(2048 + 1024))
actor->spr.zvel -= 348;
actor->add_int_z(actor->spr.zvel);
if (actor->int_pos().Z < actor->__int_ceilingz + 4096)
if (actor->int_pos().Z < actor->actor_int_ceilingz() + 4096)
{
actor->set_int_z(actor->__int_ceilingz + 4096);
actor->set_int_z(actor->actor_int_ceilingz() + 4096);
actor->spr.xvel = 0;
actor->temp_data[0] = 2;
}
@ -2418,7 +2418,7 @@ static void greenslime(DDukeActor *actor)
makeitfall(actor);
if (actor->int_pos().Z > actor->__int_floorz - (8 << 8))
if (actor->int_pos().Z > actor->actor_int_floorz() - (8 << 8))
{
actor->spr.yrepeat -= 4;
actor->spr.xrepeat += 2;
@ -2429,9 +2429,9 @@ static void greenslime(DDukeActor *actor)
if (actor->spr.xrepeat > 8) actor->spr.xrepeat -= 4;
}
if (actor->int_pos().Z > actor->__int_floorz - 2048)
if (actor->int_pos().Z > actor->actor_int_floorz() - 2048)
{
actor->set_int_z(actor->__int_floorz - 2048);
actor->set_int_z(actor->actor_int_floorz() - 2048);
actor->temp_data[0] = 0;
actor->spr.xvel = 0;
}
@ -2490,13 +2490,13 @@ static void flamethrowerflame(DDukeActor *actor)
if (coll.type != kHitSprite)
{
if (actor->int_pos().Z < actor->__int_ceilingz)
if (actor->int_pos().Z < actor->actor_int_ceilingz())
{
coll.setSector(actor->sector());
actor->spr.zvel = -1;
}
else if ((actor->int_pos().Z > actor->__int_floorz && actor->sector()->lotag != 1)
|| (actor->int_pos().Z > actor->__int_floorz + (16 << 8) && actor->sector()->lotag == 1))
else if ((actor->int_pos().Z > actor->actor_int_floorz() && actor->sector()->lotag != 1)
|| (actor->int_pos().Z > actor->actor_int_floorz() + (16 << 8) && actor->sector()->lotag == 1))
{
coll.setSector(actor->sector());
if (actor->sector()->lotag != 1)
@ -2583,18 +2583,18 @@ static void heavyhbomb(DDukeActor *actor)
{
makeitfall(actor);
if (sectp->lotag != 1 && actor->int_pos().Z >= actor->__int_floorz - (FOURSLEIGHT) && actor->spr.yvel < 3)
if (sectp->lotag != 1 && actor->int_pos().Z >= actor->actor_int_floorz() - (FOURSLEIGHT) && actor->spr.yvel < 3)
{
if (actor->spr.yvel > 0 || (actor->spr.yvel == 0 && actor->__int_floorz == sectp->int_floorz()))
if (actor->spr.yvel > 0 || (actor->spr.yvel == 0 && actor->actor_int_floorz() == sectp->int_floorz()))
S_PlayActorSound(PIPEBOMB_BOUNCE, actor);
actor->spr.zvel = -((4 - actor->spr.yvel) << 8);
if (actor->sector()->lotag == 2)
actor->spr.zvel >>= 2;
actor->spr.yvel++;
}
if (actor->int_pos().Z < actor->__int_ceilingz) // && sectp->lotag != 2 )
if (actor->int_pos().Z < actor->actor_int_ceilingz()) // && sectp->lotag != 2 )
{
actor->set_int_z(actor->__int_ceilingz + (3 << 8));
actor->set_int_z(actor->actor_int_ceilingz() + (3 << 8));
actor->spr.zvel = 0;
}
}

View file

@ -416,7 +416,7 @@ int movesprite_ex_r(DDukeActor* actor, int xchange, int ychange, int zchange, un
if ((dasectp != actor->sector()))
ChangeActorSect(actor, dasectp);
int daz = actor->int_pos().Z + ((zchange * TICSPERFRAME) >> 3);
if ((daz > actor->__int_ceilingz) && (daz <= actor->__int_floorz))
if ((daz > actor->actor_int_ceilingz()) && (daz <= actor->actor_int_floorz()))
actor->set_int_z(daz);
else if (result.type == kHitNone)
return result.setSector(dasectp);
@ -1244,13 +1244,13 @@ static void weaponcommon_r(DDukeActor *proj)
if (coll.type != kHitSprite && proj->spr.picnum != FREEZEBLAST)
{
if (proj->int_pos().Z < proj->__int_ceilingz)
if (proj->int_pos().Z < proj->actor_int_ceilingz())
{
coll.setSector(proj->sector());
proj->spr.zvel = -1;
}
else
if (proj->int_pos().Z > proj->__int_floorz)
if (proj->int_pos().Z > proj->actor_int_floorz())
{
coll.setSector(proj->sector());
if (proj->sector()->lotag != 1)
@ -2344,9 +2344,9 @@ static void heavyhbomb(DDukeActor *actor)
makeitfall(actor);
if (sectp->lotag != 1 && (!isRRRA() || sectp->lotag != 160) && actor->int_pos().Z >= actor->__int_floorz - (FOURSLEIGHT) && actor->spr.yvel < 3)
if (sectp->lotag != 1 && (!isRRRA() || sectp->lotag != 160) && actor->int_pos().Z >= actor->actor_int_floorz() - (FOURSLEIGHT) && actor->spr.yvel < 3)
{
if (actor->spr.yvel > 0 || (actor->spr.yvel == 0 && actor->__int_floorz == sectp->int_floorz()))
if (actor->spr.yvel > 0 || (actor->spr.yvel == 0 && actor->actor_int_floorz() == sectp->int_floorz()))
{
if (actor->spr.picnum != CHEERBOMB)
S_PlayActorSound(PIPEBOMB_BOUNCE, actor);
@ -2363,9 +2363,9 @@ static void heavyhbomb(DDukeActor *actor)
actor->spr.zvel >>= 2;
actor->spr.yvel++;
}
if (actor->spr.picnum != CHEERBOMB && actor->int_pos().Z < actor->__int_ceilingz + (16 << 8) && sectp->lotag != 2)
if (actor->spr.picnum != CHEERBOMB && actor->int_pos().Z < actor->actor_int_ceilingz() + (16 << 8) && sectp->lotag != 2)
{
actor->set_int_z(actor->__int_ceilingz + (16 << 8));
actor->set_int_z(actor->actor_int_ceilingz() + (16 << 8));
actor->spr.zvel = 0;
}
@ -2831,7 +2831,7 @@ void moveactors_r(void)
getglobalz(act);
if (sectp->lotag == 1)
{
SetActor(act, { act->int_pos().X,act->int_pos().Y,act->__int_floorz + (16 << 8) });
SetActor(act, { act->int_pos().X,act->int_pos().Y,act->actor_int_floorz() + (16 << 8) });
}
break;
@ -3818,7 +3818,7 @@ static int fallspecial(DDukeActor *actor, int playernum)
}
else if (actor->sector()->lotag == 802)
{
if (actor->spr.picnum != APLAYER && badguy(actor) && actor->int_pos().Z == actor->__int_floorz - FOURSLEIGHT)
if (actor->spr.picnum != APLAYER && badguy(actor) && actor->int_pos().Z == actor->actor_int_floorz() - FOURSLEIGHT)
{
fi.guts(actor, JIBS6, 5, playernum);
S_PlayActorSound(SQUISHED, actor);
@ -3842,7 +3842,7 @@ static int fallspecial(DDukeActor *actor, int playernum)
}
if (actor->spr.picnum != APLAYER && (badguy(actor) || actor->spr.picnum == HEN || actor->spr.picnum == COW || actor->spr.picnum == PIG || actor->spr.picnum == DOGRUN || actor->spr.picnum == RABBIT) && (!isRRRA() || actor->spriteextra < 128))
{
actor->set_int_z(actor->__int_floorz - FOURSLEIGHT);
actor->set_int_z(actor->actor_int_floorz() - FOURSLEIGHT);
actor->spr.zvel = 8000;
actor->spr.extra = 0;
actor->spriteextra++;

View file

@ -389,7 +389,7 @@ void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, int smoothrat
}
if (t->sectp->lotag == 2) k += 1795 - 1405;
else if ((h->__int_floorz - h->int_pos().Z) > (64 << 8)) k += 60;
else if ((h->actor_int_floorz() - h->int_pos().Z) > (64 << 8)) k += 60;
t->picnum += k;
t->pal = ps[p].palookup;
@ -399,7 +399,7 @@ void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, int smoothrat
if (ps[p].on_crane == nullptr && (h->sector()->lotag & 0x7ff) != 1)
{
l = h->int_pos().Z - ps[p].GetActor()->__int_floorz + (3 << 8);
l = h->int_pos().Z - ps[p].GetActor()->actor_int_floorz() + (3 << 8);
if (l > 1024 && h->spr.yrepeat > 32 && h->spr.extra > 0)
h->spr.yoffset = (int8_t)(l / (h->spr.yrepeat << 2));
else h->spr.yoffset = 0;
@ -428,8 +428,8 @@ void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, int smoothrat
if (!h->GetOwner()) continue;
if (t->int_pos().Z > h->__int_floorz && t->xrepeat < 32)
t->set_int_z(h->__int_floorz);
if (t->int_pos().Z > h->actor_int_floorz() && t->xrepeat < 32)
t->set_int_z(h->actor_int_floorz());
break;
@ -573,7 +573,7 @@ void animatesprites_d(tspriteArray& tsprites, int x, int y, int a, int smoothrat
if ((sectp->lotag & 0xff) > 2 || h->spr.statnum == 4 || h->spr.statnum == 5 || h->spr.picnum == DRONE || h->spr.picnum == COMMANDER)
daz = sectp->int_floorz();
else
daz = h->__int_floorz;
daz = h->actor_int_floorz();
if ((h->int_pos().Z - daz) < (8 << 8) && ps[screenpeek].pos.Z < daz)

View file

@ -435,7 +435,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
}
if (t->sectp->lotag == 2) k += 1795 - 1405;
else if ((h->__int_floorz - h->int_pos().Z) > (64 << 8)) k += 60;
else if ((h->actor_int_floorz() - h->int_pos().Z) > (64 << 8)) k += 60;
t->picnum += k;
t->pal = ps[p].palookup;
@ -445,7 +445,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
if (ps[p].on_crane == nullptr && (h->sector()->lotag & 0x7ff) != 1)
{
l = h->int_pos().Z - ps[p].GetActor()->__int_floorz + (3 << 8);
l = h->int_pos().Z - ps[p].GetActor()->actor_int_floorz() + (3 << 8);
if (l > 1024 && h->spr.yrepeat > 32 && h->spr.extra > 0)
h->spr.yoffset = (int8_t)(l / (h->spr.yrepeat << 2));
else h->spr.yoffset = 0;
@ -474,8 +474,8 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
if (!h->GetOwner()) continue;
if (t->int_pos().Z > h->__int_floorz && t->xrepeat < 32)
t->set_int_z(h->__int_floorz);
if (t->int_pos().Z > h->actor_int_floorz() && t->xrepeat < 32)
t->set_int_z(h->actor_int_floorz());
if (ps[p].OnMotorcycle && p == screenpeek)
{
@ -731,7 +731,7 @@ void animatesprites_r(tspriteArray& tsprites, int x, int y, int a, int smoothrat
if ((sectp->lotag & 0xff) > 2 || h->spr.statnum == 4 || h->spr.statnum == 5 || h->spr.picnum == DRONE)
daz = sectp->int_floorz();
else
daz = h->__int_floorz;
daz = h->actor_int_floorz();
if ((h->int_pos().Z - daz) < (8 << 8))
if (ps[screenpeek].pos.Z < daz)

View file

@ -1307,11 +1307,11 @@ void DoActor(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
break;
case ACTOR_HTFLOORZ:
if (bSet) act->__int_floorz = lValue;
else SetGameVarID(lVar2, act->__int_floorz, sActor, sPlayer);
else SetGameVarID(lVar2, act->actor_int_floorz(), sActor, sPlayer);
break;
case ACTOR_HTCEILINGZ:
if (bSet) act->__int_ceilingz = lValue;
else SetGameVarID(lVar2, act->__int_ceilingz, sActor, sPlayer);
else SetGameVarID(lVar2, act->actor_int_ceilingz(), sActor, sPlayer);
break;
case ACTOR_HTLASTVX:
if (bSet) act->ovel.X = lValue;
@ -1738,7 +1738,7 @@ int ParseState::parse(void)
insptr++;
if ((g_ac->isPlayer() && g_ac->spr.yrepeat < 36) || *insptr < g_ac->spr.yrepeat || ((g_ac->spr.yrepeat * (tileHeight(g_ac->spr.picnum) + 8)) << 2) < (g_ac->__int_floorz - g_ac->__int_ceilingz))
if ((g_ac->isPlayer() && g_ac->spr.yrepeat < 36) || *insptr < g_ac->spr.yrepeat || ((g_ac->spr.yrepeat * (tileHeight(g_ac->spr.picnum) + 8)) << 2) < (g_ac->actor_int_floorz() - g_ac->actor_int_ceilingz()))
{
j = ((*insptr) - g_ac->spr.yrepeat) << 1;
if (abs(j)) g_ac->spr.yrepeat += Sgn(j);
@ -2469,7 +2469,7 @@ int ParseState::parse(void)
return 0;
case concmd_ifgapzl:
insptr++;
parseifelse( (( g_ac->__int_floorz - g_ac->__int_ceilingz ) >> 8 ) < *insptr);
parseifelse( (( g_ac->actor_int_floorz() - g_ac->actor_int_ceilingz() ) >> 8 ) < *insptr);
break;
case concmd_ifhitspace:
parseifelse(PlayerInput(g_p, SB_OPEN));
@ -2537,11 +2537,11 @@ int ParseState::parse(void)
break;
case concmd_iffloordistl:
insptr++;
parseifelse( (g_ac->__int_floorz - g_ac->int_pos().Z) <= ((*insptr)<<8));
parseifelse( (g_ac->actor_int_floorz() - g_ac->int_pos().Z) <= ((*insptr)<<8));
break;
case concmd_ifceilingdistl:
insptr++;
parseifelse( ( g_ac->int_pos().Z - g_ac->__int_ceilingz ) <= ((*insptr)<<8));
parseifelse( ( g_ac->int_pos().Z - g_ac->actor_int_ceilingz() ) <= ((*insptr)<<8));
break;
case concmd_palfrom:
insptr++;

View file

@ -1728,8 +1728,8 @@ static void operateJetpack(int snum, ESyncBits actions, int psectlotag, int fz,
if (p->pos.Z > (fz - (k << 8)))
p->pos.Z += ((fz - (k << 8)) - p->pos.Z) >> 1;
if (p->pos.Z < (pact->__int_ceilingz + (18 << 8)))
p->pos.Z = pact->__int_ceilingz + (18 << 8);
if (p->pos.Z < (pact->actor_int_ceilingz() + (18 << 8)))
p->pos.Z = pact->actor_int_ceilingz() + (18 << 8);
}
@ -3085,7 +3085,7 @@ HORIZONLY:
int blocked;
blocked = (pushmove(&p->pos, &p->cursector, 164, (4 << 8), (4 << 8), CLIPMASK0) < 0 && furthestangle(p->GetActor(), 8) < 512);
if (abs(pact->__int_floorz - pact->__int_ceilingz) < (48 << 8) || blocked)
if (abs(pact->actor_int_floorz() - pact->actor_int_ceilingz()) < (48 << 8) || blocked)
{
if (!(pact->sector()->lotag & 0x8000) && (isanunderoperator(pact->sector()->lotag) ||
isanearoperator(pact->sector()->lotag)))

View file

@ -3938,7 +3938,7 @@ HORIZONLY:
else
blocked = (pushmove(&p->pos, &p->cursector, 16, (4 << 8), (4 << 8), CLIPMASK0) < 0 && furthestangle(p->GetActor(), 8) < 512);
if (abs(pact->__int_floorz - pact->__int_ceilingz) < (48 << 8) || blocked)
if (abs(pact->actor_int_floorz() - pact->actor_int_ceilingz()) < (48 << 8) || blocked)
{
if (!(pact->sector()->lotag & 0x8000) && (isanunderoperator(pact->sector()->lotag) ||
isanearoperator(pact->sector()->lotag)))

View file

@ -527,7 +527,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if (act->spr.picnum == RESPAWNMARKERRED)
{
act->spr.xrepeat = act->spr.yrepeat = 24;
if (actj) act->set_int_z(actj->__int_floorz); // -(1<<4);
if (actj) act->set_int_z(actj->actor_int_floorz()); // -(1<<4);
}
else
{
@ -939,7 +939,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
getglobalz(act);
int j = (act->__int_floorz - act->__int_ceilingz) >> 9;
int j = (act->actor_int_floorz() - act->actor_int_ceilingz()) >> 9;
act->spr.yrepeat = j;
act->spr.xrepeat = 25 - (j >> 1);

View file

@ -554,7 +554,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
if (act->spr.picnum == RESPAWNMARKERRED)
{
act->spr.xrepeat = act->spr.yrepeat = 8;
if (actj) act->set_int_z(actj->__int_floorz);
if (actj) act->set_int_z(actj->actor_int_floorz());
}
else
{
@ -1092,7 +1092,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
getglobalz(act);
int j = (act->__int_floorz - act->__int_ceilingz) >> 9;
int j = (act->actor_int_floorz() - act->actor_int_ceilingz()) >> 9;
act->spr.yrepeat = j;
act->spr.xrepeat = 25 - (j >> 1);

View file

@ -121,12 +121,12 @@ public:
void Serialize(FSerializer& arc) override;
int int_ceilingz() const
int actor_int_ceilingz() const
{
return __int_ceilingz;
}
int int_floorz() const
int actor_int_floorz() const
{
return __int_floorz;
}