mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 22:51:50 +00:00
- renamed DDukeActor::floorz, ceilingz.
This commit is contained in:
parent
4c80a19458
commit
793e9b7623
17 changed files with 155 additions and 124 deletions
|
@ -136,6 +136,16 @@ class F2DDrawer;
|
|||
void getzrange(const vec3_t& pos, sectortype* sect, int32_t* ceilz, CollisionBase& ceilhit, int32_t* florz,
|
||||
CollisionBase& florhit, int32_t walldist, uint32_t cliptype);
|
||||
|
||||
inline void getzrange(const vec3_t& pos, sectortype* sect, double* ceilz, CollisionBase& ceilhit, double* florz,
|
||||
CollisionBase& florhit, int32_t walldist, uint32_t cliptype)
|
||||
{
|
||||
int c = int(*ceilz * zworldtoint);
|
||||
int f = int(*florz * zworldtoint);
|
||||
getzrange(pos, sect, &c, ceilhit, &f, florhit, walldist, cliptype);
|
||||
*ceilz = c * zinttoworld;
|
||||
*florz = f * zinttoworld;
|
||||
}
|
||||
|
||||
extern vec2_t hitscangoal;
|
||||
|
||||
struct HitInfoBase;
|
||||
|
|
|
@ -889,7 +889,7 @@ void moveflammable(DDukeActor* actor, int pool)
|
|||
if (actorflag(actor, SFLAG_FALLINGFLAMMABLE))
|
||||
{
|
||||
makeitfall(actor);
|
||||
actor->ceilingz = actor->sector()->int_ceilingz();
|
||||
actor->__int_ceilingz = actor->sector()->int_ceilingz();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1270,7 +1270,7 @@ void bounce(DDukeActor* actor)
|
|||
int daang = getangle(sectp->firstWall()->delta());
|
||||
|
||||
int k, l;
|
||||
if (actor->int_pos().Z < (actor->floorz + actor->ceilingz) >> 1)
|
||||
if (actor->int_pos().Z < (actor->__int_floorz + 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->floorz)
|
||||
if (j != 1 || actor->int_pos().Z > 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->floorz - (48 << 8))
|
||||
actor->set_int_z(actor->floorz - (48 << 8));
|
||||
if (actor->int_pos().Z > actor->__int_floorz - (48 << 8))
|
||||
actor->set_int_z(actor->__int_floorz - (48 << 8));
|
||||
}
|
||||
|
||||
int x;
|
||||
|
@ -1799,7 +1799,7 @@ void ooz(DDukeActor *actor)
|
|||
{
|
||||
getglobalz(actor);
|
||||
|
||||
int j = (actor->floorz - actor->ceilingz) >> 9;
|
||||
int j = (actor->__int_floorz - 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->floorz);
|
||||
actor->set_int_z(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->floorz - (FOURSLEIGHT));
|
||||
actor->set_int_z(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->floorz - (FOURSLEIGHT) && actor->temp_data[0] < 3)
|
||||
if (actor->int_pos().Z == actor->__int_floorz - (FOURSLEIGHT) && actor->temp_data[0] < 3)
|
||||
{
|
||||
actor->spr.zvel = -((3 - actor->temp_data[0]) << 8) - (krand() & 511);
|
||||
if (sectp->lotag == 2)
|
||||
|
@ -3849,8 +3849,8 @@ void handle_se17(DDukeActor* actor)
|
|||
act1->add_int_z(q);
|
||||
}
|
||||
|
||||
act1->floorz = sc->int_floorz();
|
||||
act1->ceilingz = sc->int_ceilingz();
|
||||
act1->__int_floorz = sc->int_floorz();
|
||||
act1->__int_ceilingz = sc->int_ceilingz();
|
||||
}
|
||||
|
||||
if (actor->temp_data[0]) //If in motion
|
||||
|
@ -3893,15 +3893,15 @@ void handle_se17(DDukeActor* actor)
|
|||
ps[p].pos.Y += act2->int_pos().Y - actor->int_pos().Y;
|
||||
ps[p].pos.Z = act2->sector()->int_floorz() - (sc->int_floorz() - ps[p].pos.Z);
|
||||
|
||||
act3->floorz = act2->sector()->int_floorz();
|
||||
act3->ceilingz = act2->sector()->int_ceilingz();
|
||||
act3->__int_floorz = act2->sector()->int_floorz();
|
||||
act3->__int_ceilingz = act2->sector()->int_ceilingz();
|
||||
|
||||
ps[p].bobpos.X = ps[p].opos.X = ps[p].pos.X;
|
||||
ps[p].bobpos.Y = ps[p].opos.Y = ps[p].pos.Y;
|
||||
ps[p].opos.Z = ps[p].pos.Z;
|
||||
|
||||
ps[p].truefz = act3->floorz;
|
||||
ps[p].truecz = act3->ceilingz;
|
||||
ps[p].truefz = act3->__int_floorz;
|
||||
ps[p].truecz = act3->__int_ceilingz;
|
||||
ps[p].bobcounter = 0;
|
||||
|
||||
ChangeActorSect(act3, act2->sector());
|
||||
|
@ -3917,8 +3917,8 @@ void handle_se17(DDukeActor* actor)
|
|||
ChangeActorSect(act3, act2->sector());
|
||||
SetActor(act3, act3->int_pos());
|
||||
|
||||
act3->floorz = act2->sector()->int_floorz();
|
||||
act3->ceilingz = act2->sector()->int_ceilingz();
|
||||
act3->__int_floorz = act2->sector()->int_floorz();
|
||||
act3->__int_ceilingz = act2->sector()->int_ceilingz();
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -3962,7 +3962,7 @@ void handle_se18(DDukeActor *actor, bool morecheck)
|
|||
if (a2->spr.zvel == 0 && a2->spr.statnum != STAT_EFFECTOR && a2->spr.statnum != STAT_PROJECTILE)
|
||||
{
|
||||
a2->add_int_z(sc->extra);
|
||||
a2->floorz = sc->int_floorz();
|
||||
a2->__int_floorz = sc->int_floorz();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3999,7 +3999,7 @@ void handle_se18(DDukeActor *actor, bool morecheck)
|
|||
if (a2->spr.zvel == 0 && a2->spr.statnum != STAT_EFFECTOR && a2->spr.statnum != STAT_PROJECTILE)
|
||||
{
|
||||
a2->add_int_z(-sc->extra);
|
||||
a2->floorz = sc->int_floorz();
|
||||
a2->__int_floorz = sc->int_floorz();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4401,7 +4401,7 @@ void handle_se24(DDukeActor *actor, bool scroll, int shift)
|
|||
wallswitchcheck(a2))
|
||||
continue;
|
||||
|
||||
if (a2->int_pos().Z > (a2->floorz - (16 << 8)))
|
||||
if (a2->int_pos().Z > (a2->__int_floorz - (16 << 8)))
|
||||
{
|
||||
a2->add_int_pos({ x >> shift , y >> shift, 0 });
|
||||
|
||||
|
@ -4695,7 +4695,7 @@ void handle_se31(DDukeActor* actor, bool choosedir)
|
|||
if (a2->spr.zvel == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE))
|
||||
{
|
||||
a2->add_int_z(l);
|
||||
a2->floorz = sec->int_floorz();
|
||||
a2->__int_floorz = sec->int_floorz();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4724,7 +4724,7 @@ void handle_se31(DDukeActor* actor, bool choosedir)
|
|||
if (a2->spr.zvel == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE))
|
||||
{
|
||||
a2->add_int_z(l);
|
||||
a2->floorz = sec->int_floorz();
|
||||
a2->__int_floorz = sec->int_floorz();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4755,7 +4755,7 @@ void handle_se31(DDukeActor* actor, bool choosedir)
|
|||
if (a2->spr.zvel == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE))
|
||||
{
|
||||
a2->add_int_z(l);
|
||||
a2->floorz = sec->int_floorz();
|
||||
a2->__int_floorz = sec->int_floorz();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4783,7 +4783,7 @@ void handle_se31(DDukeActor* actor, bool choosedir)
|
|||
if (a2->spr.zvel == 0 && a2->spr.statnum != STAT_EFFECTOR && (!choosedir || a2->spr.statnum != STAT_PROJECTILE))
|
||||
{
|
||||
a2->add_int_z(-l);
|
||||
a2->floorz = sec->int_floorz();
|
||||
a2->__int_floorz = sec->int_floorz();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4810,7 +4810,7 @@ void getglobalz(DDukeActor* actor)
|
|||
|
||||
auto cc = actor->spr.cstat2;
|
||||
actor->spr.cstat2 |= CSTAT2_SPRITE_NOFIND; // don't clip against self. getzrange cannot detect this because it only receives a coordinate.
|
||||
getzrange({ actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - (FOURSLEIGHT) }, actor->sector(), &actor->ceilingz, hz, &actor->floorz, lz, zr, CLIPMASK0);
|
||||
getzrange({ actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - (FOURSLEIGHT) }, actor->sector(), &actor->__int_ceilingz, hz, &actor->__int_floorz, lz, zr, CLIPMASK0);
|
||||
actor->spr.cstat2 = cc;
|
||||
|
||||
actor->spr.cstat2 &= ~CSTAT2_SPRITE_NOSHADOW;
|
||||
|
@ -4833,15 +4833,15 @@ void getglobalz(DDukeActor* actor)
|
|||
}
|
||||
else if(actor->spr.statnum == STAT_PROJECTILE && lz.actor()->isPlayer() && actor->GetOwner() == actor)
|
||||
{
|
||||
actor->ceilingz = actor->sector()->int_ceilingz();
|
||||
actor->floorz = actor->sector()->int_floorz();
|
||||
actor->__int_ceilingz = actor->sector()->int_ceilingz();
|
||||
actor->__int_floorz = actor->sector()->int_floorz();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
actor->ceilingz = actor->sector()->int_ceilingz();
|
||||
actor->floorz = actor->sector()->int_floorz();
|
||||
actor->__int_ceilingz = actor->sector()->int_ceilingz();
|
||||
actor->__int_floorz = actor->sector()->int_floorz();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4872,15 +4872,15 @@ void makeitfall(DDukeActor* actor)
|
|||
if ((actor->spr.statnum == STAT_ACTOR || actor->spr.statnum == STAT_PLAYER || actor->spr.statnum == STAT_ZOMBIEACTOR || actor->spr.statnum == STAT_STANDABLE))
|
||||
{
|
||||
Collision coll;
|
||||
getzrange({ actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - (FOURSLEIGHT) }, actor->sector(), &actor->ceilingz, coll, &actor->floorz, coll, 127, CLIPMASK0);
|
||||
getzrange({ actor->int_pos().X, actor->int_pos().Y, actor->int_pos().Z - (FOURSLEIGHT) }, actor->sector(), &actor->__int_ceilingz, coll, &actor->__int_floorz, coll, 127, CLIPMASK0);
|
||||
}
|
||||
else
|
||||
{
|
||||
actor->ceilingz = actor->sector()->int_ceilingz();
|
||||
actor->floorz = actor->sector()->int_floorz();
|
||||
actor->__int_ceilingz = actor->sector()->int_ceilingz();
|
||||
actor->__int_floorz = actor->sector()->int_floorz();
|
||||
}
|
||||
|
||||
if( actor->int_pos().Z < actor->floorz-(FOURSLEIGHT) )
|
||||
if( actor->int_pos().Z < 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->floorz-(FOURSLEIGHT) )
|
||||
if( actor->int_pos().Z >= actor->__int_floorz-(FOURSLEIGHT) )
|
||||
{
|
||||
actor->set_int_z(actor->floorz - FOURSLEIGHT);
|
||||
actor->set_int_z(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->floorz - FOURSLEIGHT))
|
||||
if (actor->int_pos().Z < (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->floorz - FOURSLEIGHT);
|
||||
actor->set_int_z(actor->__int_floorz - FOURSLEIGHT);
|
||||
|
||||
if (badguy(actor) || (actor->isPlayer() && actor->GetOwner()))
|
||||
{
|
||||
|
|
|
@ -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->ceilingz) && (daz <= actor->floorz))
|
||||
if ((daz > actor->__int_ceilingz) && (daz <= 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->ceilingz)
|
||||
if (proj->int_pos().Z < proj->__int_ceilingz)
|
||||
{
|
||||
coll.setSector(proj->sector());
|
||||
proj->spr.zvel = -1;
|
||||
}
|
||||
else
|
||||
if ((proj->int_pos().Z > proj->floorz && proj->sector()->lotag != 1) ||
|
||||
(proj->int_pos().Z > proj->floorz + (16 << 8) && proj->sector()->lotag == 1))
|
||||
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))
|
||||
{
|
||||
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->ceilingz + 6144) < actor->int_pos().Z)
|
||||
if ((sectp->ceilingstat & CSTAT_SECTOR_SKY) || (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->floorz - actor->ceilingz)
|
||||
abs(actor->__int_floorz - 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->ceilingz + 4096)
|
||||
if (actor->int_pos().Z < actor->__int_ceilingz + 4096)
|
||||
{
|
||||
actor->set_int_z(actor->ceilingz + 4096);
|
||||
actor->set_int_z(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->floorz - (8 << 8))
|
||||
if (actor->int_pos().Z > 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->floorz - 2048)
|
||||
if (actor->int_pos().Z > actor->__int_floorz - 2048)
|
||||
{
|
||||
actor->set_int_z(actor->floorz - 2048);
|
||||
actor->set_int_z(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->ceilingz)
|
||||
if (actor->int_pos().Z < actor->__int_ceilingz)
|
||||
{
|
||||
coll.setSector(actor->sector());
|
||||
actor->spr.zvel = -1;
|
||||
}
|
||||
else if ((actor->int_pos().Z > actor->floorz && actor->sector()->lotag != 1)
|
||||
|| (actor->int_pos().Z > actor->floorz + (16 << 8) && actor->sector()->lotag == 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))
|
||||
{
|
||||
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->floorz - (FOURSLEIGHT) && actor->spr.yvel < 3)
|
||||
if (sectp->lotag != 1 && actor->int_pos().Z >= actor->__int_floorz - (FOURSLEIGHT) && actor->spr.yvel < 3)
|
||||
{
|
||||
if (actor->spr.yvel > 0 || (actor->spr.yvel == 0 && actor->floorz == sectp->int_floorz()))
|
||||
if (actor->spr.yvel > 0 || (actor->spr.yvel == 0 && 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->ceilingz) // && sectp->lotag != 2 )
|
||||
if (actor->int_pos().Z < actor->__int_ceilingz) // && sectp->lotag != 2 )
|
||||
{
|
||||
actor->set_int_z(actor->ceilingz + (3 << 8));
|
||||
actor->set_int_z(actor->__int_ceilingz + (3 << 8));
|
||||
actor->spr.zvel = 0;
|
||||
}
|
||||
}
|
||||
|
@ -3077,8 +3077,8 @@ void moveexplosions_d(void) // STATNUM 5
|
|||
case MONEY + 1:
|
||||
case MAIL + 1:
|
||||
case PAPER + 1:
|
||||
act->floorz = getflorzofslopeptr(act->sector(), act->int_pos().X, act->int_pos().Y);
|
||||
act->set_int_z(act->floorz);
|
||||
act->__int_floorz = getflorzofslopeptr(act->sector(), act->int_pos().X, act->int_pos().Y);
|
||||
act->set_int_z(act->__int_floorz);
|
||||
break;
|
||||
case MONEY:
|
||||
case MAIL:
|
||||
|
@ -3584,14 +3584,14 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
|
|||
{
|
||||
if (actor->spr.picnum == COMMANDER)
|
||||
{
|
||||
actor->floorz = l = getflorzofslopeptr(actor->sector(), actor->int_pos().X, actor->int_pos().Y);
|
||||
actor->__int_floorz = l = getflorzofslopeptr(actor->sector(), actor->int_pos().X, actor->int_pos().Y);
|
||||
if (actor->int_pos().Z > (l - (8 << 8)))
|
||||
{
|
||||
if (actor->int_pos().Z > (l - (8 << 8))) actor->set_int_z(l - (8 << 8));
|
||||
actor->spr.zvel = 0;
|
||||
}
|
||||
|
||||
actor->ceilingz = l = getceilzofslopeptr(actor->sector(), actor->int_pos().X, actor->int_pos().Y);
|
||||
actor->__int_ceilingz = l = getceilzofslopeptr(actor->sector(), actor->int_pos().X, actor->int_pos().Y);
|
||||
if ((actor->int_pos().Z - l) < (80 << 8))
|
||||
{
|
||||
actor->set_int_z(l + (80 << 8));
|
||||
|
@ -3602,13 +3602,13 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
|
|||
{
|
||||
if (actor->spr.zvel > 0)
|
||||
{
|
||||
actor->floorz = l = getflorzofslopeptr(actor->sector(), actor->int_pos().X, actor->int_pos().Y);
|
||||
actor->__int_floorz = l = getflorzofslopeptr(actor->sector(), actor->int_pos().X, actor->int_pos().Y);
|
||||
if (actor->int_pos().Z > (l - (30 << 8)))
|
||||
actor->set_int_z(l - (30 << 8));
|
||||
}
|
||||
else
|
||||
{
|
||||
actor->ceilingz = l = getceilzofslopeptr(actor->sector(), actor->int_pos().X, actor->int_pos().Y);
|
||||
actor->__int_ceilingz = l = getceilzofslopeptr(actor->sector(), actor->int_pos().X, actor->int_pos().Y);
|
||||
if ((actor->int_pos().Z - l) < (50 << 8))
|
||||
{
|
||||
actor->set_int_z(l + (50 << 8));
|
||||
|
@ -3619,8 +3619,8 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
|
|||
}
|
||||
else if (actor->spr.picnum != ORGANTIC)
|
||||
{
|
||||
if (actor->spr.zvel > 0 && actor->floorz < actor->int_pos().Z)
|
||||
actor->set_int_z(actor->floorz);
|
||||
if (actor->spr.zvel > 0 && actor->__int_floorz < actor->int_pos().Z)
|
||||
actor->set_int_z(actor->__int_floorz);
|
||||
if (actor->spr.zvel < 0)
|
||||
{
|
||||
l = getceilzofslopeptr(actor->sector(), actor->int_pos().X, actor->int_pos().Y);
|
||||
|
@ -3633,8 +3633,8 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
|
|||
}
|
||||
}
|
||||
else if (actor->spr.picnum == APLAYER)
|
||||
if ((actor->int_pos().Z - actor->ceilingz) < (32 << 8))
|
||||
actor->set_int_z(actor->ceilingz + (32 << 8));
|
||||
if ((actor->int_pos().Z - actor->__int_ceilingz) < (32 << 8))
|
||||
actor->set_int_z(actor->__int_ceilingz + (32 << 8));
|
||||
|
||||
daxvel = actor->spr.xvel;
|
||||
angdif = actor->spr.ang;
|
||||
|
|
|
@ -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->ceilingz) && (daz <= actor->floorz))
|
||||
if ((daz > actor->__int_ceilingz) && (daz <= 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->ceilingz)
|
||||
if (proj->int_pos().Z < proj->__int_ceilingz)
|
||||
{
|
||||
coll.setSector(proj->sector());
|
||||
proj->spr.zvel = -1;
|
||||
}
|
||||
else
|
||||
if (proj->int_pos().Z > proj->floorz)
|
||||
if (proj->int_pos().Z > proj->__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->floorz - (FOURSLEIGHT) && actor->spr.yvel < 3)
|
||||
if (sectp->lotag != 1 && (!isRRRA() || sectp->lotag != 160) && actor->int_pos().Z >= actor->__int_floorz - (FOURSLEIGHT) && actor->spr.yvel < 3)
|
||||
{
|
||||
if (actor->spr.yvel > 0 || (actor->spr.yvel == 0 && actor->floorz == sectp->int_floorz()))
|
||||
if (actor->spr.yvel > 0 || (actor->spr.yvel == 0 && 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->ceilingz + (16 << 8) && sectp->lotag != 2)
|
||||
if (actor->spr.picnum != CHEERBOMB && actor->int_pos().Z < actor->__int_ceilingz + (16 << 8) && sectp->lotag != 2)
|
||||
{
|
||||
actor->set_int_z(actor->ceilingz + (16 << 8));
|
||||
actor->set_int_z(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->floorz + (16 << 8) });
|
||||
SetActor(act, { act->int_pos().X,act->int_pos().Y,act->__int_floorz + (16 << 8) });
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -3013,8 +3013,8 @@ void moveexplosions_r(void) // STATNUM 5
|
|||
deletesprite(act);
|
||||
continue;
|
||||
case FEATHER + 1: // feather
|
||||
act->floorz = getflorzofslopeptr(act->sector(), act->int_pos().X, act->int_pos().Y);
|
||||
act->set_int_z(act->floorz);
|
||||
act->__int_floorz = getflorzofslopeptr(act->sector(), act->int_pos().X, act->int_pos().Y);
|
||||
act->set_int_z(act->__int_floorz);
|
||||
if (act->sector()->lotag == 800)
|
||||
{
|
||||
deletesprite(act);
|
||||
|
@ -3641,7 +3641,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
|
|||
{
|
||||
if (actor->spr.zvel > 0)
|
||||
{
|
||||
actor->floorz = l = getflorzofslopeptr(actor->sector(), actor->int_pos().X, actor->int_pos().Y);
|
||||
actor->__int_floorz = l = getflorzofslopeptr(actor->sector(), actor->int_pos().X, actor->int_pos().Y);
|
||||
if (isRRRA())
|
||||
{
|
||||
if (actor->int_pos().Z > (l - (28 << 8)))
|
||||
|
@ -3655,7 +3655,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
|
|||
}
|
||||
else
|
||||
{
|
||||
actor->ceilingz = l = getceilzofslopeptr(actor->sector(), actor->int_pos().X, actor->int_pos().Y);
|
||||
actor->__int_ceilingz = l = getceilzofslopeptr(actor->sector(), actor->int_pos().X, actor->int_pos().Y);
|
||||
if ((actor->int_pos().Z - l) < (50 << 8))
|
||||
{
|
||||
actor->set_int_z(l + (50 << 8));
|
||||
|
@ -3663,8 +3663,8 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
|
|||
}
|
||||
}
|
||||
}
|
||||
if (actor->spr.zvel > 0 && actor->floorz < actor->int_pos().Z)
|
||||
actor->set_int_z(actor->floorz);
|
||||
if (actor->spr.zvel > 0 && actor->__int_floorz < actor->int_pos().Z)
|
||||
actor->set_int_z(actor->__int_floorz);
|
||||
if (actor->spr.zvel < 0)
|
||||
{
|
||||
l = getceilzofslopeptr(actor->sector(), actor->int_pos().X, actor->int_pos().Y);
|
||||
|
@ -3676,8 +3676,8 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
|
|||
}
|
||||
}
|
||||
else if (actor->spr.picnum == APLAYER)
|
||||
if ((actor->int_pos().Z - actor->ceilingz) < (32 << 8))
|
||||
actor->set_int_z(actor->ceilingz + (32 << 8));
|
||||
if ((actor->int_pos().Z - actor->__int_ceilingz) < (32 << 8))
|
||||
actor->set_int_z(actor->__int_ceilingz + (32 << 8));
|
||||
|
||||
daxvel = actor->spr.xvel;
|
||||
angdif = actor->spr.ang;
|
||||
|
@ -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->floorz - FOURSLEIGHT)
|
||||
if (actor->spr.picnum != APLAYER && badguy(actor) && actor->int_pos().Z == 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->floorz - FOURSLEIGHT);
|
||||
actor->set_int_z(actor->__int_floorz - FOURSLEIGHT);
|
||||
actor->spr.zvel = 8000;
|
||||
actor->spr.extra = 0;
|
||||
actor->spriteextra++;
|
||||
|
|
|
@ -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->floorz - h->int_pos().Z) > (64 << 8)) k += 60;
|
||||
else if ((h->__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()->floorz + (3 << 8);
|
||||
l = h->int_pos().Z - ps[p].GetActor()->__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->floorz && t->xrepeat < 32)
|
||||
t->set_int_z(h->floorz);
|
||||
if (t->int_pos().Z > h->__int_floorz && t->xrepeat < 32)
|
||||
t->set_int_z(h->__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->floorz;
|
||||
daz = h->__int_floorz;
|
||||
|
||||
|
||||
if ((h->int_pos().Z - daz) < (8 << 8) && ps[screenpeek].pos.Z < daz)
|
||||
|
|
|
@ -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->floorz - h->int_pos().Z) > (64 << 8)) k += 60;
|
||||
else if ((h->__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()->floorz + (3 << 8);
|
||||
l = h->int_pos().Z - ps[p].GetActor()->__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->floorz && t->xrepeat < 32)
|
||||
t->set_int_z(h->floorz);
|
||||
if (t->int_pos().Z > h->__int_floorz && t->xrepeat < 32)
|
||||
t->set_int_z(h->__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->floorz;
|
||||
daz = h->__int_floorz;
|
||||
|
||||
if ((h->int_pos().Z - daz) < (8 << 8))
|
||||
if (ps[screenpeek].pos.Z < daz)
|
||||
|
|
|
@ -1306,12 +1306,12 @@ void DoActor(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
|
|||
else SetGameVarID(lVar2, act->timetosleep, sActor, sPlayer);
|
||||
break;
|
||||
case ACTOR_HTFLOORZ:
|
||||
if (bSet) act->floorz = lValue;
|
||||
else SetGameVarID(lVar2, act->floorz, sActor, sPlayer);
|
||||
if (bSet) act->__int_floorz = lValue;
|
||||
else SetGameVarID(lVar2, act->__int_floorz, sActor, sPlayer);
|
||||
break;
|
||||
case ACTOR_HTCEILINGZ:
|
||||
if (bSet) act->ceilingz = lValue;
|
||||
else SetGameVarID(lVar2, act->ceilingz, sActor, sPlayer);
|
||||
if (bSet) act->__int_ceilingz = lValue;
|
||||
else SetGameVarID(lVar2, act->__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->floorz - g_ac->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->__int_floorz - g_ac->__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->floorz - g_ac->ceilingz ) >> 8 ) < *insptr);
|
||||
parseifelse( (( g_ac->__int_floorz - g_ac->__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->floorz - g_ac->int_pos().Z) <= ((*insptr)<<8));
|
||||
parseifelse( (g_ac->__int_floorz - g_ac->int_pos().Z) <= ((*insptr)<<8));
|
||||
break;
|
||||
case concmd_ifceilingdistl:
|
||||
insptr++;
|
||||
parseifelse( ( g_ac->int_pos().Z - g_ac->ceilingz ) <= ((*insptr)<<8));
|
||||
parseifelse( ( g_ac->int_pos().Z - g_ac->__int_ceilingz ) <= ((*insptr)<<8));
|
||||
break;
|
||||
case concmd_palfrom:
|
||||
insptr++;
|
||||
|
|
|
@ -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->ceilingz + (18 << 8)))
|
||||
p->pos.Z = pact->ceilingz + (18 << 8);
|
||||
if (p->pos.Z < (pact->__int_ceilingz + (18 << 8)))
|
||||
p->pos.Z = pact->__int_ceilingz + (18 << 8);
|
||||
|
||||
}
|
||||
|
||||
|
@ -2747,8 +2747,8 @@ void processinput_d(int snum)
|
|||
if (clz.type == kHitSector && psectlotag == 1 && truefdist > gs.playerheight + (16 << 8))
|
||||
psectlotag = 0;
|
||||
|
||||
pact->floorz = fz;
|
||||
pact->ceilingz = cz;
|
||||
pact->__int_floorz = fz;
|
||||
pact->__int_ceilingz = cz;
|
||||
|
||||
if (SyncInput())
|
||||
{
|
||||
|
@ -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->floorz - pact->ceilingz) < (48 << 8) || blocked)
|
||||
if (abs(pact->__int_floorz - pact->__int_ceilingz) < (48 << 8) || blocked)
|
||||
{
|
||||
if (!(pact->sector()->lotag & 0x8000) && (isanunderoperator(pact->sector()->lotag) ||
|
||||
isanearoperator(pact->sector()->lotag)))
|
||||
|
|
|
@ -3417,8 +3417,8 @@ void processinput_r(int snum)
|
|||
if (clz.type == kHitSector && psectlotag == 1 && truefdist > gs.playerheight + (16 << 8))
|
||||
psectlotag = 0;
|
||||
|
||||
pact->floorz = fz;
|
||||
pact->ceilingz = cz;
|
||||
pact->__int_floorz = fz;
|
||||
pact->__int_ceilingz = cz;
|
||||
|
||||
if (SyncInput())
|
||||
{
|
||||
|
@ -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->floorz - pact->ceilingz) < (48 << 8) || blocked)
|
||||
if (abs(pact->__int_floorz - pact->__int_ceilingz) < (48 << 8) || blocked)
|
||||
{
|
||||
if (!(pact->sector()->lotag & 0x8000) && (isanunderoperator(pact->sector()->lotag) ||
|
||||
isanearoperator(pact->sector()->lotag)))
|
||||
|
|
|
@ -355,8 +355,8 @@ void displayrooms(int snum, double smoothratio, bool sceneonly)
|
|||
}
|
||||
}
|
||||
|
||||
cz = p->GetActor()->ceilingz;
|
||||
fz = p->GetActor()->floorz;
|
||||
cz = p->GetActor()->__int_ceilingz;
|
||||
fz = p->GetActor()->__int_floorz;
|
||||
|
||||
if (earthquaketime > 0 && p->on_ground == 1)
|
||||
{
|
||||
|
|
|
@ -307,8 +307,8 @@ void DDukeActor::Serialize(FSerializer& arc)
|
|||
("dispicnum", dispicnum)
|
||||
("basepicnum", basepicnum)
|
||||
("timetosleep", timetosleep)
|
||||
("floorz", floorz)
|
||||
("ceilingz", ceilingz)
|
||||
("floorz", __int_floorz)
|
||||
("ceilingz", __int_ceilingz)
|
||||
("lastvx", ovel.X)
|
||||
("lastvy", ovel.Y)
|
||||
("saved_ammo", saved_ammo)
|
||||
|
|
|
@ -402,7 +402,7 @@ void doanimations(void)
|
|||
{
|
||||
act->backupz();
|
||||
act->add_int_z(v);
|
||||
act->floorz = dasectp->int_floorz() + v;
|
||||
act->__int_floorz = dasectp->int_floorz() + v;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -96,8 +96,8 @@ DDukeActor* EGS(sectortype* whatsectp, int s_x, int s_y, int s_z, int s_pn, int8
|
|||
if (s_ow)
|
||||
{
|
||||
act->attackertype = s_ow->spr.picnum;
|
||||
act->floorz = s_ow->floorz;
|
||||
act->ceilingz = s_ow->ceilingz;
|
||||
act->__int_floorz = s_ow->__int_floorz;
|
||||
act->__int_ceilingz = s_ow->__int_ceilingz;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -150,8 +150,8 @@ bool initspriteforspawn(DDukeActor* act)
|
|||
act->movflag = 0;
|
||||
act->tempang = 0;
|
||||
act->dispicnum = 0;
|
||||
act->floorz = act->sector()->int_floorz();
|
||||
act->ceilingz = act->sector()->int_ceilingz();
|
||||
act->__int_floorz = act->sector()->int_floorz();
|
||||
act->__int_ceilingz = act->sector()->int_ceilingz();
|
||||
|
||||
act->ovel.X = 0;
|
||||
act->ovel.Y = 0;
|
||||
|
|
|
@ -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->floorz); // -(1<<4);
|
||||
if (actj) act->set_int_z(actj->__int_floorz); // -(1<<4);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -939,7 +939,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
|
||||
getglobalz(act);
|
||||
|
||||
int j = (act->floorz - act->ceilingz) >> 9;
|
||||
int j = (act->__int_floorz - act->__int_ceilingz) >> 9;
|
||||
|
||||
act->spr.yrepeat = j;
|
||||
act->spr.xrepeat = 25 - (j >> 1);
|
||||
|
|
|
@ -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->floorz);
|
||||
if (actj) act->set_int_z(actj->__int_floorz);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1092,7 +1092,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
|
||||
getglobalz(act);
|
||||
|
||||
int j = (act->floorz - act->ceilingz) >> 9;
|
||||
int j = (act->__int_floorz - act->__int_ceilingz) >> 9;
|
||||
|
||||
act->spr.yrepeat = j;
|
||||
act->spr.xrepeat = 25 - (j >> 1);
|
||||
|
|
|
@ -50,7 +50,8 @@ public:
|
|||
short tempang, dispicnum, basepicnum;
|
||||
short timetosleep;
|
||||
vec2_t ovel;
|
||||
int floorz, ceilingz;
|
||||
double floorz, ceilingz;
|
||||
int __int_floorz, __int_ceilingz;
|
||||
union
|
||||
{
|
||||
int saved_ammo;
|
||||
|
@ -120,6 +121,26 @@ public:
|
|||
|
||||
void Serialize(FSerializer& arc) override;
|
||||
|
||||
int int_ceilingz() const
|
||||
{
|
||||
return __int_ceilingz;
|
||||
}
|
||||
|
||||
int int_floorz() const
|
||||
{
|
||||
return __int_floorz;
|
||||
}
|
||||
|
||||
double float_ceilingz() const
|
||||
{
|
||||
return __int_ceilingz * inttoworld;
|
||||
}
|
||||
|
||||
double float_floorz() const
|
||||
{
|
||||
return __int_floorz * inttoworld;
|
||||
}
|
||||
|
||||
void ChangeType(PClass* newtype)
|
||||
{
|
||||
if (newtype->IsDescendantOf(RUNTIME_CLASS(DDukeActor)) && newtype->Size == RUNTIME_CLASS(DDukeActor)->Size && GetClass()->Size == RUNTIME_CLASS(DDukeActor)->Size)
|
||||
|
|
|
@ -31,7 +31,7 @@ class DukeActor : CoreActor native
|
|||
native int16 /*attackertype,*/ hitang, hitextra, movflag;
|
||||
native int16 tempang; /*, dispicnum;*/
|
||||
native int16 timetosleep;
|
||||
native int floorz, ceilingz;
|
||||
native double floorz, ceilingz;
|
||||
native int saved_ammo;
|
||||
native int palvals;
|
||||
native int temp_data[6];
|
||||
|
|
Loading…
Reference in a new issue