- use clear_zvel

This commit is contained in:
Christoph Oelckers 2022-09-01 00:50:13 +02:00
parent 05f488ce3c
commit 999cd16b24
32 changed files with 126 additions and 113 deletions

View file

@ -784,7 +784,7 @@ void movecrane(DDukeActor *actor, int crane)
Owner->opos = actor->spr.pos;
actor->set_int_zvel(0);
actor->clear_zvel();
}
else if (actor->IsActiveCrane())
{
@ -4857,7 +4857,7 @@ void makeitfall(DDukeActor* actor)
if (actor->spr.pos.Z >= actor->floorz - FOURSLEIGHT_F)
{
actor->spr.pos.Z = actor->floorz - FOURSLEIGHT_F;
actor->set_int_zvel(0);
actor->clear_zvel();
}
}
@ -5114,7 +5114,7 @@ void fall_common(DDukeActor *actor, int playernum, int JIBS6, int DRONE, int BLO
actor->attackertype = SHOTSPARK1;
actor->hitextra = 1;
actor->set_int_zvel(0);
actor->clear_zvel();
}
else if (actor->int_zvel() > 2048 && actor->sector()->lotag != 1)
{
@ -5129,7 +5129,7 @@ void fall_common(DDukeActor *actor, int playernum, int JIBS6, int DRONE, int BLO
}
if (actor->sector()->lotag == 1)
actor->add_int_z(gs.actorinfo[actor->spr.picnum].falladjustz);
else actor->set_int_zvel(0);
else actor->clear_zvel();
}
}
}

View file

@ -1605,7 +1605,7 @@ static void weaponcommon_d(DDukeActor* proj)
return;
}
proj->spr.xvel = 0;
proj->set_int_zvel(0);
proj->clear_zvel();
}
bool fireball = (isWorldTour() && proj->spr.picnum == FIREBALL && (!proj->GetOwner() || proj->GetOwner()->spr.picnum != FIREBALL));
@ -2349,7 +2349,7 @@ static void greenslime(DDukeActor *actor)
if (actor->temp_data[0] == 2)
{
actor->set_int_zvel(0);
actor->clear_zvel();
actor->spr.cstat &= ~CSTAT_SPRITE_YFLIP;
if ((sectp->ceilingstat & CSTAT_SECTOR_SKY) || (actor->ceilingz + 24) < actor->spr.pos.Z)
@ -2388,7 +2388,7 @@ static void greenslime(DDukeActor *actor)
if (rnd(4) && (sectp->ceilingstat & CSTAT_SECTOR_SKY) == 0 &&
fabs(actor->floorz - actor->ceilingz) < 192)
{
actor->set_int_zvel(0);
actor->clear_zvel();
actor->temp_data[0]++;
}
@ -2502,7 +2502,7 @@ static void flamethrowerflame(DDukeActor *actor)
if (coll.type != 0) {
actor->spr.xvel = actor->spr.yvel = 0;
actor->set_int_zvel(0);
actor->clear_zvel();
if (coll.type == kHitSprite)
{
fi.checkhitsprite(coll.actor(), actor);
@ -2592,7 +2592,7 @@ static void heavyhbomb(DDukeActor *actor)
if (actor->spr.pos.Z < actor->ceilingz) // && sectp->lotag != 2 )
{
actor->spr.pos.Z = actor->ceilingz + 3;
actor->set_int_zvel(0);
actor->clear_zvel();
}
}
@ -3580,13 +3580,13 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
if (actor->spr.pos.Z > f - 8)
{
actor->spr.pos.Z = f - 8;
actor->set_int_zvel(0);
actor->clear_zvel();
}
if (actor->spr.pos.Z < c + 80)
{
actor->spr.pos.Z = c + 80;
actor->set_int_zvel(0);
actor->clear_zvel();
}
}
else
@ -3605,7 +3605,7 @@ void move_d(DDukeActor *actor, int playernum, int xvel)
if (actor->spr.pos.Z < c + 50)
{
actor->spr.pos.Z = c + 50;
actor->set_int_zvel(0);
actor->clear_zvel();
}
}
}

View file

@ -2370,7 +2370,7 @@ static void heavyhbomb(DDukeActor *actor)
if (actor->spr.picnum != CHEERBOMB && actor->spr.pos.Z < actor->ceilingz + 16 && sectp->lotag != 2)
{
actor->spr.pos.Z = actor->ceilingz + 16;
actor->set_int_zvel(0);
actor->clear_zvel();
}
Collision coll;
@ -3654,7 +3654,7 @@ void move_r(DDukeActor *actor, int pnum, int xvel)
if (actor->spr.pos.Z < c + 50)
{
actor->spr.pos.Z = c + 50;
actor->set_int_zvel(0);
actor->clear_zvel();
}
}
}

View file

@ -1065,7 +1065,7 @@ void shoot_d(DDukeActor* actor, int atwith)
k->spr.pos = spos;
k->spr.angle = sang;
k->spr.xvel = 500;
k->set_int_zvel(0);
k->clear_zvel();
}
return;
}

View file

@ -900,7 +900,7 @@ DDukeActor* spawninit_d(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
}
if (act->spr.picnum == ROTATEGUN)
act->set_int_zvel(0);
act->clear_zvel();
break;

View file

@ -1160,7 +1160,7 @@ DDukeActor* spawninit_r(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>*
}
else
{
act->set_int_zvel(0);
act->clear_zvel();
}
ssp(act, CLIPMASK0);
act->spr.cstat = randomXFlip();

View file

@ -88,7 +88,7 @@ DExhumedActor* BuildAnim(DExhumedActor* pActor, int val, int val2, const DVector
pActor->spr.yoffset = 0;
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->backuppos();
// CHECKME - where is hitag set otherwise?

View file

@ -70,7 +70,7 @@ void BuildAnubis(DExhumedActor* ap, const DVector3& pos, sectortype* pSector, in
ap->spr.yrepeat = 40;
ap->spr.xvel = 0;
ap->spr.yvel = 0;
ap->set_int_zvel(0);
ap->clear_zvel();
ap->spr.hitag = 0;
ap->spr.lotag = runlist_HeadRun() + 1;
ap->spr.extra = -1;
@ -415,7 +415,7 @@ void AIAnubis::Damage(RunListEvent* ev)
// he ded.
ap->spr.xvel = 0;
ap->spr.yvel = 0;
ap->set_int_zvel(0);
ap->clear_zvel();
ap->spr.pos.Z = ap->sector()->floorz;
ap->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;

View file

@ -620,7 +620,7 @@ DExhumedActor* BuildBullet(DExhumedActor* pActor, int nType, int nZOffset, int n
pBulletActor->set_int_ang(nAngle);
pBulletActor->spr.xvel = 0;
pBulletActor->spr.yvel = 0;
pBulletActor->set_int_zvel(0);
pBulletActor->clear_zvel();
pBulletActor->spr.lotag = runlist_HeadRun() + 1;
pBulletActor->spr.extra = -1;
pBulletActor->spr.hitag = 0;

View file

@ -106,7 +106,7 @@ void AIFishLimb::Tick(RunListEvent* ev)
if ((pActor->spr.pos.Z - FloorZ) > 100)
{
pActor->set_int_zvel(0);
pActor->clear_zvel();
runlist_DoSubRunRec(pActor->spr.intowner);
runlist_FreeRun(pActor->spr.lotag - 1);
runlist_SubRunRec(pActor->spr.hitag);
@ -162,7 +162,7 @@ void BuildFish(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector,
pActor->spr.picnum = seq_GetSeqPicnum(kSeqFish, FishSeq[0].a, 0);
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->set_int_ang(nAngle);
pActor->spr.lotag = runlist_HeadRun() + 1;
pActor->spr.hitag = 0;

View file

@ -116,7 +116,7 @@ void BuildGrenade(int nPlayer)
pActor->spr.intowner = nPlayer;
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->spr.hitag = 0;
pActor->spr.lotag = runlist_HeadRun() + 1;
pActor->spr.extra = -1;
@ -306,7 +306,7 @@ void AIGrenade::Tick(RunListEvent* ev)
D3PlayFX(StaticSound[kSound5], pActor);
pActor->nCount = 0;
pActor->nHealth = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->nIndex = 1;
}
}

View file

@ -416,7 +416,7 @@ void DoRegenerates()
}
}
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->spr.yrepeat = (uint8_t)pActor->spr.xvel;
pActor->spr.xrepeat = (uint8_t)pActor->spr.xvel;
pActor->spr.pal = (uint8_t)pActor->spr.yvel;

View file

@ -79,7 +79,7 @@ void AILavaDudeLimb::Tick(RunListEvent* ev)
{
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
runlist_DoSubRunRec(pActor->spr.intowner);
runlist_FreeRun(pActor->spr.lotag - 1);
@ -124,7 +124,7 @@ void BuildLava(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector,
pActor->spr.picnum = seq_GetSeqPicnum(kSeqLavag, LavadudeSeq[3].a, 0);
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->set_int_ang(nAngle);
pActor->spr.hitag = 0;
pActor->spr.lotag = runlist_HeadRun() + 1;

View file

@ -67,7 +67,7 @@ void BuildLion(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector,
pActor->set_int_ang(nAngle);
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->spr.lotag = runlist_HeadRun() + 1;
pActor->spr.hitag = 0;
pActor->spr.extra = -1;
@ -121,7 +121,7 @@ void AILion::Damage(RunListEvent* ev)
// R.I.P.
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
pActor->nHealth = 0;

View file

@ -295,7 +295,7 @@ int BelowNear(DExhumedActor* pActor, double walldist)
{
pActor->set_int_z(z2);
overridesect = pSector;
pActor->set_int_zvel(0);
pActor->clear_zvel();
bTouchFloor = true;
@ -412,7 +412,7 @@ Collision movespritez(DExhumedActor* pActor, int z, int height, int, int clipdis
nRet = loHit;
}
pActor->set_int_zvel(0);
pActor->clear_zvel();
}
}
else
@ -438,7 +438,7 @@ Collision movespritez(DExhumedActor* pActor, int z, int height, int, int clipdis
}
}
pActor->set_int_zvel(0);
pActor->clear_zvel();
}
}
}
@ -589,14 +589,14 @@ void Gravity(DExhumedActor* pActor)
{
pActor->add_int_zvel(- 64);
if (pActor->int_zvel() < 0) {
pActor->set_int_zvel(0);
pActor->clear_zvel();
}
}
else if (pActor->int_zvel() < 0)
{
pActor->add_int_zvel( 64);
if (pActor->int_zvel() > 0) {
pActor->set_int_zvel(0);
pActor->clear_zvel();
}
}
}
@ -1111,7 +1111,7 @@ Collision AngleChase(DExhumedActor* pActor, DExhumedActor* pActor2, int ebx, int
if (pActor2 == nullptr)
{
pActor->set_int_zvel(0);
pActor->clear_zvel();
nAngle = pActor->int_ang();
}
else
@ -1361,7 +1361,7 @@ void AICreatureChunk::Tick(RunListEvent* ev)
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->spr.pos.Z = pSector->floorz;
}
else

View file

@ -55,7 +55,7 @@ void BuildMummy(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector,
pActor->spr.clipdist = 32;
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->spr.xrepeat = 42;
pActor->spr.yrepeat = 42;
pActor->spr.pal = pActor->sector()->ceilingpal;
@ -442,7 +442,7 @@ void AIMummy::Damage(RunListEvent* ev)
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->spr.pos.Z = pActor->sector()->floorz;
}
else

View file

@ -1204,7 +1204,7 @@ int BuildTrap(DExhumedActor* pActor, int edx, int ebx, int ecx)
pActor->spr.cstat = CSTAT_SPRITE_INVISIBLE;
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->spr.extra = -1;
pActor->spr.lotag = runlist_HeadRun() + 1;
@ -1448,7 +1448,7 @@ void AISpark::Tick(RunListEvent* ev)
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
if (pActor->spr.picnum > kTile3000) {
nSmokeSparks--;
@ -1585,7 +1585,7 @@ DExhumedActor* BuildEnergyBlock(sectortype* pSector)
pActor->spr.cstat = CSTAT_SPRITE_INVISIBLE;
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->spr.extra = -1;
pActor->spr.lotag = runlist_HeadRun() + 1;
pActor->spr.hitag = 0;
@ -1786,7 +1786,7 @@ DExhumedActor* BuildObject(DExhumedActor* pActor, int nOjectType, int nHitag)
pActor->spr.cstat = (pActor->spr.cstat | CSTAT_SPRITE_BLOCK_ALL) & ~(CSTAT_SPRITE_TRANSLUCENT | CSTAT_SPRITE_INVISIBLE);
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->spr.extra = -1;
pActor->spr.lotag = runlist_HeadRun() + 1;
pActor->spr.hitag = 0;
@ -2033,7 +2033,7 @@ void AIObject::RadialDamage(RunListEvent* ev)
{
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
}
else if (pActor->spr.statnum != kStatAnubisDrum)
{

View file

@ -302,7 +302,7 @@ void RestartPlayer(int nPlayer)
int nHeight = GetActorHeight(pActor);
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
nStandHeight = nHeight;
@ -925,7 +925,7 @@ void AIPlayer::Tick(RunListEvent* ev)
pPlayerActor->spr.xvel = 0;
pPlayerActor->spr.yvel = 0;
pPlayerActor->set_int_zvel(0);
pPlayerActor->clear_zvel();
if (nFreeze < 1)
{

View file

@ -290,7 +290,7 @@ Collision QueenAngleChase(DExhumedActor* pActor, DExhumedActor* pActor2, int val
if (pActor2 == nullptr)
{
pActor->set_int_zvel(0);
pActor->clear_zvel();
nAngle = pActor->int_ang();
}
else
@ -622,7 +622,7 @@ void AIQueenEgg::Tick(RunListEvent* ev)
pActor->set_int_zvel(-(pActor->int_zvel() - 256));
if (pActor->int_zvel() < -512)
{
pActor->set_int_zvel(0);
pActor->clear_zvel();
}
}
@ -802,7 +802,7 @@ void AIQueenHead::Tick(RunListEvent* ev)
if (pActor->int_zvel() > -256)
{
nVelShift = 100;
pActor->set_int_zvel(0);
pActor->clear_zvel();
}
}
@ -1100,7 +1100,7 @@ void BuildQueen(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector,
pActor->set_int_ang(nAngle);
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->spr.lotag = runlist_HeadRun() + 1;
pActor->spr.extra = -1;
pActor->spr.hitag = 0;
@ -1421,7 +1421,7 @@ void AIQueen::Damage(RunListEvent* ev)
{
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
QueenList[nQueen].nAction2++;

View file

@ -92,7 +92,7 @@ void BuildRa(int nPlayer)
pActor->spr.cstat = CSTAT_SPRITE_INVISIBLE;
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->spr.extra = -1;
pActor->spr.lotag = runlist_HeadRun() + 1;
pActor->spr.hitag = 0;

View file

@ -99,7 +99,7 @@ void BuildRat(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, i
pActor->spr.yrepeat = 50;
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->spr.lotag = runlist_HeadRun() + 1;
pActor->spr.hitag = 0;
pActor->spr.extra = -1;

View file

@ -63,7 +63,7 @@ void BuildRex(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, i
pActor->set_int_ang(nAngle);
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->spr.lotag = runlist_HeadRun() + 1;
pActor->spr.extra = -1;
pActor->spr.hitag = 0;
@ -124,7 +124,7 @@ void AIRex::Damage(RunListEvent* ev)
{
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
pActor->nHealth = 0;

View file

@ -61,7 +61,7 @@ void BuildRoach(int nType, DExhumedActor* pActor, const DVector3& pos, sectortyp
pActor->spr.yrepeat = 40;
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->spr.hitag = 0;
pActor->spr.lotag = runlist_HeadRun() + 1;
pActor->spr.extra = -1;
@ -132,7 +132,7 @@ void AIRoach::Damage(RunListEvent* ev)
{
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
pActor->nHealth = 0;

View file

@ -64,7 +64,7 @@ void BuildScorp(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector,
pActor->set_int_ang(nAngle);
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->spr.lotag = runlist_HeadRun() + 1;
pActor->spr.extra = -1;
pActor->spr.hitag = 0;
@ -129,7 +129,7 @@ void AIScorp::Damage(RunListEvent* ev)
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
nCreaturesKilled++;

View file

@ -58,7 +58,7 @@ void BuildSet(DExhumedActor* pActor, const DVector3& pos, sectortype* pSector, i
pActor->spr.clipdist = 110;
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->spr.xrepeat = 87;
pActor->spr.yrepeat = 96;
pActor->spr.pal = pActor->sector()->ceilingpal;
@ -187,7 +187,7 @@ void AISet::Damage(RunListEvent* ev)
{
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->spr.cstat &= ~CSTAT_SPRITE_BLOCK_ALL;
pActor->nHealth = 0;

View file

@ -217,7 +217,7 @@ void BuildSnake(int nPlayer, int zVal)
pActor->spr.angle = pPlayerActor->spr.angle;
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->spr.hitag = 0;
pActor->spr.extra = -1;
pActor->spr.lotag = runlist_HeadRun() + 1;

View file

@ -56,7 +56,7 @@ DExhumedActor* BuildSpider(DExhumedActor* spp, const DVector3& pos, sectortype*
spp->spr.clipdist = 15;
spp->spr.xvel = 0;
spp->spr.yvel = 0;
spp->set_int_zvel(0);
spp->clear_zvel();
spp->spr.xrepeat = 40;
spp->spr.yrepeat = 40;
spp->spr.pal = spp->sector()->ceilingpal;
@ -174,7 +174,7 @@ void AISpider::Tick(RunListEvent* ev)
if (spp->spr.cstat & CSTAT_SPRITE_YFLIP)
{
spp->set_int_zvel(0);
spp->clear_zvel();
spp->spr.pos.Z = pSector->ceilingz + (tileHeight(spp->spr.picnum) / 8.); // was << 5 in Build coordinates
if (pSector->ceilingstat & CSTAT_SECTOR_SKY)
@ -287,7 +287,7 @@ void AISpider::Tick(RunListEvent* ev)
{
spp->spr.cstat |= CSTAT_SPRITE_YFLIP;
spp->spr.pos.Z = spp->sector()->ceilingz + GetActorHeightF(spp);
spp->set_int_zvel(0);
spp->clear_zvel();
spp->nAction = 1;
spp->nFrame = 0;

View file

@ -76,7 +76,7 @@ DExhumedActor* BuildWasp(DExhumedActor* pActor, const DVector3& pos, sectortype*
pActor->set_int_ang(nAngle);
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->spr.hitag = 0;
pActor->spr.lotag = runlist_HeadRun() + 1;
pActor->spr.extra = -1;
@ -242,7 +242,7 @@ void AIWasp::Tick(RunListEvent* ev)
}
else
{
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->nAction = 1;
pActor->nFrame = 0;
pActor->nVel = 1500;
@ -344,7 +344,7 @@ void AIWasp::Tick(RunListEvent* ev)
pActor->spr.xvel = 0;
pActor->spr.yvel = 0;
pActor->set_int_zvel(0);
pActor->clear_zvel();
pActor->nAction = 6;
pActor->nFrame = 0;
runlist_SubRunRec(pActor->nRun);

View file

@ -1337,7 +1337,7 @@ int InitChemBomb(DSWActor* actor)
{
actor->user.change.Zero();
actorNew->spr.xvel = actorNew->spr.yvel = 0;
actorNew->set_int_zvel(0);
actorNew->clear_zvel();
// Smoke will come out for this many seconds
actorNew->user.WaitTics = 40*120;
}

View file

@ -132,7 +132,7 @@ int SetupToiletGirl(DSWActor* actor)
actor->spr.xrepeat = 38;
actor->spr.yrepeat = 32;
actor->spr.xvel = actor->spr.yvel = 0;
actor->set_int_zvel(0);
actor->clear_zvel();
actor->spr.lotag = TOILETGIRL_R0;
actor->user.FlagOwner = 0;
actor->user.ID = TOILETGIRL_R0;
@ -191,7 +191,7 @@ int DoToiletGirl(DSWActor* actor)
// take damage from environment
DoActorSectorDamage(actor);
actor->spr.xvel = actor->spr.yvel = 0;
actor->set_int_zvel(0);
actor->clear_zvel();
return 0;
}
@ -353,7 +353,8 @@ int SetupWashGirl(DSWActor* actor)
actor->spr.xrepeat = 28;
actor->spr.yrepeat = 24;
actor->spr.xvel = actor->spr.yvel = 0; actor->set_int_zvel(0);
actor->spr.xvel = actor->spr.yvel = 0;
actor->clear_zvel();
actor->spr.lotag = WASHGIRL_R0;
actor->user.FlagOwner = 0;
actor->user.ID = WASHGIRL_R0;
@ -420,7 +421,8 @@ int DoWashGirl(DSWActor* actor)
// take damage from environment
DoActorSectorDamage(actor);
actor->spr.xvel = actor->spr.yvel = 0; actor->set_int_zvel(0);
actor->spr.xvel = actor->spr.yvel = 0;
actor->clear_zvel();
return 0;
}
@ -547,7 +549,8 @@ int SetupTrashCan(DSWActor* actor)
actor->spr.xrepeat = 46;
actor->spr.yrepeat = 42;
actor->spr.xvel = actor->spr.yvel = 0; actor->set_int_zvel(0);
actor->spr.xvel = actor->spr.yvel = 0;
actor->clear_zvel();
actor->user.ID = TRASHCAN;
actor->user.Flags &= ~(SPR_XFLIP_TOGGLE);
@ -567,7 +570,8 @@ int DoTrashCan(DSWActor* actor)
KeepActorOnFloor(actor);
}
actor->spr.xvel = actor->spr.yvel = 0; actor->set_int_zvel(0);
actor->spr.xvel = actor->spr.yvel = 0;
actor->clear_zvel();
return 0;
}
@ -638,7 +642,8 @@ int SetupPachinkoLight(DSWActor* actor)
actor->user.RotNum = 0;
actor->user.ID = PACHINKOLIGHT_R0;
actor->spr.xvel = actor->spr.yvel = 0; actor->set_int_zvel(0);
actor->spr.xvel = actor->spr.yvel = 0;
actor->clear_zvel();
actor->spr.lotag = TAG_PACHINKOLIGHT;
actor->spr.shade = -2;
actor->user.spal = actor->spr.pal;
@ -729,7 +734,7 @@ int SetupPachinko1(DSWActor* actor)
actor->user.ID = PACHINKO1;
actor->spr.yvel = 0;
actor->set_int_zvel(0);
actor->clear_zvel();
actor->spr.lotag = PACHINKO1;
actor->user.Flags &= ~(SPR_XFLIP_TOGGLE);
@ -882,7 +887,7 @@ int SetupPachinko2(DSWActor* actor)
actor->user.ID = PACHINKO2;
actor->spr.yvel = 0;
actor->set_int_zvel(0);
actor->clear_zvel();
actor->spr.lotag = PACHINKO2;
actor->user.Flags &= ~(SPR_XFLIP_TOGGLE);
@ -959,7 +964,7 @@ int SetupPachinko3(DSWActor* actor)
actor->user.ID = PACHINKO3;
actor->spr.yvel = 0;
actor->set_int_zvel(0);
actor->clear_zvel();
actor->spr.lotag = PACHINKO3;
actor->user.Flags &= ~(SPR_XFLIP_TOGGLE);
@ -1037,7 +1042,7 @@ int SetupPachinko4(DSWActor* actor)
actor->user.ID = PACHINKO4;
actor->spr.yvel = 0;
actor->set_int_zvel(0);
actor->clear_zvel();
actor->spr.lotag = PACHINKO4;
actor->user.Flags &= ~(SPR_XFLIP_TOGGLE);
@ -1144,7 +1149,8 @@ int SetupCarGirl(DSWActor* actor)
actor->spr.xrepeat = 29;
actor->spr.yrepeat = 25;
actor->spr.xvel = actor->spr.yvel = 0; actor->set_int_zvel(0);
actor->spr.xvel = actor->spr.yvel = 0;
actor->clear_zvel();
actor->spr.lotag = CARGIRL_R0;
actor->user.FlagOwner = 0;
actor->user.ID = CARGIRL_R0;
@ -1194,7 +1200,8 @@ int DoCarGirl(DSWActor* actor)
// take damage from environment
DoActorSectorDamage(actor);
actor->spr.xvel = actor->spr.yvel = 0; actor->set_int_zvel(0);
actor->spr.xvel = actor->spr.yvel = 0;
actor->clear_zvel();
return 0;
}
@ -1345,7 +1352,8 @@ int SetupMechanicGirl(DSWActor* actor)
actor->spr.xrepeat = 27;
actor->spr.yrepeat = 26;
actor->spr.xvel = actor->spr.yvel = 0; actor->set_int_zvel(0);
actor->spr.xvel = actor->spr.yvel = 0;
actor->clear_zvel();
actor->spr.lotag = MECHANICGIRL_R0;
actor->user.FlagOwner = 0;
actor->user.ID = MECHANICGIRL_R0;
@ -1394,7 +1402,8 @@ int DoMechanicGirl(DSWActor* actor)
// take damage from environment
DoActorSectorDamage(actor);
actor->spr.xvel = actor->spr.yvel = 0; actor->set_int_zvel(0);
actor->spr.xvel = actor->spr.yvel = 0;
actor->clear_zvel();
return 0;
}
@ -1545,7 +1554,8 @@ int SetupSailorGirl(DSWActor* actor)
actor->spr.xrepeat = 28;
actor->spr.yrepeat = 26;
actor->spr.xvel = actor->spr.yvel = 0; actor->set_int_zvel(0);
actor->spr.xvel = actor->spr.yvel = 0;
actor->clear_zvel();
actor->spr.lotag = SAILORGIRL_R0;
actor->user.FlagOwner = 0;
actor->user.ID = SAILORGIRL_R0;
@ -1599,7 +1609,8 @@ int DoSailorGirl(DSWActor* actor)
// take damage from environment
DoActorSectorDamage(actor);
actor->spr.xvel = actor->spr.yvel = 0; actor->set_int_zvel(0);
actor->spr.xvel = actor->spr.yvel = 0;
actor->clear_zvel();
return 0;
}
@ -1739,7 +1750,8 @@ int SetupPruneGirl(DSWActor* actor)
actor->spr.xrepeat = 33;
actor->spr.yrepeat = 28;
actor->spr.xvel = actor->spr.yvel = 0; actor->set_int_zvel(0);
actor->spr.xvel = actor->spr.yvel = 0;
actor->clear_zvel();
actor->spr.lotag = PRUNEGIRL_R0;
actor->user.FlagOwner = 0;
actor->user.ID = PRUNEGIRL_R0;
@ -1804,7 +1816,8 @@ int DoPruneGirl(DSWActor* actor)
// take damage from environment
DoActorSectorDamage(actor);
actor->spr.xvel = actor->spr.yvel = 0; actor->set_int_zvel(0);
actor->spr.xvel = actor->spr.yvel = 0;
actor->clear_zvel();
return 0;
}

View file

@ -3250,7 +3250,7 @@ bool ActorTrackDecide(TRACK_POINT* tpoint, DSWActor* actor)
{
actor->user.Flags &= ~(SPR_ZDIFF_MODE);
actor->spr.pos.Z = actor->sector()->floorz;
actor->set_int_zvel(0);
actor->clear_zvel();
}
else
{
@ -3468,7 +3468,7 @@ int ActorFollowTrack(DSWActor* actor, short locktics)
{
actor->user.Flags &= ~(SPR_CLIMBING);
actor->set_int_zvel(0);
actor->clear_zvel();
actor->spr.angle = VecToAngle(tpoint->pos - actor->spr.pos);

View file

@ -10849,7 +10849,7 @@ int DoMirv(DSWActor* actor)
actorNew->spr.xrepeat = 40;
actorNew->spr.yrepeat = 40;
actorNew->spr.clipdist = 32L >> 2;
actorNew->set_int_zvel(0);
actorNew->clear_zvel();
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->user.ceiling_dist = (16);
@ -11064,7 +11064,7 @@ void InitSpellRing(PLAYER* pp)
actorNew->spr.shade = -40;
actorNew->spr.xrepeat = 32;
actorNew->spr.yrepeat = 32;
actorNew->set_int_zvel(0);
actorNew->clear_zvel();
actorNew->user.pos.Z = 20;
actorNew->user.Dist = RING_INNER_DIST;
@ -11224,7 +11224,7 @@ int InitLavaThrow(DSWActor* actor)
actorNew->spr.yrepeat = 72;
actorNew->spr.xrepeat = 72;
actorNew->spr.shade = -15;
actorNew->set_int_zvel(0);
actorNew->clear_zvel();
actorNew->spr.angle = actor->spr.angle;
if (RANDOM_P2(1024) > 512)
@ -13797,7 +13797,7 @@ int InitSerpSpell(DSWActor* actor)
actorNew->spr.xrepeat = 64;
actorNew->spr.yrepeat = 64;
actorNew->spr.clipdist = 32L >> 2;
actorNew->set_int_zvel(0);
actorNew->clear_zvel();
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->user.ceiling_dist = (16);
@ -13888,7 +13888,7 @@ int InitSerpMonstSpell(DSWActor* actor)
actorNew->spr.xrepeat = 122;
actorNew->spr.yrepeat = 116;
actorNew->spr.clipdist = 32L >> 2;
actorNew->set_int_zvel(0);
actorNew->clear_zvel();
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->user.ceiling_dist = (16);
@ -13954,7 +13954,7 @@ int InitEnemyRocket(DSWActor* actor)
actorNew->spr.yrepeat = 28;
actorNew->spr.xrepeat = 28;
actorNew->spr.shade = -15;
actorNew->set_int_zvel(0);
actorNew->clear_zvel();
actorNew->spr.angle = actor->spr.angle;
actorNew->spr.clipdist = 64L>>2;
@ -14023,7 +14023,7 @@ int InitEnemyRail(DSWActor* actor)
actorNew->spr.yrepeat = 52;
actorNew->spr.xrepeat = 52;
actorNew->spr.shade = -15;
actorNew->set_int_zvel(0);
actorNew->clear_zvel();
actorNew->user.RotNum = 5;
NewStateGroup(actorNew, &sg_Rail[0]);
@ -14082,7 +14082,7 @@ int InitZillaRocket(DSWActor* actor)
actorNew->spr.yrepeat = 28;
actorNew->spr.xrepeat = 28;
actorNew->spr.shade = -15;
actorNew->set_int_zvel(0);
actorNew->clear_zvel();
actorNew->spr.angle = actor->spr.angle;
actorNew->spr.clipdist = 64 >>2;
@ -14133,7 +14133,7 @@ int InitEnemyStar(DSWActor* actor)
actorNew->spr.yrepeat = 16;
actorNew->spr.xrepeat = 16;
actorNew->spr.shade = -25;
actorNew->set_int_zvel(0);
actorNew->clear_zvel();
actorNew->spr.angle = actor->spr.angle;
actorNew->spr.clipdist = 64L>>2;
@ -14163,7 +14163,7 @@ int InitEnemyCrossbow(DSWActor* actor)
actorNew->spr.xrepeat = 16;
actorNew->spr.yrepeat = 26;
actorNew->spr.shade = -25;
actorNew->set_int_zvel(0);
actorNew->clear_zvel();
actorNew->spr.angle = actor->spr.angle;
actorNew->spr.clipdist = 64>>2;
@ -14200,7 +14200,7 @@ int InitSkelSpell(DSWActor* actor)
actorNew->spr.xrepeat -= 20;
actorNew->spr.yrepeat -= 20;
actorNew->spr.shade = -40;
actorNew->set_int_zvel(0);
actorNew->clear_zvel();
actorNew->spr.angle = actor->spr.angle;
actorNew->spr.clipdist = 64L>>2;
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
@ -14235,7 +14235,7 @@ int InitCoolgFire(DSWActor* actor)
actorNew->spr.yrepeat = 18;
actorNew->spr.xrepeat = 18;
actorNew->spr.shade = -40;
actorNew->set_int_zvel(0);
actorNew->clear_zvel();
actorNew->spr.angle = actor->spr.angle;
actorNew->spr.clipdist = 32>>2;
actorNew->user.ceiling_dist = (4);
@ -14283,7 +14283,7 @@ int InitCoolgDrip(DSWActor* actor)
SetOwner(actor, actorNew);
actorNew->spr.yrepeat = actorNew->spr.xrepeat = 20;
actorNew->spr.shade = -5;
actorNew->set_int_zvel(0);
actorNew->clear_zvel();
actorNew->spr.clipdist = 16L>>2;
actorNew->user.ceiling_dist = (4);
actorNew->user.floor_dist = (4);
@ -14316,7 +14316,7 @@ int GenerateDrips(DSWActor* actor)
SetOwner(actor, actorNew);
actorNew->spr.yrepeat = actorNew->spr.xrepeat = 20;
actorNew->spr.shade = -10;
actorNew->set_int_zvel(0);
actorNew->clear_zvel();
actorNew->spr.clipdist = 16L>>2;
actorNew->user.ceiling_dist = (4);
actorNew->user.floor_dist = (4);
@ -14378,7 +14378,7 @@ void InitFireballTrap(DSWActor* actor)
actorNew->spr.yrepeat -= 20;
actorNew->spr.shade = -40;
actorNew->spr.clipdist = 32>>2;
actorNew->set_int_zvel(0);
actorNew->clear_zvel();
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->user.WeaponNum = WPN_HOTHEAD;
@ -14398,7 +14398,7 @@ void InitBoltTrap(DSWActor* actor)
actorNew->spr.yrepeat = 32;
actorNew->spr.xrepeat = 32;
actorNew->spr.shade = -15;
actorNew->set_int_zvel(0);
actorNew->clear_zvel();
actorNew->spr.cstat |= (CSTAT_SPRITE_YCENTER);
actorNew->user.RotNum = 5;
@ -14466,7 +14466,7 @@ int InitTracerUzi(PLAYER* pp)
actorNew->spr.yrepeat = 10;
actorNew->spr.xrepeat = 10;
actorNew->spr.shade = -40;
actorNew->set_int_zvel(0);
actorNew->clear_zvel();
actorNew->spr.clipdist = 32 >> 2;
actorNew->user.WeaponNum = actor->user.WeaponNum;
@ -14525,7 +14525,7 @@ int InitTracerTurret(DSWActor* actor, DSWActor* Operator, fixed_t q16horiz)
actorNew->spr.yrepeat = 10;
actorNew->spr.xrepeat = 10;
actorNew->spr.shade = -40;
actorNew->set_int_zvel(0);
actorNew->clear_zvel();
actorNew->spr.clipdist = 8 >> 2;
actorNew->user.WeaponNum = actor->user.WeaponNum;
@ -14561,7 +14561,7 @@ int InitTracerAutoTurret(DSWActor* actor, int xchange, int ychange, int zchange)
actorNew->spr.yrepeat = 10;
actorNew->spr.xrepeat = 10;
actorNew->spr.shade = -40;
actorNew->set_int_zvel(0);
actorNew->clear_zvel();
actorNew->spr.clipdist = 8 >> 2;
actorNew->user.WeaponNum = actor->user.WeaponNum;
@ -14909,7 +14909,7 @@ int InitTankShell(DSWActor* actor, PLAYER* pp)
actorNew->spr.yrepeat = 8;
actorNew->spr.xrepeat = 8;
actorNew->spr.shade = -40;
actorNew->set_int_zvel(0);
actorNew->clear_zvel();
actorNew->spr.clipdist = 32 >> 2;
actorNew->user.WeaponNum = actor->user.WeaponNum;
@ -15042,7 +15042,7 @@ int InitTurretRocket(DSWActor* actor, PLAYER* pp)
actorNew->spr.yrepeat = 40;
actorNew->spr.xrepeat = 40;
actorNew->spr.shade = -40;
actorNew->set_int_zvel(0);
actorNew->clear_zvel();
actorNew->spr.clipdist = 32 >> 2;
actorNew->user.WeaponNum = actor->user.WeaponNum;
@ -15076,7 +15076,7 @@ int InitTurretFireball(DSWActor* actor, PLAYER* pp)
actorNew->spr.yrepeat = 40;
actorNew->spr.xrepeat = 40;
actorNew->spr.shade = -40;
actorNew->set_int_zvel(0);
actorNew->clear_zvel();
actorNew->spr.clipdist = 32 >> 2;
actorNew->user.WeaponNum = actor->user.WeaponNum;
@ -16202,7 +16202,7 @@ int InitEnemyFireball(DSWActor* actor)
actorNew->spr.shade = -40;
SetOwner(actor, actorNew);
actorNew->set_int_zvel(0);
actorNew->clear_zvel();
actorNew->spr.clipdist = 16>>2;
actorNew->set_int_ang(NORM_ANGLE(actorNew->int_ang() + lat_ang[i]));