mirror of
https://github.com/ZDoom/Raze.git
synced 2025-04-07 00:11:22 +00:00
- use clear_xvel wrapper.
This commit is contained in:
parent
aa22e48036
commit
36f109502d
36 changed files with 156 additions and 154 deletions
|
@ -741,7 +741,7 @@ void movecrane(DDukeActor *actor, int crane)
|
|||
if (actor->spr.pos.Z < cpt.pos.Z)
|
||||
{
|
||||
actor->temp_data[0]++;
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
}
|
||||
else
|
||||
actor->spr.pos.Z -= 6;
|
||||
|
@ -1481,7 +1481,7 @@ bool queball(DDukeActor *actor, int pocket, int queball, int stripeball)
|
|||
}
|
||||
|
||||
actor->spr.xvel--;
|
||||
if (actor->spr.xvel < 0) actor->spr.xvel = 0;
|
||||
if (actor->spr.xvel < 0) actor->clear_xvel();
|
||||
if (actor->spr.picnum == stripeball)
|
||||
{
|
||||
actor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
|
@ -1687,7 +1687,7 @@ void recon(DDukeActor *actor, int explosion, int firelaser, int attacksnd, int p
|
|||
{
|
||||
actor->temp_data[3] = 0;
|
||||
if (actor->spr.xvel > 0) actor->spr.xvel -= 16;
|
||||
else actor->spr.xvel = 0;
|
||||
else actor->clear_xvel();
|
||||
|
||||
if (actor->temp_data[0] == 2)
|
||||
{
|
||||
|
@ -1734,7 +1734,7 @@ void recon(DDukeActor *actor, int explosion, int firelaser, int attacksnd, int p
|
|||
else
|
||||
{
|
||||
if (actor->spr.xvel > 0) actor->spr.xvel -= 16;
|
||||
else actor->spr.xvel = 0;
|
||||
else actor->clear_xvel();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2153,7 +2153,7 @@ bool jibs(DDukeActor *actor, int JIBS6, bool timeout, bool callsetsprite, bool f
|
|||
auto sectp = actor->sector();
|
||||
|
||||
if (actor->spr.xvel > 0) actor->spr.xvel--;
|
||||
else actor->spr.xvel = 0;
|
||||
else actor->clear_xvel();
|
||||
|
||||
if (timeout)
|
||||
{
|
||||
|
@ -2252,7 +2252,7 @@ bool jibs(DDukeActor *actor, int JIBS6, bool timeout, bool callsetsprite, bool f
|
|||
double ll = getflorzofslopeptrf(actor->sector(), actor->spr.pos);
|
||||
|
||||
actor->spr.pos.Z = ll - 2;
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
|
||||
if (actor->spr.picnum == JIBS6)
|
||||
{
|
||||
|
@ -2385,7 +2385,7 @@ void shell(DDukeActor* actor, bool morecheck)
|
|||
else actor->add_int_zvel(- 64);
|
||||
if (actor->spr.xvel > 0)
|
||||
actor->spr.xvel -= 4;
|
||||
else actor->spr.xvel = 0;
|
||||
else actor->clear_xvel();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2448,7 +2448,7 @@ void glasspieces(DDukeActor* actor)
|
|||
static const ESpriteFlags flips[] = { 0, CSTAT_SPRITE_XFLIP, CSTAT_SPRITE_YFLIP, CSTAT_SPRITE_XFLIP | CSTAT_SPRITE_YFLIP };
|
||||
actor->spr.cstat = flips[actor->spr.xvel & 3];
|
||||
}
|
||||
else actor->spr.xvel = 0;
|
||||
else actor->clear_xvel();
|
||||
|
||||
ssp(actor, CLIPMASK0);
|
||||
}
|
||||
|
@ -2465,7 +2465,7 @@ void scrap(DDukeActor* actor, int SCRAP1, int SCRAP6)
|
|||
|
||||
if (actor->spr.xvel > 0)
|
||||
actor->spr.xvel--;
|
||||
else actor->spr.xvel = 0;
|
||||
else actor->clear_xvel();
|
||||
|
||||
if (actor->float_zvel() > 4 && actor->float_zvel() < 5)
|
||||
{
|
||||
|
@ -2965,13 +2965,13 @@ void handle_se30(DDukeActor *actor, int JIBS6)
|
|||
int l = FindDistance2D(Owner->int_pos().vec2 - actor->int_pos().vec2);
|
||||
|
||||
if (l <= 128)
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
|
||||
if (actor->spr.xvel > 0)
|
||||
actor->spr.xvel -= 16;
|
||||
else
|
||||
{
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
operateactivators(actor->spr.hitag + (short)actor->temp_data[3], -1);
|
||||
actor->SetOwner(nullptr);
|
||||
actor->add_int_ang(1024);
|
||||
|
|
|
@ -237,7 +237,7 @@ bool ifsquished(DDukeActor* actor, int p)
|
|||
FTA(QUOTE_SQUISHED, &ps[p]);
|
||||
|
||||
if (badguy(actor))
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
|
||||
if (actor->spr.pal == 1)
|
||||
{
|
||||
|
@ -394,7 +394,7 @@ void hitradius_d(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h
|
|||
|
||||
if (act2->spr.picnum != TANK && act2->spr.picnum != ROTATEGUN && act2->spr.picnum != RECON && !bossguy(act2))
|
||||
{
|
||||
if (act2->spr.xvel < 0) act2->spr.xvel = 0;
|
||||
if (act2->spr.xvel < 0) act2->clear_xvel();
|
||||
act2->spr.xvel += (actor->spr.extra << 2);
|
||||
}
|
||||
|
||||
|
@ -1604,7 +1604,7 @@ static void weaponcommon_d(DDukeActor* proj)
|
|||
{
|
||||
return;
|
||||
}
|
||||
proj->spr.xvel = 0;
|
||||
proj->clear_xvel();
|
||||
proj->clear_zvel();
|
||||
}
|
||||
|
||||
|
@ -2297,7 +2297,7 @@ static void greenslime(DDukeActor *actor)
|
|||
makeitfall(actor);
|
||||
if (s5)
|
||||
{
|
||||
s5->spr.xvel = 0;
|
||||
s5->clear_xvel();
|
||||
|
||||
actor->spr.pos = s5->spr.pos + s5->spr.angle.ToVector() * 0.5;
|
||||
actor->spr.picnum = GREENSLIME + 2 + (global_random & 1);
|
||||
|
@ -2405,7 +2405,7 @@ static void greenslime(DDukeActor *actor)
|
|||
if (actor->spr.pos.Z < actor->ceilingz + 16)
|
||||
{
|
||||
actor->spr.pos.Z = actor->ceilingz + 16;
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
actor->temp_data[0] = 2;
|
||||
}
|
||||
}
|
||||
|
@ -2431,7 +2431,7 @@ static void greenslime(DDukeActor *actor)
|
|||
{
|
||||
actor->spr.pos.Z = actor->floorz - 8;
|
||||
actor->temp_data[0] = 0;
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2501,7 +2501,7 @@ static void flamethrowerflame(DDukeActor *actor)
|
|||
}
|
||||
|
||||
if (coll.type != 0) {
|
||||
actor->spr.xvel = actor->spr.yvel = 0;
|
||||
actor->clear_xyvel();
|
||||
actor->clear_zvel();
|
||||
if (coll.type == kHitSprite)
|
||||
{
|
||||
|
@ -2571,7 +2571,7 @@ static void heavyhbomb(DDukeActor *actor)
|
|||
actor->temp_data[3] = 1;
|
||||
actor->temp_data[4] = 0;
|
||||
l = 0;
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
goto DETONATEB;
|
||||
}
|
||||
}
|
||||
|
@ -2618,7 +2618,7 @@ static void heavyhbomb(DDukeActor *actor)
|
|||
actor->temp_data[3] = 1;
|
||||
actor->temp_data[4] = 0;
|
||||
l = 0;
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
goto DETONATEB;
|
||||
}
|
||||
|
||||
|
@ -2633,7 +2633,7 @@ static void heavyhbomb(DDukeActor *actor)
|
|||
actor->spr.xvel -= 10;
|
||||
|
||||
if (actor->spr.xvel < 0)
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
if (actor->spr.xvel & 8) actor->spr.cstat ^= CSTAT_SPRITE_XFLIP;
|
||||
}
|
||||
|
||||
|
@ -3166,7 +3166,7 @@ void handle_se06_d(DDukeActor* actor)
|
|||
if (actor->temp_data[4] >= (k - (k >> 3)))
|
||||
actor->spr.xvel -= (k >> 5);
|
||||
if (actor->temp_data[4] > ((k >> 1) - 1) && actor->temp_data[4] < (k - (k >> 3)))
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
if (actor->temp_data[4] < (k >> 1))
|
||||
actor->spr.xvel += (k >> 5);
|
||||
if (actor->temp_data[4] < ((k >> 1) - (k >> 3)))
|
||||
|
@ -3560,7 +3560,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
|
|||
if (actor->spr.picnum != APLAYER)
|
||||
alterang(a, actor, playernum);
|
||||
|
||||
if (actor->spr.xvel > -6 && actor->spr.xvel < 6) actor->spr.xvel = 0;
|
||||
if (actor->spr.xvel > -6 && actor->spr.xvel < 6) actor->clear_xvel();
|
||||
|
||||
a = badguy(actor);
|
||||
|
||||
|
|
|
@ -330,7 +330,7 @@ void hitradius_r(DDukeActor* actor, int r, int hp1, int hp2, int hp3, int h
|
|||
(pic != HULK && pic != MAMA && pic != BILLYPLAY && pic != COOTPLAY && pic != MAMACLOUD) :
|
||||
(pic != HULK && pic != SBMOVE))
|
||||
{
|
||||
if (act2->spr.xvel < 0) act2->spr.xvel = 0;
|
||||
if (act2->spr.xvel < 0) act2->clear_xvel();
|
||||
act2->spr.xvel += (act2->spr.extra << 2);
|
||||
}
|
||||
|
||||
|
@ -2341,7 +2341,7 @@ static void heavyhbomb(DDukeActor *actor)
|
|||
actor->temp_data[3] = 1;
|
||||
actor->temp_data[4] = 0;
|
||||
l = 0;
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
goto DETONATEB;
|
||||
}
|
||||
}
|
||||
|
@ -2387,7 +2387,7 @@ static void heavyhbomb(DDukeActor *actor)
|
|||
actor->temp_data[5] = 1;
|
||||
spawn(actor, WATERSPLASH2);
|
||||
if (isRRRA() && actor->spr.picnum == MORTER)
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
}
|
||||
}
|
||||
else actor->temp_data[5] = 0;
|
||||
|
@ -2397,7 +2397,7 @@ static void heavyhbomb(DDukeActor *actor)
|
|||
actor->temp_data[3] = 1;
|
||||
actor->temp_data[4] = 0;
|
||||
l = 0;
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
goto DETONATEB;
|
||||
}
|
||||
|
||||
|
@ -2406,7 +2406,7 @@ static void heavyhbomb(DDukeActor *actor)
|
|||
actor->temp_data[3] = 1;
|
||||
actor->temp_data[4] = 0;
|
||||
l = 0;
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
goto DETONATEB;
|
||||
}
|
||||
|
||||
|
@ -2421,7 +2421,7 @@ static void heavyhbomb(DDukeActor *actor)
|
|||
actor->spr.xvel -= 10;
|
||||
|
||||
if (actor->spr.xvel < 0)
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
if (actor->spr.xvel & 8) actor->spr.cstat ^= CSTAT_SPRITE_XFLIP;
|
||||
}
|
||||
|
||||
|
@ -2437,7 +2437,7 @@ static void heavyhbomb(DDukeActor *actor)
|
|||
actor->temp_data[3] = 1;
|
||||
actor->temp_data[4] = 0;
|
||||
l = 0;
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
goto DETONATEB;
|
||||
}
|
||||
actor->set_int_ang(((k << 1) - actor->int_ang()) & 2047);
|
||||
|
@ -2557,7 +2557,7 @@ static int henstand(DDukeActor *actor)
|
|||
}
|
||||
}
|
||||
if (actor->sector()->lotag == 900)
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
if (actor->spr.xvel)
|
||||
{
|
||||
makeitfall(actor);
|
||||
|
@ -2591,7 +2591,7 @@ static int henstand(DDukeActor *actor)
|
|||
}
|
||||
}
|
||||
actor->spr.xvel--;
|
||||
if (actor->spr.xvel < 0) actor->spr.xvel = 0;
|
||||
if (actor->spr.xvel < 0) actor->clear_xvel();
|
||||
actor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
if (actor->spr.picnum == BOWLINGPIN)
|
||||
{
|
||||
|
@ -3153,7 +3153,7 @@ void handle_se06_r(DDukeActor *actor)
|
|||
if (actor->temp_data[4] >= (k - (k >> 3)))
|
||||
actor->spr.xvel -= (k >> 5);
|
||||
if (actor->temp_data[4] > ((k >> 1) - 1) && actor->temp_data[4] < (k - (k >> 3)))
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
if (actor->temp_data[4] < (k >> 1))
|
||||
actor->spr.xvel += (k >> 5);
|
||||
if (actor->temp_data[4] < ((k >> 1) - (k >> 3)))
|
||||
|
@ -3629,7 +3629,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
|
|||
if (actor->spr.picnum != APLAYER)
|
||||
alterang(a, actor, pnum);
|
||||
|
||||
if (actor->spr.xvel > -6 && actor->spr.xvel < 6) actor->spr.xvel = 0;
|
||||
if (actor->spr.xvel > -6 && actor->spr.xvel < 6) actor->clear_xvel();
|
||||
|
||||
a = badguy(actor);
|
||||
|
||||
|
|
|
@ -299,7 +299,7 @@ static void shootknee(DDukeActor* actor, int p, int sx, int sy, int sz, int sa)
|
|||
splash->spr.angle = ps[p].angle.ang; // Total tweek
|
||||
splash->spr.xvel = 32;
|
||||
ssp(actor, CLIPMASK0);
|
||||
splash->spr.xvel = 0;
|
||||
splash->clear_xvel();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2841,7 +2841,8 @@ void processinput_d(int snum)
|
|||
|
||||
if (p->newOwner != nullptr)
|
||||
{
|
||||
p->vel.X = p->vel.Y = pact->spr.xvel = 0;
|
||||
p->vel.X = p->vel.Y = 0;
|
||||
pact->clear_xvel();
|
||||
|
||||
fi.doincrements(p);
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@ static void shootmelee(DDukeActor *actor, int p, int sx, int sy, int sz, int sa,
|
|||
splash->spr.angle = ps[p].angle.ang; // Total tweek
|
||||
splash->spr.xvel = 32;
|
||||
ssp(actor, 0);
|
||||
splash->spr.xvel = 0;
|
||||
splash->clear_xvel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3560,7 +3560,8 @@ void processinput_r(int snum)
|
|||
|
||||
if (p->newOwner != nullptr)
|
||||
{
|
||||
p->vel.X = p->vel.Y = pact->spr.xvel = 0;
|
||||
p->vel.X = p->vel.Y = 0;
|
||||
pact->clear_xvel();
|
||||
|
||||
fi.doincrements(p);
|
||||
|
||||
|
|
|
@ -527,7 +527,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
|
|||
act->spr.clipdist = 8;
|
||||
act->spr.xrepeat = 13;
|
||||
act->spr.yrepeat = 10;
|
||||
act->spr.xvel = 0;
|
||||
act->clear_xvel();
|
||||
ChangeActorStat(act, 1);
|
||||
break;
|
||||
case BOWLINGPIN:
|
||||
|
|
|
@ -86,7 +86,7 @@ DExhumedActor* BuildAnim(DExhumedActor* pActor, int val, int val2, const DVector
|
|||
pActor->set_int_ang(0);
|
||||
pActor->spr.xoffset = 0;
|
||||
pActor->spr.yoffset = 0;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->backuppos();
|
||||
|
|
|
@ -68,7 +68,7 @@ void BuildAnubis(DExhumedActor* ap, const DVector3& pos, sectortype* pSector, in
|
|||
ap->set_int_ang(nAngle);
|
||||
ap->spr.xrepeat = 40;
|
||||
ap->spr.yrepeat = 40;
|
||||
ap->spr.xvel = 0;
|
||||
ap->clear_xvel();
|
||||
ap->spr.yvel = 0;
|
||||
ap->clear_zvel();
|
||||
ap->spr.hitag = 0;
|
||||
|
@ -214,7 +214,7 @@ void AIAnubis::Tick(RunListEvent* ev)
|
|||
if (cansee(ap->spr.pos.plusZ(-GetActorHeightF(ap)), ap->sector(),
|
||||
pTarget->spr.pos.plusZ(-GetActorHeightF(pTarget)), pTarget->sector()))
|
||||
{
|
||||
ap->spr.xvel = 0;
|
||||
ap->clear_xvel();
|
||||
ap->spr.yvel = 0;
|
||||
ap->spr.angle = VecToAngle(pTarget->spr.pos - ap->spr.pos);
|
||||
|
||||
|
@ -276,7 +276,7 @@ void AIAnubis::Tick(RunListEvent* ev)
|
|||
case 4:
|
||||
case 5:
|
||||
{
|
||||
ap->spr.xvel = 0;
|
||||
ap->clear_xvel();
|
||||
ap->spr.yvel = 0;
|
||||
|
||||
if (bVal)
|
||||
|
@ -307,7 +307,7 @@ void AIAnubis::Tick(RunListEvent* ev)
|
|||
ap->nAction = nAction + 2;
|
||||
ap->nFrame = 0;
|
||||
|
||||
ap->spr.xvel = 0;
|
||||
ap->clear_xvel();
|
||||
ap->spr.yvel = 0;
|
||||
}
|
||||
return;
|
||||
|
@ -333,7 +333,7 @@ void AIAnubis::Tick(RunListEvent* ev)
|
|||
ap->nCount = 100;
|
||||
ap->pTarget = nullptr;
|
||||
|
||||
ap->spr.xvel = 0;
|
||||
ap->clear_xvel();
|
||||
ap->spr.yvel = 0;
|
||||
}
|
||||
}
|
||||
|
@ -413,7 +413,7 @@ void AIAnubis::Damage(RunListEvent* ev)
|
|||
else
|
||||
{
|
||||
// he ded.
|
||||
ap->spr.xvel = 0;
|
||||
ap->clear_xvel();
|
||||
ap->spr.yvel = 0;
|
||||
ap->clear_zvel();
|
||||
ap->spr.pos.Z = ap->sector()->floorz;
|
||||
|
|
|
@ -53,7 +53,7 @@ DExhumedActor* BuildBubble(const DVector3& pos, sectortype* pSector)
|
|||
pActor->spr.yoffset = 0;
|
||||
pActor->spr.picnum = 1;
|
||||
pActor->set_int_ang(inita);
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->set_int_zvel(-1200);
|
||||
pActor->spr.hitag = -1;
|
||||
|
|
|
@ -618,7 +618,7 @@ DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, int nZOffset, int n
|
|||
pBulletActor->spr.xoffset = 0;
|
||||
pBulletActor->spr.yoffset = 0;
|
||||
pBulletActor->set_int_ang(nAngle);
|
||||
pBulletActor->spr.xvel = 0;
|
||||
pBulletActor->clear_xvel();
|
||||
pBulletActor->spr.yvel = 0;
|
||||
pBulletActor->clear_zvel();
|
||||
pBulletActor->spr.lotag = runlist_HeadRun() + 1;
|
||||
|
|
|
@ -122,7 +122,7 @@ void AIFishLimb::Tick(RunListEvent* ev)
|
|||
auto coll = movesprite(pActor, pActor->spr.xvel << 8, pActor->spr.yvel << 8, pActor->int_zvel(), 2560, -2560, CLIPMASK1);
|
||||
if (coll.type != kHitNone)
|
||||
{
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
}
|
||||
}
|
||||
|
@ -160,7 +160,7 @@ void BuildFish(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector,
|
|||
pActor->spr.xoffset = 0;
|
||||
pActor->spr.yoffset = 0;
|
||||
pActor->spr.picnum = seq_GetSeqPicnum(kSeqFish, FishSeq[0].a, 0);
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->set_int_ang(nAngle);
|
||||
|
@ -378,7 +378,7 @@ void AIFish::Tick(RunListEvent* ev)
|
|||
}
|
||||
else
|
||||
{
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ void BuildGrenade(int nPlayer)
|
|||
pActor->spr.yoffset = 0;
|
||||
pActor->spr.angle = pPlayerActor->spr.angle;
|
||||
pActor->spr.intowner = nPlayer;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->spr.hitag = 0;
|
||||
|
|
|
@ -423,7 +423,7 @@ void DoRegenerates()
|
|||
pActor->spr.xint = 0;
|
||||
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->clear_zvel();
|
||||
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ void AILavaDudeLimb::Tick(RunListEvent* ev)
|
|||
|
||||
if (coll.type || pActor->spr.shade > 100)
|
||||
{
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
|
||||
|
@ -122,7 +122,7 @@ void BuildLava(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector,
|
|||
pActor->spr.xoffset = 0;
|
||||
pActor->spr.yoffset = 0;
|
||||
pActor->spr.picnum = seq_GetSeqPicnum(kSeqLavag, LavadudeSeq[3].a, 0);
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->set_int_ang(nAngle);
|
||||
|
|
|
@ -65,7 +65,7 @@ void BuildLion(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector,
|
|||
pActor->spr.xoffset = 0;
|
||||
pActor->spr.yoffset = 0;
|
||||
pActor->set_int_ang(nAngle);
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->spr.lotag = runlist_HeadRun() + 1;
|
||||
|
@ -119,7 +119,7 @@ void AILion::Damage(RunListEvent* ev)
|
|||
if (pActor->nHealth <= 0)
|
||||
{
|
||||
// R.I.P.
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
|
||||
|
@ -160,7 +160,7 @@ void AILion::Damage(RunListEvent* ev)
|
|||
if (RandomSize(8) <= (pActor->nHealth >> 2))
|
||||
{
|
||||
pActor->nAction = 4;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
}
|
||||
else if (RandomSize(1))
|
||||
|
@ -173,7 +173,7 @@ void AILion::Damage(RunListEvent* ev)
|
|||
else
|
||||
{
|
||||
pActor->nAction = 8;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
|
||||
}
|
||||
|
@ -257,7 +257,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
}
|
||||
else
|
||||
{
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
}
|
||||
|
||||
|
@ -304,7 +304,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
{
|
||||
pActor->nAction = 9;
|
||||
pActor->spr.cstat &= ~CSTAT_SPRITE_INVISIBLE;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
}
|
||||
else
|
||||
|
@ -528,7 +528,7 @@ void AILion::Tick(RunListEvent* ev)
|
|||
pActor->nFrame = 0;
|
||||
pActor->nCount = 100;
|
||||
pActor->pTarget = nullptr;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1359,7 +1359,7 @@ void AICreatureChunk::Tick(RunListEvent* ev)
|
|||
// re-grab this variable as it may have changed in movesprite(). Note the check above is against the value *before* movesprite so don't change it.
|
||||
pSector = pActor->sector();
|
||||
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->spr.pos.Z = pSector->floorz;
|
||||
|
|
|
@ -53,7 +53,7 @@ void BuildMummy(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector,
|
|||
pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
pActor->spr.shade = -12;
|
||||
pActor->spr.clipdist = 32;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->spr.xrepeat = 42;
|
||||
|
@ -147,7 +147,7 @@ void AIMummy::Tick(RunListEvent* ev)
|
|||
{
|
||||
pActor->nAction = 0;
|
||||
pActor->nFrame = 0;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
}
|
||||
}
|
||||
|
@ -207,7 +207,7 @@ void AIMummy::Tick(RunListEvent* ev)
|
|||
pActor->nAction = 3;
|
||||
pActor->nFrame = 0;
|
||||
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
return;
|
||||
}
|
||||
|
@ -228,14 +228,14 @@ void AIMummy::Tick(RunListEvent* ev)
|
|||
{
|
||||
pActor->spr.xvel -= 1024;
|
||||
if (pActor->spr.xvel < 0) {
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
}
|
||||
}
|
||||
else if (pActor->spr.xvel < 0)
|
||||
{
|
||||
pActor->spr.xvel += 1024;
|
||||
if (pActor->spr.xvel > 0) {
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -275,7 +275,7 @@ void AIMummy::Tick(RunListEvent* ev)
|
|||
pActor->nAction = 2;
|
||||
pActor->nFrame = 0;
|
||||
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
}
|
||||
}
|
||||
|
@ -379,7 +379,7 @@ void AIMummy::Tick(RunListEvent* ev)
|
|||
|
||||
if (bVal)
|
||||
{
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
|
||||
|
@ -440,7 +440,7 @@ void AIMummy::Damage(RunListEvent* ev)
|
|||
pActor->nFrame = 0;
|
||||
pActor->nAction = 4;
|
||||
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->spr.pos.Z = pActor->sector()->floorz;
|
||||
|
@ -452,7 +452,7 @@ void AIMummy::Damage(RunListEvent* ev)
|
|||
pActor->nAction = 7;
|
||||
pActor->nFrame = 0;
|
||||
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1202,7 +1202,7 @@ int BuildTrap(DExhumedActor* pActor, int edx, int ebx, int ecx)
|
|||
ChangeActorStat(pActor, 0);
|
||||
|
||||
pActor->spr.cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->spr.extra = -1;
|
||||
|
@ -1446,7 +1446,7 @@ void AISpark::Tick(RunListEvent* ev)
|
|||
}
|
||||
}
|
||||
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
|
||||
|
@ -1583,7 +1583,7 @@ DExhumedActor* BuildEnergyBlock(sectortype* pSector)
|
|||
|
||||
pActor->spr.xrepeat = nRepeat;
|
||||
pActor->spr.cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->spr.extra = -1;
|
||||
|
@ -1784,7 +1784,7 @@ DExhumedActor* BuildObject(DExhumedActor* pActor, int nOjectType, int nHitag)
|
|||
|
||||
// 0x7FFD to ensure set as blocking ('B' and 'H') sprite and also disable translucency and set not invisible
|
||||
pActor->spr.cstat = (pActor->spr.cstat | CSTAT_SPRITE_BLOCK_ALL) & ~(CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_INVISIBLE);
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->spr.extra = -1;
|
||||
|
@ -1903,7 +1903,7 @@ void AIObject::Tick(RunListEvent* ev)
|
|||
if (nMov.type == kHitSprite)
|
||||
{
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2031,7 +2031,7 @@ void AIObject::RadialDamage(RunListEvent* ev)
|
|||
|
||||
if (pActor->spr.statnum == kStatExplodeTarget)
|
||||
{
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
}
|
||||
|
|
|
@ -300,7 +300,7 @@ void RestartPlayer(int nPlayer)
|
|||
pActor->spr.picnum = seq_GetSeqPicnum(kSeqJoe, 18, 0);
|
||||
|
||||
int nHeight = GetActorHeight(pActor);
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
|
||||
|
@ -546,7 +546,7 @@ void SetPlayerMummified(int nPlayer, int bIsMummified)
|
|||
DExhumedActor* pActor = PlayerList[nPlayer].pActor;
|
||||
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
|
||||
PlayerList[nPlayer].bIsMummified = bIsMummified;
|
||||
|
||||
|
@ -923,7 +923,7 @@ void AIPlayer::Tick(RunListEvent* ev)
|
|||
lPlayerXVel = 0;
|
||||
lPlayerYVel = 0;
|
||||
|
||||
pPlayerActor->spr.xvel = 0;
|
||||
pPlayerActor->clear_xvel();
|
||||
pPlayerActor->spr.yvel = 0;
|
||||
pPlayerActor->clear_zvel();
|
||||
|
||||
|
@ -976,7 +976,7 @@ void AIPlayer::Tick(RunListEvent* ev)
|
|||
|
||||
if (PlayerList[nPlayer].nHealth <= 0)
|
||||
{
|
||||
pPlayerActor->spr.xvel = 0;
|
||||
pPlayerActor->clear_xvel();
|
||||
pPlayerActor->spr.yvel = 0;
|
||||
|
||||
StopActorSound(pPlayerActor);
|
||||
|
|
|
@ -453,7 +453,7 @@ void BuildQueenEgg(int nQueen, int nVal)
|
|||
{
|
||||
pActor2->spr.xrepeat = 60;
|
||||
pActor2->spr.yrepeat = 60;
|
||||
pActor2->spr.xvel = 0;
|
||||
pActor2->clear_xvel();
|
||||
pActor2->spr.yvel = 0;
|
||||
pActor2->set_int_zvel(-2000);
|
||||
pActor2->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
|
@ -816,7 +816,7 @@ void AIQueenHead::Tick(RunListEvent* ev)
|
|||
}
|
||||
else
|
||||
{
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
|
||||
if (pActor->float_zvel() == 0)
|
||||
|
@ -1098,7 +1098,7 @@ void BuildQueen(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector,
|
|||
pActor->spr.yoffset = 0;
|
||||
pActor->spr.picnum = 1;
|
||||
pActor->set_int_ang(nAngle);
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->spr.lotag = runlist_HeadRun() + 1;
|
||||
|
@ -1222,7 +1222,7 @@ void AIQueen::Tick(RunListEvent* ev)
|
|||
if (QueenList[nQueen].nIndex <= 0)
|
||||
{
|
||||
QueenList[nQueen].nFrame = 0;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
QueenList[nQueen].nAction = si + 4;
|
||||
QueenList[nQueen].nIndex = RandomSize(6) + 30;
|
||||
|
@ -1290,7 +1290,7 @@ void AIQueen::Tick(RunListEvent* ev)
|
|||
QueenList[nQueen].nIndex = 100;
|
||||
QueenList[nQueen].pTarget = nullptr;
|
||||
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
}
|
||||
}
|
||||
|
@ -1419,7 +1419,7 @@ void AIQueen::Damage(RunListEvent* ev)
|
|||
|
||||
if (QueenList[nQueen].nHealth <= 0)
|
||||
{
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ void BuildRa(int nPlayer)
|
|||
auto pActor = insertActor(pPlayerActor->sector(), 203);
|
||||
|
||||
pActor->spr.cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->spr.extra = -1;
|
||||
|
|
|
@ -97,7 +97,7 @@ void BuildRat(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, i
|
|||
pActor->set_int_ang(nAngle);
|
||||
pActor->spr.xrepeat = 50;
|
||||
pActor->spr.yrepeat = 50;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->spr.lotag = runlist_HeadRun() + 1;
|
||||
|
@ -171,7 +171,7 @@ void AIRat::Damage(RunListEvent* ev)
|
|||
if (ev->nDamage)
|
||||
{
|
||||
pActor->spr.cstat = 0;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->nAction = 3;
|
||||
pActor->nFrame = 0;
|
||||
|
@ -234,7 +234,7 @@ void AIRat::Tick(RunListEvent* ev)
|
|||
pActor->nFrame = 0;
|
||||
pActor->pTarget = nullptr;
|
||||
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
return;
|
||||
}
|
||||
|
@ -272,7 +272,7 @@ void AIRat::Tick(RunListEvent* ev)
|
|||
pActor->nFrame = 0;
|
||||
pActor->pTarget = nullptr;
|
||||
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
}
|
||||
|
||||
|
@ -299,7 +299,7 @@ void AIRat::Tick(RunListEvent* ev)
|
|||
pActor->nFrame = 0;
|
||||
pActor->nPhase = RandomSize(3);
|
||||
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
return;
|
||||
}
|
||||
|
@ -319,7 +319,7 @@ void AIRat::Tick(RunListEvent* ev)
|
|||
pActor->nCount = RandomSize(6);
|
||||
if (pActor->spr.xvel || pActor->spr.yvel)
|
||||
{
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ void BuildRex(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, i
|
|||
pActor->spr.xoffset = 0;
|
||||
pActor->spr.yoffset = 0;
|
||||
pActor->set_int_ang(nAngle);
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->spr.lotag = runlist_HeadRun() + 1;
|
||||
|
@ -122,7 +122,7 @@ void AIRex::Damage(RunListEvent* ev)
|
|||
|
||||
if (pActor->nHealth <= 0)
|
||||
{
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
|
||||
|
@ -246,7 +246,7 @@ void AIRex::Tick(RunListEvent* ev)
|
|||
{
|
||||
pActor->nAction = 5;
|
||||
pActor->nFrame = 0;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
return;
|
||||
}
|
||||
|
@ -437,7 +437,7 @@ void AIRex::Tick(RunListEvent* ev)
|
|||
pActor->nFrame = 0;
|
||||
pActor->nCount = 0;
|
||||
pActor->pTarget = nullptr;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ void BuildRoach(int nType, DExhumedActor* pActor, const DVector3& pos, sectortyp
|
|||
pActor->set_int_ang(angle);
|
||||
pActor->spr.xrepeat = 40;
|
||||
pActor->spr.yrepeat = 40;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->spr.hitag = 0;
|
||||
|
@ -130,7 +130,7 @@ void AIRoach::Damage(RunListEvent* ev)
|
|||
pActor->nHealth -= dmgAdjust(ev->nDamage);
|
||||
if (pActor->nHealth <= 0)
|
||||
{
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
|
||||
|
@ -271,7 +271,7 @@ void AIRoach::Tick(RunListEvent* ev)
|
|||
pActor->nIndex = RandomSize(2) + 1;
|
||||
pActor->nAction = 3;
|
||||
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->spr.angle = VecToAngle(pTarget->spr.pos - pActor->spr.pos);
|
||||
|
||||
|
@ -300,7 +300,7 @@ void AIRoach::Tick(RunListEvent* ev)
|
|||
pActor->nIndex = RandomSize(2) + 1;
|
||||
pActor->nAction = 3;
|
||||
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->spr.angle = VecToAngle(pTarget->spr.pos - pActor->spr.pos);
|
||||
|
||||
|
@ -314,7 +314,7 @@ void AIRoach::Tick(RunListEvent* ev)
|
|||
pActor->nFrame = 0;
|
||||
pActor->nCount = 100;
|
||||
pActor->pTarget = nullptr;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ void BuildScorp(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector,
|
|||
pActor->spr.xoffset = 0;
|
||||
pActor->spr.yoffset = 0;
|
||||
pActor->set_int_ang(nAngle);
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->spr.lotag = runlist_HeadRun() + 1;
|
||||
|
@ -127,7 +127,7 @@ void AIScorp::Damage(RunListEvent* ev)
|
|||
pActor->nFrame = 0;
|
||||
pActor->nCount = 10;
|
||||
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
|
||||
|
@ -426,7 +426,7 @@ void AIScorp::Effect(RunListEvent* ev, DExhumedActor* pTarget, int mode)
|
|||
if (cansee(pActor->spr.pos.plusZ(-GetActorHeightF(pActor)), pActor->sector(),
|
||||
pTarget->spr.pos.plusZ(-GetActorHeightF(pTarget)), pTarget->sector()))
|
||||
{
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->spr.angle = VecToAngle(pTarget->spr.pos - pActor->spr.pos);
|
||||
|
||||
|
@ -455,7 +455,7 @@ void AIScorp::Effect(RunListEvent* ev, DExhumedActor* pTarget, int mode)
|
|||
pActor->nCount = 30;
|
||||
pActor->pTarget = nullptr;
|
||||
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ void BuildSet(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, i
|
|||
pActor->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
pActor->spr.shade = -12;
|
||||
pActor->spr.clipdist = 110;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->spr.xrepeat = 87;
|
||||
|
@ -105,7 +105,7 @@ void BuildSoul(DExhumedActor* pSet)
|
|||
pActor->spr.yoffset = 0;
|
||||
pActor->spr.picnum = seq_GetSeqPicnum(kSeqSet, 75, 0);
|
||||
pActor->set_int_ang(RandomSize(11));
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->set_int_zvel((-256) - RandomSize(10));
|
||||
pActor->spr.pos = DVector3(pSet->spr.pos.XY(), RandomSize(8) + 32 + pActor->sector()->ceilingz - GetActorHeightF(pActor));
|
||||
|
@ -185,7 +185,7 @@ void AISet::Damage(RunListEvent* ev)
|
|||
|
||||
if (pActor->nHealth <= 0)
|
||||
{
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
|
||||
|
@ -326,7 +326,7 @@ void AISet::Tick(RunListEvent* ev)
|
|||
pActor->nIndex = 0;
|
||||
pActor->nFrame = 0;
|
||||
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
|
||||
pActor->pTarget = FindPlayer(pActor, 1000);
|
||||
|
@ -357,7 +357,7 @@ void AISet::Tick(RunListEvent* ev)
|
|||
pActor->nIndex = 0;
|
||||
pActor->nAction = 7;
|
||||
pActor->nFrame = 0;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
return;
|
||||
}
|
||||
|
@ -368,7 +368,7 @@ void AISet::Tick(RunListEvent* ev)
|
|||
pActor->nAction = 6;
|
||||
pActor->nFrame = 0;
|
||||
pActor->nRun = 5;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
return;
|
||||
}
|
||||
|
@ -411,7 +411,7 @@ void AISet::Tick(RunListEvent* ev)
|
|||
pActor->nIndex = 1;
|
||||
pActor->nAction = 7;
|
||||
pActor->nFrame = 0;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
return;
|
||||
}
|
||||
|
@ -440,7 +440,7 @@ void AISet::Tick(RunListEvent* ev)
|
|||
pActor->nIndex = 1;
|
||||
pActor->nAction = 7;
|
||||
pActor->nFrame = 0;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
return;
|
||||
}
|
||||
|
@ -551,7 +551,7 @@ void AISet::Tick(RunListEvent* ev)
|
|||
|
||||
if (bVal)
|
||||
{
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
|
||||
PlotCourseToSprite(pActor, pTarget);
|
||||
|
@ -560,7 +560,7 @@ void AISet::Tick(RunListEvent* ev)
|
|||
pActor->nFrame = 0;
|
||||
pActor->nRun = 5;
|
||||
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
}
|
||||
return;
|
||||
|
@ -608,7 +608,7 @@ void AISet::Tick(RunListEvent* ev)
|
|||
pActor->nFrame = 0;
|
||||
pActor->nCount = 100;
|
||||
pActor->pTarget = nullptr;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -215,7 +215,7 @@ void BuildSnake(int nPlayer, int zVal)
|
|||
pActor->spr.xoffset = 0;
|
||||
pActor->spr.yoffset = 0;
|
||||
pActor->spr.angle = pPlayerActor->spr.angle;
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->spr.hitag = 0;
|
||||
|
|
|
@ -54,7 +54,7 @@ DExhumedActor* BuildSpider(DExhumedActor* spp, const DVector3& pos, sectortype*
|
|||
spp->spr.cstat = CSTAT_SPRITE_BLOCK_ALL;
|
||||
spp->spr.shade = -12;
|
||||
spp->spr.clipdist = 15;
|
||||
spp->spr.xvel = 0;
|
||||
spp->clear_xvel();
|
||||
spp->spr.yvel = 0;
|
||||
spp->clear_zvel();
|
||||
spp->spr.xrepeat = 40;
|
||||
|
@ -198,7 +198,7 @@ void AISpider::Tick(RunListEvent* ev)
|
|||
}
|
||||
else
|
||||
{
|
||||
spp->spr.xvel = 0;
|
||||
spp->clear_xvel();
|
||||
spp->spr.yvel = 0;
|
||||
}
|
||||
|
||||
|
@ -256,7 +256,7 @@ void AISpider::Tick(RunListEvent* ev)
|
|||
else
|
||||
{
|
||||
spp->nAction = 0;
|
||||
spp->spr.xvel = 0;
|
||||
spp->clear_xvel();
|
||||
spp->spr.yvel = 0;
|
||||
}
|
||||
|
||||
|
@ -271,7 +271,7 @@ void AISpider::Tick(RunListEvent* ev)
|
|||
spp->nAction = 0;
|
||||
spp->nFrame = 0;
|
||||
|
||||
spp->spr.xvel = 0;
|
||||
spp->clear_xvel();
|
||||
spp->spr.yvel = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ DExhumedActor* BuildWasp(DExhumedActor* pActor, const DVector3& pos, sectortype*
|
|||
pActor->spr.yoffset = 0;
|
||||
pActor->spr.picnum = 1;
|
||||
pActor->set_int_ang(nAngle);
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->spr.hitag = 0;
|
||||
|
@ -287,7 +287,7 @@ void AIWasp::Tick(RunListEvent* ev)
|
|||
{
|
||||
if (nChaseVal.actor() == pTarget)
|
||||
{
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
runlist_DamageEnemy(pTarget, pActor, pActor->nDamage);
|
||||
pActor->nAction = 2;
|
||||
|
@ -320,7 +320,7 @@ void AIWasp::Tick(RunListEvent* ev)
|
|||
|
||||
//if (nMove.type != kHitNone) // The code messed up the return value so this check always was true.
|
||||
{
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->set_int_zvel(1024);
|
||||
pActor->nAction = 5;
|
||||
|
@ -343,7 +343,7 @@ void AIWasp::Tick(RunListEvent* ev)
|
|||
pActor->spr.cstat |= CSTAT_SPRITE_INVISIBLE;
|
||||
}
|
||||
|
||||
pActor->spr.xvel = 0;
|
||||
pActor->clear_xvel();
|
||||
pActor->spr.yvel = 0;
|
||||
pActor->clear_zvel();
|
||||
pActor->nAction = 6;
|
||||
|
|
|
@ -167,7 +167,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath)
|
|||
if (RandomRange(1000) > 500)
|
||||
actor->spr.cstat |= (CSTAT_SPRITE_YFLIP);
|
||||
ChangeState(actor, actor->user.StateEnd);
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
actor->user.jump_speed = 0;
|
||||
DoActorBeginJump(actor);
|
||||
}
|
||||
|
@ -205,7 +205,7 @@ int DoActorDie(DSWActor* actor, DSWActor* weapActor, int meansofdeath)
|
|||
}
|
||||
else
|
||||
{
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
actor->user.jump_speed = -10 - RandomRange(25);
|
||||
DoActorBeginJump(actor);
|
||||
}
|
||||
|
|
|
@ -437,7 +437,7 @@ int DoBloodSpray(DSWActor* actor)
|
|||
return 0;
|
||||
}
|
||||
|
||||
actor->spr.xvel = actor->spr.yvel = 0;
|
||||
actor->clear_xyvel();
|
||||
actor->user.change.X = actor->user.change.Y = 0;
|
||||
actor->spr.xrepeat = actor->spr.yrepeat = 70 - RandomRange(25);
|
||||
actor->spr.pos.XY() = bldActor->spr.pos.XY();
|
||||
|
|
|
@ -131,7 +131,7 @@ int SetupToiletGirl(DSWActor* actor)
|
|||
|
||||
actor->spr.xrepeat = 38;
|
||||
actor->spr.yrepeat = 32;
|
||||
actor->spr.xvel = actor->spr.yvel = 0;
|
||||
actor->clear_xyvel();
|
||||
actor->clear_zvel();
|
||||
actor->spr.lotag = TOILETGIRL_R0;
|
||||
actor->user.FlagOwner = 0;
|
||||
|
@ -190,7 +190,7 @@ int DoToiletGirl(DSWActor* actor)
|
|||
|
||||
// take damage from environment
|
||||
DoActorSectorDamage(actor);
|
||||
actor->spr.xvel = actor->spr.yvel = 0;
|
||||
actor->clear_xyvel();
|
||||
actor->clear_zvel();
|
||||
|
||||
return 0;
|
||||
|
@ -353,7 +353,7 @@ int SetupWashGirl(DSWActor* actor)
|
|||
|
||||
actor->spr.xrepeat = 28;
|
||||
actor->spr.yrepeat = 24;
|
||||
actor->spr.xvel = actor->spr.yvel = 0;
|
||||
actor->clear_xyvel();
|
||||
actor->clear_zvel();
|
||||
actor->spr.lotag = WASHGIRL_R0;
|
||||
actor->user.FlagOwner = 0;
|
||||
|
@ -421,7 +421,7 @@ int DoWashGirl(DSWActor* actor)
|
|||
|
||||
// take damage from environment
|
||||
DoActorSectorDamage(actor);
|
||||
actor->spr.xvel = actor->spr.yvel = 0;
|
||||
actor->clear_xyvel();
|
||||
actor->clear_zvel();
|
||||
|
||||
return 0;
|
||||
|
@ -549,7 +549,7 @@ int SetupTrashCan(DSWActor* actor)
|
|||
|
||||
actor->spr.xrepeat = 46;
|
||||
actor->spr.yrepeat = 42;
|
||||
actor->spr.xvel = actor->spr.yvel = 0;
|
||||
actor->clear_xyvel();
|
||||
actor->clear_zvel();
|
||||
actor->user.ID = TRASHCAN;
|
||||
|
||||
|
@ -570,7 +570,7 @@ int DoTrashCan(DSWActor* actor)
|
|||
KeepActorOnFloor(actor);
|
||||
}
|
||||
|
||||
actor->spr.xvel = actor->spr.yvel = 0;
|
||||
actor->clear_xyvel();
|
||||
actor->clear_zvel();
|
||||
|
||||
return 0;
|
||||
|
@ -642,7 +642,7 @@ int SetupPachinkoLight(DSWActor* actor)
|
|||
actor->user.RotNum = 0;
|
||||
actor->user.ID = PACHINKOLIGHT_R0;
|
||||
|
||||
actor->spr.xvel = actor->spr.yvel = 0;
|
||||
actor->clear_xyvel();
|
||||
actor->clear_zvel();
|
||||
actor->spr.lotag = TAG_PACHINKOLIGHT;
|
||||
actor->spr.shade = -2;
|
||||
|
@ -1149,7 +1149,7 @@ int SetupCarGirl(DSWActor* actor)
|
|||
|
||||
actor->spr.xrepeat = 29;
|
||||
actor->spr.yrepeat = 25;
|
||||
actor->spr.xvel = actor->spr.yvel = 0;
|
||||
actor->clear_xyvel();
|
||||
actor->clear_zvel();
|
||||
actor->spr.lotag = CARGIRL_R0;
|
||||
actor->user.FlagOwner = 0;
|
||||
|
@ -1200,7 +1200,7 @@ int DoCarGirl(DSWActor* actor)
|
|||
|
||||
// take damage from environment
|
||||
DoActorSectorDamage(actor);
|
||||
actor->spr.xvel = actor->spr.yvel = 0;
|
||||
actor->clear_xyvel();
|
||||
actor->clear_zvel();
|
||||
|
||||
return 0;
|
||||
|
@ -1352,7 +1352,7 @@ int SetupMechanicGirl(DSWActor* actor)
|
|||
|
||||
actor->spr.xrepeat = 27;
|
||||
actor->spr.yrepeat = 26;
|
||||
actor->spr.xvel = actor->spr.yvel = 0;
|
||||
actor->clear_xyvel();
|
||||
actor->clear_zvel();
|
||||
actor->spr.lotag = MECHANICGIRL_R0;
|
||||
actor->user.FlagOwner = 0;
|
||||
|
@ -1402,7 +1402,7 @@ int DoMechanicGirl(DSWActor* actor)
|
|||
|
||||
// take damage from environment
|
||||
DoActorSectorDamage(actor);
|
||||
actor->spr.xvel = actor->spr.yvel = 0;
|
||||
actor->clear_xyvel();
|
||||
actor->clear_zvel();
|
||||
|
||||
return 0;
|
||||
|
@ -1554,7 +1554,7 @@ int SetupSailorGirl(DSWActor* actor)
|
|||
|
||||
actor->spr.xrepeat = 28;
|
||||
actor->spr.yrepeat = 26;
|
||||
actor->spr.xvel = actor->spr.yvel = 0;
|
||||
actor->clear_xyvel();
|
||||
actor->clear_zvel();
|
||||
actor->spr.lotag = SAILORGIRL_R0;
|
||||
actor->user.FlagOwner = 0;
|
||||
|
@ -1609,7 +1609,7 @@ int DoSailorGirl(DSWActor* actor)
|
|||
|
||||
// take damage from environment
|
||||
DoActorSectorDamage(actor);
|
||||
actor->spr.xvel = actor->spr.yvel = 0;
|
||||
actor->clear_xyvel();
|
||||
actor->clear_zvel();
|
||||
|
||||
return 0;
|
||||
|
@ -1750,7 +1750,7 @@ int SetupPruneGirl(DSWActor* actor)
|
|||
|
||||
actor->spr.xrepeat = 33;
|
||||
actor->spr.yrepeat = 28;
|
||||
actor->spr.xvel = actor->spr.yvel = 0;
|
||||
actor->clear_xyvel();
|
||||
actor->clear_zvel();
|
||||
actor->spr.lotag = PRUNEGIRL_R0;
|
||||
actor->user.FlagOwner = 0;
|
||||
|
@ -1816,7 +1816,7 @@ int DoPruneGirl(DSWActor* actor)
|
|||
|
||||
// take damage from environment
|
||||
DoActorSectorDamage(actor);
|
||||
actor->spr.xvel = actor->spr.yvel = 0;
|
||||
actor->clear_xyvel();
|
||||
actor->clear_zvel();
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -1974,7 +1974,7 @@ int DoNinjaGrabThroat(DSWActor* actor)
|
|||
|
||||
|
||||
ChangeState(actor, actor->user.StateEnd);
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
PlaySound(DIGI_NINJASCREAM, actor, v3df_follow);
|
||||
}
|
||||
|
||||
|
|
|
@ -440,7 +440,7 @@ int DoSkullWait(DSWActor* actor)
|
|||
// look for closest player every once in a while
|
||||
if (dist < 3500)
|
||||
{
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
actor->user.jump_speed = -600;
|
||||
NewStateGroup(actor, sg_SkullJump);
|
||||
DoBeginJump(actor);
|
||||
|
@ -802,7 +802,7 @@ int DoBettyWait(DSWActor* actor)
|
|||
// look for closest player every once in a while
|
||||
if (dist < 3500)
|
||||
{
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
actor->user.jump_speed = -600;
|
||||
NewStateGroup(actor, sg_BettyJump);
|
||||
DoBeginJump(actor);
|
||||
|
|
|
@ -1827,7 +1827,7 @@ void SpriteSetup(void)
|
|||
{
|
||||
// if moves with SO
|
||||
if (TEST_BOOL1(actor))
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
else
|
||||
actor->spr.xvel = actor->spr.lotag;
|
||||
|
||||
|
@ -1841,7 +1841,7 @@ void SpriteSetup(void)
|
|||
{
|
||||
// if moves with SO
|
||||
if (TEST_BOOL1(actor))
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
else
|
||||
actor->spr.xvel = actor->spr.lotag;
|
||||
StartInterpolation(actor->sector(), Interp_Sect_CeilingPanX);
|
||||
|
@ -1867,7 +1867,7 @@ void SpriteSetup(void)
|
|||
actor->tempwall = hit.hitWall;
|
||||
// if moves with SO
|
||||
if (TEST_BOOL1(actor))
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
else
|
||||
actor->spr.xvel = actor->spr.lotag;
|
||||
actor->set_int_ang(SP_TAG6(actor));
|
||||
|
@ -4987,7 +4987,7 @@ int DoGet(DSWActor* actor)
|
|||
{
|
||||
if (!DoItemFly(actor))
|
||||
{
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
change_actor_stat(actor, STAT_ITEM);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17798,7 +17798,7 @@ int DoItemFly(DSWActor* actor)
|
|||
{
|
||||
actor->spr.pos.Z = actor->user.loz;
|
||||
actor->user.Counter = 0;
|
||||
actor->spr.xvel = 0;
|
||||
actor->clear_xvel();
|
||||
actor->user.change.Zero();
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue