mirror of
https://github.com/DrBeef/Raze.git
synced 2025-03-03 16:01:16 +00:00
- Remove DCoreActor::ZeroVelocity()
.
This commit is contained in:
parent
39d1a758ed
commit
e55412f240
8 changed files with 15 additions and 20 deletions
|
@ -91,11 +91,6 @@ public:
|
||||||
spr.angle = spr.angle.Normalized360();
|
spr.angle = spr.angle.Normalized360();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZeroVelocity()
|
|
||||||
{
|
|
||||||
vel = { 0,0,0 };
|
|
||||||
}
|
|
||||||
|
|
||||||
DVector3 interpolatedpos(double const interpfrac)
|
DVector3 interpolatedpos(double const interpfrac)
|
||||||
{
|
{
|
||||||
return interpolatedvalue(opos, spr.pos, interpfrac);
|
return interpolatedvalue(opos, spr.pos, interpfrac);
|
||||||
|
|
|
@ -2387,7 +2387,7 @@ static void actInitThings()
|
||||||
|
|
||||||
act->spr.flags = thingInfo[nType].flags;
|
act->spr.flags = thingInfo[nType].flags;
|
||||||
if (act->spr.flags & kPhysGravity) act->spr.flags |= kPhysFalling;
|
if (act->spr.flags & kPhysGravity) act->spr.flags |= kPhysFalling;
|
||||||
act->ZeroVelocity();
|
act->vel.Zero();
|
||||||
|
|
||||||
switch (act->spr.type)
|
switch (act->spr.type)
|
||||||
{
|
{
|
||||||
|
@ -2489,7 +2489,7 @@ static void actInitDudes()
|
||||||
act->spr.cstat |= CSTAT_SPRITE_BLOOD_BIT1 | CSTAT_SPRITE_BLOCK_ALL;
|
act->spr.cstat |= CSTAT_SPRITE_BLOOD_BIT1 | CSTAT_SPRITE_BLOCK_ALL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
act->ZeroVelocity();
|
act->vel.Zero();
|
||||||
|
|
||||||
#ifdef NOONE_EXTENSIONS
|
#ifdef NOONE_EXTENSIONS
|
||||||
// add a way to set custom hp for every enemy - should work only if map just started and not loaded.
|
// 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[0] = actor->xspr.data4 >> 1;
|
||||||
spawnparam[1] = actor->xspr.data4 - spawnparam[0];
|
spawnparam[1] = actor->xspr.data4 - spawnparam[0];
|
||||||
auto ang = actor->spr.angle;
|
auto ang = actor->spr.angle;
|
||||||
actor->ZeroVelocity();
|
actor->vel.Zero();
|
||||||
for (int i = 0; i < 2; i++)
|
for (int i = 0; i < 2; i++)
|
||||||
{
|
{
|
||||||
double t1 = RandomD(3.2) + 3.2;
|
double t1 = RandomD(3.2) + 3.2;
|
||||||
|
@ -5448,7 +5448,7 @@ void actExplodeSprite(DBloodActor* actor)
|
||||||
GibSprite(actor, GIBTYPE_5, nullptr, nullptr);
|
GibSprite(actor, GIBTYPE_5, nullptr, nullptr);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
actor->ZeroVelocity();
|
actor->vel.Zero();
|
||||||
actPostSprite(actor, kStatExplosion);
|
actPostSprite(actor, kStatExplosion);
|
||||||
actor->spr.scale = DVector2(explodeInfo[nType].repeat * REPEAT_SCALE, explodeInfo[nType].repeat* REPEAT_SCALE);
|
actor->spr.scale = DVector2(explodeInfo[nType].repeat * REPEAT_SCALE, explodeInfo[nType].repeat* REPEAT_SCALE);
|
||||||
|
|
||||||
|
|
|
@ -732,7 +732,7 @@ static void unicultThinkChase(DBloodActor* actor)
|
||||||
const EXPLOSION* pExpl = &explodeInfo[nType];
|
const EXPLOSION* pExpl = &explodeInfo[nType];
|
||||||
if (CheckProximity(actor, target->spr.pos, target->sector(), pExpl->radius >> 1))
|
if (CheckProximity(actor, target->spr.pos, target->sector(), pExpl->radius >> 1))
|
||||||
{
|
{
|
||||||
actor->ZeroVelocity();
|
actor->vel.Zero();
|
||||||
if (doExplosion(actor, nType) && actor->xspr.health > 0)
|
if (doExplosion(actor, nType) && actor->xspr.health > 0)
|
||||||
actDamageSprite(actor, actor, kDamageExplode, 65535);
|
actDamageSprite(actor, actor, kDamageExplode, 65535);
|
||||||
}
|
}
|
||||||
|
|
|
@ -274,7 +274,7 @@ void Respawn(DBloodActor* actor, sectortype*) // 9
|
||||||
actor->spr.type = actor->spr.inittype;
|
actor->spr.type = actor->spr.inittype;
|
||||||
actor->SetOwner(nullptr);
|
actor->SetOwner(nullptr);
|
||||||
actor->spr.flags &= ~kHitagRespawn;
|
actor->spr.flags &= ~kHitagRespawn;
|
||||||
actor->ZeroVelocity();
|
actor->vel.Zero();
|
||||||
actor->xspr.respawnPending = 0;
|
actor->xspr.respawnPending = 0;
|
||||||
actor->xspr.burnTime = 0;
|
actor->xspr.burnTime = 0;
|
||||||
actor->xspr.isTriggered = 0;
|
actor->xspr.isTriggered = 0;
|
||||||
|
@ -542,7 +542,7 @@ void fxBouncingSleeve(DBloodActor* actor, sectortype*) // 16
|
||||||
|
|
||||||
void sleeveStopBouncing(DBloodActor* actor)
|
void sleeveStopBouncing(DBloodActor* actor)
|
||||||
{
|
{
|
||||||
actor->ZeroVelocity();
|
actor->vel.Zero();
|
||||||
if (actor->hasX()) seqKill(actor);
|
if (actor->hasX()) seqKill(actor);
|
||||||
sfxKill3DSound(actor, -1, -1);
|
sfxKill3DSound(actor, -1, -1);
|
||||||
|
|
||||||
|
@ -696,7 +696,7 @@ void sub_76A08(DBloodActor* actor, DBloodActor* actor2, PLAYER* pPlayer) // ???
|
||||||
actor->spr.angle = actor2->spr.angle;
|
actor->spr.angle = actor2->spr.angle;
|
||||||
ChangeActorSect(actor, actor2->sector());
|
ChangeActorSect(actor, actor2->sector());
|
||||||
sfxPlay3DSound(actor2, 201, -1, 0);
|
sfxPlay3DSound(actor2, 201, -1, 0);
|
||||||
actor->ZeroVelocity();
|
actor->vel.Zero();
|
||||||
viewBackupSpriteLoc(actor);
|
viewBackupSpriteLoc(actor);
|
||||||
if (pPlayer)
|
if (pPlayer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2613,7 +2613,7 @@ void usePropertiesChanger(DBloodActor* sourceactor, int objType, sectortype* pSe
|
||||||
else flags &= ~(kPhysGravity | kPhysFalling);
|
else flags &= ~(kPhysGravity | kPhysFalling);
|
||||||
|
|
||||||
targetactor->spr.flags &= ~(kPhysMove | kPhysGravity | kPhysFalling);
|
targetactor->spr.flags &= ~(kPhysMove | kPhysGravity | kPhysFalling);
|
||||||
targetactor->ZeroVelocity();
|
targetactor->vel.Zero();
|
||||||
targetactor->xspr.restState = targetactor->xspr.state;
|
targetactor->xspr.restState = targetactor->xspr.state;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2726,7 +2726,7 @@ void usePropertiesChanger(DBloodActor* sourceactor, int objType, sectortype* pSe
|
||||||
{
|
{
|
||||||
|
|
||||||
if (oldFlags == 0)
|
if (oldFlags == 0)
|
||||||
targetactor->ZeroVelocity();
|
targetactor->vel.Zero();
|
||||||
|
|
||||||
if (nIndex != -1)
|
if (nIndex != -1)
|
||||||
{
|
{
|
||||||
|
@ -2762,7 +2762,7 @@ void usePropertiesChanger(DBloodActor* sourceactor, int objType, sectortype* pSe
|
||||||
{
|
{
|
||||||
|
|
||||||
targetactor->xspr.physAttr = flags;
|
targetactor->xspr.physAttr = flags;
|
||||||
targetactor->ZeroVelocity();
|
targetactor->vel.Zero();
|
||||||
if (targetactor->spr.lotag >= kThingBase && targetactor->spr.lotag < kThingMax)
|
if (targetactor->spr.lotag >= kThingBase && targetactor->spr.lotag < kThingMax)
|
||||||
ChangeActorStat(targetactor, kStatThing); // if it was a thing - restore statnum
|
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)
|
if (sourceactor->xspr.data3 == 1)
|
||||||
{
|
{
|
||||||
actor->ZeroVelocity();
|
actor->vel.Zero();
|
||||||
}
|
}
|
||||||
else if (sourceactor->xspr.data3 > 0)
|
else if (sourceactor->xspr.data3 > 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -855,7 +855,7 @@ void playerStart(int nPlayer, int bNewLevel)
|
||||||
pPlayer->throwPower = 0;
|
pPlayer->throwPower = 0;
|
||||||
pPlayer->deathTime = 0;
|
pPlayer->deathTime = 0;
|
||||||
pPlayer->nextWeapon = kWeapNone;
|
pPlayer->nextWeapon = kWeapNone;
|
||||||
actor->ZeroVelocity();
|
actor->vel.Zero();
|
||||||
pInput->avel = 0;
|
pInput->avel = 0;
|
||||||
pInput->actions = 0;
|
pInput->actions = 0;
|
||||||
pInput->fvel = 0;
|
pInput->fvel = 0;
|
||||||
|
|
|
@ -1620,7 +1620,7 @@ void OperateTeleport(sectortype* pSector)
|
||||||
actor->spr.angle = destactor->spr.angle;
|
actor->spr.angle = destactor->spr.angle;
|
||||||
ChangeActorSect(actor, destactor->sector());
|
ChangeActorSect(actor, destactor->sector());
|
||||||
sfxPlay3DSound(destactor, 201, -1, 0);
|
sfxPlay3DSound(destactor, 201, -1, 0);
|
||||||
actor->ZeroVelocity();
|
actor->vel.Zero();
|
||||||
actor->interpolated = false;
|
actor->interpolated = false;
|
||||||
viewBackupSpriteLoc(actor);
|
viewBackupSpriteLoc(actor);
|
||||||
if (pPlayer)
|
if (pPlayer)
|
||||||
|
|
|
@ -2148,7 +2148,7 @@ void AIObject::RadialDamage(RunListEvent* ev)
|
||||||
|
|
||||||
if (pActor->spr.statnum == kStatExplodeTarget)
|
if (pActor->spr.statnum == kStatExplodeTarget)
|
||||||
{
|
{
|
||||||
pActor->ZeroVelocity();
|
pActor->vel.Zero();
|
||||||
}
|
}
|
||||||
else if (pActor->spr.statnum != kStatAnubisDrum)
|
else if (pActor->spr.statnum != kStatAnubisDrum)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue