mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-18 17:51:06 +00:00
- wrapped user.ceiling_dist reads.
This commit is contained in:
parent
467ab9f7ee
commit
4f073dec26
14 changed files with 69 additions and 68 deletions
|
@ -291,7 +291,7 @@ void DoDebrisCurrent(DSWActor* actor)
|
|||
nx = MulScale((sectp->speed >> 2), bcos(sectp->ang), 14);
|
||||
ny = MulScale((sectp->speed >> 2), bsin(sectp->ang), 14);
|
||||
|
||||
Collision ret = move_sprite(actor, nx, ny, 0, actor->user.ceiling_dist, actor->user.floor_dist, 0, ACTORMOVETICS);
|
||||
Collision ret = move_sprite(actor, nx, ny, 0, actor->user.int_ceiling_dist(), actor->user.floor_dist, 0, ACTORMOVETICS);
|
||||
|
||||
// attempt to move away from wall
|
||||
if (ret.type != kHitNone)
|
||||
|
@ -301,7 +301,7 @@ void DoDebrisCurrent(DSWActor* actor)
|
|||
nx = MulScale((sectp->speed >> 2), bcos(sectp->ang + rang), 14);
|
||||
nx = MulScale((sectp->speed >> 2), bsin(sectp->ang + rang), 14);
|
||||
|
||||
move_sprite(actor, nx, ny, 0, actor->user.ceiling_dist, actor->user.floor_dist, 0, ACTORMOVETICS);
|
||||
move_sprite(actor, nx, ny, 0, actor->user.int_ceiling_dist(), actor->user.floor_dist, 0, ACTORMOVETICS);
|
||||
}
|
||||
|
||||
actor->spr.pos.Z = actor->user.loz;
|
||||
|
@ -373,7 +373,7 @@ int DoActorSectorDamage(DSWActor* actor)
|
|||
bool move_debris(DSWActor* actor, int xchange, int ychange, int zchange)
|
||||
{
|
||||
actor->user.coll = move_sprite(actor, xchange, ychange, zchange,
|
||||
actor->user.ceiling_dist, actor->user.floor_dist, 0, ACTORMOVETICS);
|
||||
actor->user.int_ceiling_dist(), actor->user.floor_dist, 0, ACTORMOVETICS);
|
||||
|
||||
return actor->user.coll.type == kHitNone;
|
||||
}
|
||||
|
|
|
@ -1351,7 +1351,7 @@ Collision move_scan(DSWActor* actor, int ang, int dist, int *stopx, int *stopy,
|
|||
nx = MulScale(dist, bcos(actor->int_ang()), 14);
|
||||
ny = MulScale(dist, bsin(actor->int_ang()), 14);
|
||||
|
||||
Collision ret = move_sprite(actor, nx, ny, 0, actor->user.ceiling_dist, actor->user.floor_dist, cliptype, 1);
|
||||
Collision ret = move_sprite(actor, nx, ny, 0, actor->user.int_ceiling_dist(), actor->user.floor_dist, cliptype, 1);
|
||||
// move_sprite DOES do a getzrange point?
|
||||
|
||||
// should I look down with a FAFgetzrange to see where I am?
|
||||
|
|
|
@ -835,7 +835,7 @@ int DoBunnyBeginJumpAttack(DSWActor* actor)
|
|||
tang = getangle(target->int_pos().X - actor->int_pos().X, target->int_pos().Y - actor->int_pos().Y);
|
||||
|
||||
Collision coll = move_sprite(actor, bcos(tang, -7), bsin(tang, -7),
|
||||
0L, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS);
|
||||
0L, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS);
|
||||
|
||||
if (coll.type != kHitNone)
|
||||
actor->set_int_ang(NORM_ANGLE(actor->int_ang() + 1024) + (RANDOM_NEG(256, 6) >> 6));
|
||||
|
|
|
@ -649,9 +649,9 @@ int DoCoolgMatchPlayerZ(DSWActor* actor)
|
|||
|
||||
// upper bound
|
||||
if (actor->user.highActor)
|
||||
bound = hiz + actor->user.ceiling_dist;
|
||||
bound = hiz + actor->user.int_ceiling_dist();
|
||||
else
|
||||
bound = hiz + actor->user.ceiling_dist + COOLG_BOB_AMT;
|
||||
bound = hiz + actor->user.int_ceiling_dist() + COOLG_BOB_AMT;
|
||||
|
||||
if (actor->user.pos.Z < bound)
|
||||
{
|
||||
|
@ -659,12 +659,12 @@ int DoCoolgMatchPlayerZ(DSWActor* actor)
|
|||
}
|
||||
|
||||
actor->user.pos.Z = min(actor->user.pos.Z, loz - actor->user.floor_dist);
|
||||
actor->user.pos.Z = max(actor->user.pos.Z, hiz + actor->user.ceiling_dist);
|
||||
actor->user.pos.Z = max(actor->user.pos.Z, hiz + actor->user.int_ceiling_dist());
|
||||
|
||||
actor->user.Counter = (actor->user.Counter + (ACTORMOVETICS<<3)) & 2047;
|
||||
actor->set_int_z(actor->user.pos.Z + MulScale(COOLG_BOB_AMT, bsin(actor->user.Counter), 14));
|
||||
|
||||
bound = actor->user.int_hiz() + actor->user.ceiling_dist + COOLG_BOB_AMT;
|
||||
bound = actor->user.int_hiz() + actor->user.int_ceiling_dist() + COOLG_BOB_AMT;
|
||||
if (actor->int_pos().Z < bound)
|
||||
{
|
||||
// bumped something
|
||||
|
@ -721,7 +721,7 @@ int DoCoolgCircle(DSWActor* actor)
|
|||
// move in the z direction
|
||||
actor->user.pos.Z -= actor->user.jump_speed * ACTORMOVETICS;
|
||||
|
||||
bound = actor->user.int_hiz() + actor->user.ceiling_dist + COOLG_BOB_AMT;
|
||||
bound = actor->user.int_hiz() + actor->user.int_ceiling_dist() + COOLG_BOB_AMT;
|
||||
if (actor->user.pos.Z < bound)
|
||||
{
|
||||
// bumped something
|
||||
|
@ -769,7 +769,7 @@ int DoCoolgDeath(DSWActor* actor)
|
|||
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
||||
actor->user.coll = move_sprite(actor, nx, ny, 0L, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, ACTORMOVETICS);
|
||||
actor->user.coll = move_sprite(actor, nx, ny, 0L, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, ACTORMOVETICS);
|
||||
DoFindGroundPoint(actor);
|
||||
|
||||
// on the ground
|
||||
|
|
|
@ -483,10 +483,10 @@ int DoEelMatchPlayerZ(DSWActor* actor)
|
|||
if (dist <= 300)
|
||||
bound = actor->user.pos.Z;
|
||||
else
|
||||
bound = hiz + actor->user.ceiling_dist;
|
||||
bound = hiz + actor->user.int_ceiling_dist();
|
||||
}
|
||||
else
|
||||
bound = hiz + actor->user.ceiling_dist + EEL_BOB_AMT;
|
||||
bound = hiz + actor->user.int_ceiling_dist() + EEL_BOB_AMT;
|
||||
|
||||
if (actor->user.pos.Z < bound)
|
||||
{
|
||||
|
@ -494,12 +494,12 @@ int DoEelMatchPlayerZ(DSWActor* actor)
|
|||
}
|
||||
|
||||
actor->user.pos.Z = min(actor->user.pos.Z, loz - actor->user.floor_dist);
|
||||
actor->user.pos.Z = max(actor->user.pos.Z, hiz + actor->user.ceiling_dist);
|
||||
actor->user.pos.Z = max(actor->user.pos.Z, hiz + actor->user.int_ceiling_dist());
|
||||
|
||||
actor->user.Counter = (actor->user.Counter + (ACTORMOVETICS << 3) + (ACTORMOVETICS << 1)) & 2047;
|
||||
actor->set_int_z(actor->user.pos.Z + MulScale(EEL_BOB_AMT, bsin(actor->user.Counter), 14));
|
||||
|
||||
bound = actor->user.int_hiz() + actor->user.ceiling_dist + EEL_BOB_AMT;
|
||||
bound = actor->user.int_hiz() + actor->user.int_ceiling_dist() + EEL_BOB_AMT;
|
||||
if (actor->int_pos().Z < bound)
|
||||
{
|
||||
// bumped something
|
||||
|
@ -530,7 +530,7 @@ int DoEelDeath(DSWActor* actor)
|
|||
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
||||
actor->user.coll = move_sprite(actor, nx, ny, 0L, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, ACTORMOVETICS);
|
||||
actor->user.coll = move_sprite(actor, nx, ny, 0L, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, ACTORMOVETICS);
|
||||
DoFindGroundPoint(actor);
|
||||
|
||||
// on the ground
|
||||
|
|
|
@ -934,6 +934,7 @@ struct USER
|
|||
int int_loz() const { return loz * zworldtoint; }
|
||||
int int_hiz() const { return hiz * zworldtoint; }
|
||||
int int_z_tgt() const { return z_tgt * zworldtoint; }
|
||||
int int_ceiling_dist() const { return ceiling_dist * zworldtoint; }
|
||||
|
||||
//
|
||||
// Variables that can be used by actors and Player
|
||||
|
@ -967,6 +968,8 @@ struct USER
|
|||
|
||||
double oz; // serialized copy of sprite.oz
|
||||
double z_tgt;
|
||||
int16_t ceiling_dist;
|
||||
int16_t floor_dist;
|
||||
|
||||
int Flags;
|
||||
int Flags2;
|
||||
|
@ -988,8 +991,6 @@ struct USER
|
|||
int16_t jump_grav;
|
||||
|
||||
// clipmove
|
||||
int16_t ceiling_dist;
|
||||
int16_t floor_dist;
|
||||
int16_t lo_step;
|
||||
double hiz, loz;
|
||||
int zclip; // z height to move up for clipmove
|
||||
|
|
|
@ -380,9 +380,9 @@ int DoHornetMatchPlayerZ(DSWActor* actor)
|
|||
|
||||
// upper bound
|
||||
if (actor->user.highActor)
|
||||
bound = hiz + actor->user.ceiling_dist;
|
||||
bound = hiz + actor->user.int_ceiling_dist();
|
||||
else
|
||||
bound = hiz + actor->user.ceiling_dist + HORNET_BOB_AMT;
|
||||
bound = hiz + actor->user.int_ceiling_dist() + HORNET_BOB_AMT;
|
||||
|
||||
if (actor->user.pos.Z < bound)
|
||||
{
|
||||
|
@ -390,12 +390,12 @@ int DoHornetMatchPlayerZ(DSWActor* actor)
|
|||
}
|
||||
|
||||
actor->user.pos.Z = min(actor->user.pos.Z, loz - actor->user.floor_dist);
|
||||
actor->user.pos.Z = max(actor->user.pos.Z, hiz + actor->user.ceiling_dist);
|
||||
actor->user.pos.Z = max(actor->user.pos.Z, hiz + actor->user.int_ceiling_dist());
|
||||
|
||||
actor->user.Counter = (actor->user.Counter + (ACTORMOVETICS << 3) + (ACTORMOVETICS << 1)) & 2047;
|
||||
actor->set_int_z(actor->user.pos.Z + MulScale(HORNET_BOB_AMT, bsin(actor->user.Counter), 14));
|
||||
|
||||
bound = actor->user.int_hiz() + actor->user.ceiling_dist + HORNET_BOB_AMT;
|
||||
bound = actor->user.int_hiz() + actor->user.int_ceiling_dist() + HORNET_BOB_AMT;
|
||||
if (actor->int_pos().Z < bound)
|
||||
{
|
||||
// bumped something
|
||||
|
@ -463,7 +463,7 @@ int DoHornetCircle(DSWActor* actor)
|
|||
// move in the z direction
|
||||
actor->user.pos.Z -= actor->user.jump_speed * ACTORMOVETICS;
|
||||
|
||||
bound = actor->user.int_hiz() + actor->user.ceiling_dist + HORNET_BOB_AMT;
|
||||
bound = actor->user.int_hiz() + actor->user.int_ceiling_dist() + HORNET_BOB_AMT;
|
||||
if (actor->user.pos.Z < bound)
|
||||
{
|
||||
// bumped something
|
||||
|
@ -510,7 +510,7 @@ int DoHornetDeath(DSWActor* actor)
|
|||
nx = MulScale(actor->spr.xvel, bcos(actor->int_ang()), 14);
|
||||
ny = MulScale(actor->spr.xvel, bsin(actor->int_ang()), 14);
|
||||
|
||||
actor->user.coll = move_sprite(actor, nx, ny, 0L, actor->user.ceiling_dist, actor->user.floor_dist, 1, ACTORMOVETICS);
|
||||
actor->user.coll = move_sprite(actor, nx, ny, 0L, actor->user.int_ceiling_dist(), actor->user.floor_dist, 1, ACTORMOVETICS);
|
||||
|
||||
// on the ground
|
||||
if (actor->spr.pos.Z >= actor->user.loz)
|
||||
|
|
|
@ -372,7 +372,7 @@ int DoBloodSpray(DSWActor* actor)
|
|||
else
|
||||
{
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z,
|
||||
actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
}
|
||||
|
||||
|
||||
|
@ -561,7 +561,7 @@ int DoPhosphorus(DSWActor* actor)
|
|||
}
|
||||
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z,
|
||||
actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS*2);
|
||||
actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS*2);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -765,7 +765,7 @@ int DoChemBomb(DSWActor* actor)
|
|||
}
|
||||
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z,
|
||||
actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -994,7 +994,7 @@ int DoCaltrops(DSWActor* actor)
|
|||
}
|
||||
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z,
|
||||
actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
|
|
@ -4497,7 +4497,7 @@ void DoPlayerDive(PLAYER* pp)
|
|||
nx = MOVEx((128+64), NORM_ANGLE(bubble->int_ang() + 1024));
|
||||
ny = MOVEy((128+64), NORM_ANGLE(bubble->int_ang() + 1024));
|
||||
|
||||
move_sprite(bubble, nx, ny, 0L, plActor->user.ceiling_dist, plActor->user.floor_dist, 0, synctics);
|
||||
move_sprite(bubble, nx, ny, 0L, plActor->user.int_ceiling_dist(), plActor->user.floor_dist, 0, synctics);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1048,7 +1048,7 @@ int DoRipperBeginJumpAttack(DSWActor* actor)
|
|||
tang = getangle(target->int_pos().X - actor->int_pos().X, target->int_pos().Y - actor->int_pos().Y);
|
||||
|
||||
Collision coll = move_sprite(actor, bcos(tang, -7), bsin(tang, -7),
|
||||
0L, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS);
|
||||
0L, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS);
|
||||
|
||||
if (coll.type != kHitNone)
|
||||
actor->set_int_ang(NORM_ANGLE((actor->int_ang() + 1024) + (RANDOM_NEG(256, 6) >> 6)));
|
||||
|
|
|
@ -1070,7 +1070,7 @@ int DoRipper2BeginJumpAttack(DSWActor* actor)
|
|||
// Always jump at player if mad.
|
||||
|
||||
Collision coll = move_sprite(actor, bcos(tang, -7), bsin(tang, -7),
|
||||
0, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS);
|
||||
0, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_ACTOR, ACTORMOVETICS);
|
||||
if (coll.type != kHitNone)
|
||||
actor->set_int_ang(NORM_ANGLE((actor->int_ang() + 1024) + (RANDOM_NEG(256, 6) >> 6)));
|
||||
else
|
||||
|
|
|
@ -4626,7 +4626,7 @@ int move_actor(DSWActor* actor, int xchange, int ychange, int zchange)
|
|||
auto sect = actor->sector();
|
||||
|
||||
actor->user.coll = move_sprite(actor, xchange, ychange, zchange,
|
||||
actor->user.ceiling_dist, actor->user.floor_dist, cliptype, ACTORMOVETICS);
|
||||
actor->user.int_ceiling_dist(), actor->user.floor_dist, cliptype, ACTORMOVETICS);
|
||||
|
||||
ASSERT(actor->insector());
|
||||
|
||||
|
|
|
@ -3530,7 +3530,7 @@ int ActorFollowTrack(DSWActor* actor, short locktics)
|
|||
nz = actor->spr.zvel * locktics;
|
||||
}
|
||||
|
||||
actor->user.coll = move_sprite(actor, nx, ny, nz, actor->user.ceiling_dist, actor->user.floor_dist, 0, locktics);
|
||||
actor->user.coll = move_sprite(actor, nx, ny, nz, actor->user.int_ceiling_dist(), actor->user.floor_dist, 0, locktics);
|
||||
|
||||
|
||||
if (actor->user.coll.type != kHitNone)
|
||||
|
|
|
@ -3788,7 +3788,7 @@ AutoShrap:
|
|||
|
||||
void DoShrapMove(DSWActor* actor)
|
||||
{
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, 0, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS*2);
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, 0, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS*2);
|
||||
}
|
||||
|
||||
int DoVomit(DSWActor* actor)
|
||||
|
@ -7416,7 +7416,7 @@ int DoStar(DSWActor* actor)
|
|||
}
|
||||
}
|
||||
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -8054,7 +8054,7 @@ int DoPlasma(DSWActor* actor)
|
|||
|
||||
int DoCoolgFire(DSWActor* actor)
|
||||
{
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
if (actor->user.Flags & (SPR_UNDERWATER) && (RANDOM_P2(1024 << 4) >> 4) < 256)
|
||||
|
@ -8209,7 +8209,7 @@ int DoGrenade(DSWActor* actor)
|
|||
}
|
||||
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z,
|
||||
actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -8425,7 +8425,7 @@ int DoVulcanBoulder(DSWActor* actor)
|
|||
actor->user.change.Z += actor->user.Counter;
|
||||
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z,
|
||||
actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
int32_t const vel = ksqrt(SQ(actor->user.change.X) + SQ(actor->user.change.Y));
|
||||
|
||||
|
@ -8793,7 +8793,7 @@ int DoMine(DSWActor* actor)
|
|||
}
|
||||
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z,
|
||||
actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -8982,7 +8982,7 @@ int DoTracer(DSWActor* actor)
|
|||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -9005,7 +9005,7 @@ int DoEMP(DSWActor* actor)
|
|||
{
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -9087,7 +9087,7 @@ int DoTankShell(DSWActor* actor)
|
|||
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -9108,7 +9108,7 @@ int DoTankShell(DSWActor* actor)
|
|||
int DoTracerStart(DSWActor* actor)
|
||||
{
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z,
|
||||
actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -9132,7 +9132,7 @@ int DoLaser(DSWActor* actor)
|
|||
|
||||
while (true)
|
||||
{
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -9169,7 +9169,7 @@ int DoLaserStart(DSWActor* actor)
|
|||
{
|
||||
if (SW_SHAREWARE) return false; // JBF: verify
|
||||
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -9194,7 +9194,7 @@ int DoRail(DSWActor* actor)
|
|||
|
||||
while (true)
|
||||
{
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -9269,7 +9269,7 @@ int DoRailStart(DSWActor* actor)
|
|||
{
|
||||
if (SW_SHAREWARE) return false; // JBF: verify
|
||||
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -9305,7 +9305,7 @@ int DoRocket(DSWActor* actor)
|
|||
VectorMissileSeek(actor, 30, 16, 128, 768);
|
||||
}
|
||||
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -9364,7 +9364,7 @@ int DoMicroMini(DSWActor* actor)
|
|||
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -9396,7 +9396,7 @@ int SpawnExtraMicroMini(DSWActor* actor)
|
|||
NewStateGroup(actorNew, &sg_MicroMini[0]);
|
||||
actorNew->user.WeaponNum = actor->user.WeaponNum;
|
||||
actorNew->user.Radius = actor->user.Radius;
|
||||
actorNew->user.ceiling_dist = actor->user.ceiling_dist;
|
||||
actorNew->user.ceiling_dist = actor->user.int_ceiling_dist();
|
||||
actorNew->user.floor_dist = actor->user.floor_dist;
|
||||
actorNew->spr.cstat = actor->spr.cstat;
|
||||
|
||||
|
@ -9415,7 +9415,7 @@ int DoMicro(DSWActor* actor)
|
|||
if (SW_SHAREWARE) return false; // JBF: verify
|
||||
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z,
|
||||
actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -9488,7 +9488,7 @@ int DoUziBullet(DSWActor* actor)
|
|||
|
||||
sx = actor->int_pos().X;
|
||||
sy = actor->int_pos().Y;
|
||||
actor->user.coll = move_missile(actor, dax, day, daz, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.coll = move_missile(actor, dax, day, daz, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.Dist += Distance(sx, sy, actor->int_pos().X, actor->int_pos().Y);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
@ -9625,7 +9625,7 @@ int DoElectro(DSWActor* actor)
|
|||
int DoLavaBoulder(DSWActor* actor)
|
||||
{
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z,
|
||||
actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
if (actor->user.Flags & (SPR_UNDERWATER) && (RANDOM_P2(1024 << 4) >> 4) < 256)
|
||||
|
@ -9650,7 +9650,7 @@ int DoLavaBoulder(DSWActor* actor)
|
|||
int DoSpear(DSWActor* actor)
|
||||
{
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z,
|
||||
actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -10031,7 +10031,7 @@ void SpawnNuclearSecondaryExp(DSWActor* actor, short ang)
|
|||
expActor->user.change.Y = MOVEy(vel, ang);
|
||||
expActor->user.Radius = 200; // was NUKE_RADIUS
|
||||
expActor->user.coll = move_missile(expActor, expActor->user.change.X, expActor->user.change.Y, 0,
|
||||
expActor->user.ceiling_dist, expActor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
expActor->user.int_ceiling_dist(),expActor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
if (FindDistance3D(expActor->int_pos() - actor->int_pos()) < 1024)
|
||||
{
|
||||
|
@ -10302,7 +10302,7 @@ void SpawnGrenadeSecondaryExp(DSWActor* actor, int ang)
|
|||
expActor->user.change.Y = MOVEy(vel, ang);
|
||||
|
||||
expActor->user.coll = move_missile(expActor, expActor->user.change.X, expActor->user.change.Y, 0,
|
||||
expActor->user.ceiling_dist, expActor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
expActor->user.int_ceiling_dist(),expActor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
if (FindDistance3D(expActor->int_pos() - actor->int_pos()) < 1024)
|
||||
{
|
||||
|
@ -10593,7 +10593,7 @@ int DoFireball(DSWActor* actor)
|
|||
}
|
||||
}
|
||||
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -10757,7 +10757,7 @@ int DoNapalm(DSWActor* actor)
|
|||
|
||||
auto oldv = actor->spr.pos;
|
||||
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -10778,7 +10778,7 @@ int DoNapalm(DSWActor* actor)
|
|||
actor->spr.pos = oldv;
|
||||
|
||||
hitActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
hitActor->spr.cstat = hcstat;
|
||||
}
|
||||
}
|
||||
|
@ -10838,7 +10838,7 @@ int DoBloodWorm(DSWActor* actor)
|
|||
int bx,by;
|
||||
int amt;
|
||||
|
||||
actor->user.coll = move_ground_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.coll = move_ground_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
if (actor->user.coll.type != kHitNone)
|
||||
{
|
||||
|
@ -10920,7 +10920,7 @@ int DoSerpMeteor(DSWActor* actor)
|
|||
if (actor->spr.xrepeat > 80)
|
||||
actor->spr.xrepeat = 80;
|
||||
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
if (actor->user.coll.type != kHitNone)
|
||||
{
|
||||
|
@ -10937,7 +10937,7 @@ int DoSerpMeteor(DSWActor* actor)
|
|||
actor->spr.pos = oldv;
|
||||
|
||||
hitActor->spr.cstat &= ~(CSTAT_SPRITE_BLOCK | CSTAT_SPRITE_BLOCK_HITSCAN);
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
hitActor->spr.cstat = hcstat;
|
||||
}
|
||||
}
|
||||
|
@ -10959,7 +10959,7 @@ int DoMirvMissile(DSWActor* actor)
|
|||
if (actor->spr.xrepeat > 80)
|
||||
actor->spr.xrepeat = 80;
|
||||
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
if (actor->user.Flags & (SPR_UNDERWATER) && (RANDOM_P2(1024 << 4) >> 4) < 256)
|
||||
SpawnBubble(actor);
|
||||
|
@ -10978,7 +10978,7 @@ int DoMirvMissile(DSWActor* actor)
|
|||
|
||||
int DoMirv(DSWActor* actor)
|
||||
{
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z, actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -12658,7 +12658,7 @@ int InitStar(PLAYER* pp)
|
|||
actorNew2->spr.clipdist = actorNew->spr.clipdist;
|
||||
actorNew2->user.WeaponNum = actorNew->user.WeaponNum;
|
||||
actorNew2->user.Radius = actorNew->user.Radius;
|
||||
actorNew2->user.ceiling_dist = actorNew->user.ceiling_dist;
|
||||
actorNew2->user.ceiling_dist = actorNew->user.int_ceiling_dist();
|
||||
actorNew2->user.floor_dist = actorNew->user.floor_dist;
|
||||
actorNew2->user.Flags2 = actorNew->user.Flags2 & ~(SPR2_FLAMEDIE); // mask out any new flags here for safety.
|
||||
|
||||
|
@ -16888,7 +16888,7 @@ bool SpriteWarpToUnderwater(DSWActor* actor)
|
|||
ChangeActorSect(actor, over);
|
||||
}
|
||||
|
||||
actor->set_int_z(underActor->sector()->int_ceilingz() + actor->user.ceiling_dist+Z(1));
|
||||
actor->set_int_z(underActor->sector()->int_ceilingz() + actor->user.int_ceiling_dist() + Z(1));
|
||||
|
||||
actor->backuppos();
|
||||
|
||||
|
@ -17904,7 +17904,7 @@ int DoShrapVelocity(DSWActor* actor)
|
|||
}
|
||||
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z,
|
||||
actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS*2);
|
||||
actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS*2);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
@ -18216,7 +18216,7 @@ int DoItemFly(DSWActor* actor)
|
|||
}
|
||||
|
||||
actor->user.coll = move_missile(actor, actor->user.change.X, actor->user.change.Y, actor->user.change.Z,
|
||||
actor->user.ceiling_dist, actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS*2);
|
||||
actor->user.int_ceiling_dist(), actor->user.floor_dist, CLIPMASK_MISSILE, MISSILEMOVETICS*2);
|
||||
|
||||
MissileHitDiveArea(actor);
|
||||
|
||||
|
|
Loading…
Reference in a new issue