- Remove DCoreActor::ZeroVelocity().

This commit is contained in:
Mitchell Richters 2022-11-20 21:27:51 +11:00 committed by Christoph Oelckers
parent 39d1a758ed
commit e55412f240
8 changed files with 15 additions and 20 deletions

View file

@ -91,11 +91,6 @@ public:
spr.angle = spr.angle.Normalized360();
}
void ZeroVelocity()
{
vel = { 0,0,0 };
}
DVector3 interpolatedpos(double const interpfrac)
{
return interpolatedvalue(opos, spr.pos, interpfrac);

View file

@ -2387,7 +2387,7 @@ static void actInitThings()
act->spr.flags = thingInfo[nType].flags;
if (act->spr.flags & kPhysGravity) act->spr.flags |= kPhysFalling;
act->ZeroVelocity();
act->vel.Zero();
switch (act->spr.type)
{
@ -2489,7 +2489,7 @@ static void actInitDudes()
act->spr.cstat |= CSTAT_SPRITE_BLOOD_BIT1 | CSTAT_SPRITE_BLOCK_ALL;
#endif
act->ZeroVelocity();
act->vel.Zero();
#ifdef NOONE_EXTENSIONS
// add a way to set custom hp for every enemy - should work only if map just started and not loaded.
@ -2705,7 +2705,7 @@ static void actNapalmMove(DBloodActor* actor)
spawnparam[0] = actor->xspr.data4 >> 1;
spawnparam[1] = actor->xspr.data4 - spawnparam[0];
auto ang = actor->spr.angle;
actor->ZeroVelocity();
actor->vel.Zero();
for (int i = 0; i < 2; i++)
{
double t1 = RandomD(3.2) + 3.2;
@ -5448,7 +5448,7 @@ void actExplodeSprite(DBloodActor* actor)
GibSprite(actor, GIBTYPE_5, nullptr, nullptr);
break;
}
actor->ZeroVelocity();
actor->vel.Zero();
actPostSprite(actor, kStatExplosion);
actor->spr.scale = DVector2(explodeInfo[nType].repeat * REPEAT_SCALE, explodeInfo[nType].repeat* REPEAT_SCALE);

View file

@ -732,7 +732,7 @@ static void unicultThinkChase(DBloodActor* actor)
const EXPLOSION* pExpl = &explodeInfo[nType];
if (CheckProximity(actor, target->spr.pos, target->sector(), pExpl->radius >> 1))
{
actor->ZeroVelocity();
actor->vel.Zero();
if (doExplosion(actor, nType) && actor->xspr.health > 0)
actDamageSprite(actor, actor, kDamageExplode, 65535);
}

View file

@ -274,7 +274,7 @@ void Respawn(DBloodActor* actor, sectortype*) // 9
actor->spr.type = actor->spr.inittype;
actor->SetOwner(nullptr);
actor->spr.flags &= ~kHitagRespawn;
actor->ZeroVelocity();
actor->vel.Zero();
actor->xspr.respawnPending = 0;
actor->xspr.burnTime = 0;
actor->xspr.isTriggered = 0;
@ -542,7 +542,7 @@ void fxBouncingSleeve(DBloodActor* actor, sectortype*) // 16
void sleeveStopBouncing(DBloodActor* actor)
{
actor->ZeroVelocity();
actor->vel.Zero();
if (actor->hasX()) seqKill(actor);
sfxKill3DSound(actor, -1, -1);
@ -696,7 +696,7 @@ void sub_76A08(DBloodActor* actor, DBloodActor* actor2, PLAYER* pPlayer) // ???
actor->spr.angle = actor2->spr.angle;
ChangeActorSect(actor, actor2->sector());
sfxPlay3DSound(actor2, 201, -1, 0);
actor->ZeroVelocity();
actor->vel.Zero();
viewBackupSpriteLoc(actor);
if (pPlayer)
{

View file

@ -2613,7 +2613,7 @@ void usePropertiesChanger(DBloodActor* sourceactor, int objType, sectortype* pSe
else flags &= ~(kPhysGravity | kPhysFalling);
targetactor->spr.flags &= ~(kPhysMove | kPhysGravity | kPhysFalling);
targetactor->ZeroVelocity();
targetactor->vel.Zero();
targetactor->xspr.restState = targetactor->xspr.state;
}
@ -2726,7 +2726,7 @@ void usePropertiesChanger(DBloodActor* sourceactor, int objType, sectortype* pSe
{
if (oldFlags == 0)
targetactor->ZeroVelocity();
targetactor->vel.Zero();
if (nIndex != -1)
{
@ -2762,7 +2762,7 @@ void usePropertiesChanger(DBloodActor* sourceactor, int objType, sectortype* pSe
{
targetactor->xspr.physAttr = flags;
targetactor->ZeroVelocity();
targetactor->vel.Zero();
if (targetactor->spr.lotag >= kThingBase && targetactor->spr.lotag < kThingMax)
ChangeActorStat(targetactor, kStatThing); // if it was a thing - restore statnum
}
@ -3240,7 +3240,7 @@ void useTeleportTarget(DBloodActor* sourceactor, DBloodActor* actor)
if (sourceactor->xspr.data3 == 1)
{
actor->ZeroVelocity();
actor->vel.Zero();
}
else if (sourceactor->xspr.data3 > 0)
{

View file

@ -855,7 +855,7 @@ void playerStart(int nPlayer, int bNewLevel)
pPlayer->throwPower = 0;
pPlayer->deathTime = 0;
pPlayer->nextWeapon = kWeapNone;
actor->ZeroVelocity();
actor->vel.Zero();
pInput->avel = 0;
pInput->actions = 0;
pInput->fvel = 0;

View file

@ -1620,7 +1620,7 @@ void OperateTeleport(sectortype* pSector)
actor->spr.angle = destactor->spr.angle;
ChangeActorSect(actor, destactor->sector());
sfxPlay3DSound(destactor, 201, -1, 0);
actor->ZeroVelocity();
actor->vel.Zero();
actor->interpolated = false;
viewBackupSpriteLoc(actor);
if (pPlayer)

View file

@ -2148,7 +2148,7 @@ void AIObject::RadialDamage(RunListEvent* ev)
if (pActor->spr.statnum == kStatExplodeTarget)
{
pActor->ZeroVelocity();
pActor->vel.Zero();
}
else if (pActor->spr.statnum != kStatAnubisDrum)
{