mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-18 14:41:55 +00:00
- use the actor variant of BuildAnim wherever trivially doable.
This commit is contained in:
parent
b79b1aad53
commit
a7b71c724e
10 changed files with 18 additions and 18 deletions
|
@ -295,7 +295,7 @@ void BuildExplosion(short nSprite)
|
|||
edx = 34;
|
||||
}
|
||||
|
||||
BuildAnim(-1, edx, 0, pSprite->x, pSprite->y, pSprite->z, pSprite->sectnum, pSprite->xrepeat, 4);
|
||||
BuildAnim(nullptr, edx, 0, pSprite->x, pSprite->y, pSprite->z, pSprite->sectnum, pSprite->xrepeat, 4);
|
||||
}
|
||||
|
||||
int BuildSplash(int nSprite, int nSector)
|
||||
|
@ -329,11 +329,11 @@ int BuildSplash(int nSprite, int nSector)
|
|||
nFlag = 0;
|
||||
}
|
||||
|
||||
int nAnim = BuildAnim(-1, edx, 0, pSprite->x, pSprite->y, sector[nSector].floorz, nSector, nRepeat, nFlag);
|
||||
auto pActor = BuildAnim(nullptr, edx, 0, pSprite->x, pSprite->y, sector[nSector].floorz, nSector, nRepeat, nFlag);
|
||||
|
||||
if (!bIsLava)
|
||||
{
|
||||
D3PlayFX(StaticSound[nSound] | 0xa00, AnimList[nAnim].nSprite);
|
||||
D3PlayFX(StaticSound[nSound] | 0xa00, pActor);
|
||||
}
|
||||
|
||||
return AnimList[nAnim].nSprite;
|
||||
|
|
|
@ -188,7 +188,7 @@ void AIBubble::Tick(RunListEvent* ev)
|
|||
short nSectAbove = SectAbove[nSector];
|
||||
|
||||
if (pSprite->hitag > -1 && nSectAbove != -1) {
|
||||
BuildAnim(-1, 70, 0, pSprite->x, pSprite->y, sector[nSectAbove].floorz, nSectAbove, 64, 0);
|
||||
BuildAnim(nullptr, 70, 0, pSprite->x, pSprite->y, sector[nSectAbove].floorz, nSectAbove, 64, 0);
|
||||
}
|
||||
|
||||
DestroyBubble(nBubble);
|
||||
|
|
|
@ -271,7 +271,7 @@ void BulletHitsSprite(Bullet *pBullet, short nBulletSprite, short nHitSprite, in
|
|||
|
||||
if (nStat <= 90 || nStat >= 199)
|
||||
{
|
||||
BuildAnim(-1, pBulletInfo->field_C, 0, x, y, z, nSector, 40, pBulletInfo->nFlags);
|
||||
BuildAnim(nullptr, pBulletInfo->field_C, 0, x, y, z, nSector, 40, pBulletInfo->nFlags);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -283,13 +283,13 @@ void BulletHitsSprite(Bullet *pBullet, short nBulletSprite, short nHitSprite, in
|
|||
case 102:
|
||||
case kStatExplodeTrigger:
|
||||
case kStatExplodeTarget:
|
||||
BuildAnim(-1, 12, 0, x, y, z, nSector, 40, 0);
|
||||
BuildAnim(nullptr, 12, 0, x, y, z, nSector, 40, 0);
|
||||
break;
|
||||
default:
|
||||
BuildAnim(-1, 39, 0, x, y, z, nSector, 40, 0);
|
||||
BuildAnim(nullptr, 39, 0, x, y, z, nSector, 40, 0);
|
||||
if (pBullet->nType > 2)
|
||||
{
|
||||
BuildAnim(-1, pBulletInfo->field_C, 0, x, y, z, nSector, 40, pBulletInfo->nFlags);
|
||||
BuildAnim(nullptr, pBulletInfo->field_C, 0, x, y, z, nSector, 40, pBulletInfo->nFlags);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -500,7 +500,7 @@ HITWALL:
|
|||
}
|
||||
else
|
||||
{
|
||||
BuildAnim(-1, pBulletInfo->field_C, 0, x2, y2, z2, hitsect, 40, pBulletInfo->nFlags);
|
||||
BuildAnim(nullptr, pBulletInfo->field_C, 0, x2, y2, z2, hitsect, 40, pBulletInfo->nFlags);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -518,7 +518,7 @@ HITWALL:
|
|||
}
|
||||
|
||||
// draws bullet puff on walls when they're shot
|
||||
BuildAnim(-1, pBulletInfo->field_C, 0, x2, y2, z2 + zOffset + -4096, hitsect, 40, pBulletInfo->nFlags);
|
||||
BuildAnim(nullptr, pBulletInfo->field_C, 0, x2, y2, z2 + zOffset + -4096, hitsect, 40, pBulletInfo->nFlags);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -269,7 +269,7 @@ void ExplodeGrenade(short nGrenade)
|
|||
|
||||
runlist_RadialDamageEnemy(nGrenadeSprite, nDamage, BulletInfo[kWeaponGrenade].nRadius);
|
||||
|
||||
BuildAnim(-1, var_28, 0, pGrenadeSprite->x, pGrenadeSprite->y, pGrenadeSprite->z, pGrenadeSprite->sectnum, var_20, 4);
|
||||
BuildAnim(nullptr, var_28, 0, pGrenadeSprite->x, pGrenadeSprite->y, pGrenadeSprite->z, pGrenadeSprite->sectnum, var_20, 4);
|
||||
AddFlash(pGrenadeSprite->sectnum, pGrenadeSprite->x, pGrenadeSprite->y, pGrenadeSprite->z, 128);
|
||||
|
||||
nGrenadePlayer[nGrenade] = -1;
|
||||
|
|
|
@ -762,7 +762,7 @@ loc_flag:
|
|||
else if (sprite[nSprite2].statnum == 102)
|
||||
{
|
||||
// loc_27370:
|
||||
BuildAnim(-1, 12, 0, theX, theY, theZ, nSectorB, 30, 0);
|
||||
BuildAnim(nullptr, 12, 0, theX, theY, theZ, nSectorB, 30, 0);
|
||||
}
|
||||
else if (sprite[nSprite2].statnum == kStatExplodeTrigger) {
|
||||
var_28 += 2;
|
||||
|
@ -774,7 +774,7 @@ loc_flag:
|
|||
else
|
||||
{
|
||||
// loc_27370:
|
||||
BuildAnim(-1, 12, 0, theX, theY, theZ, nSectorB, 30, 0);
|
||||
BuildAnim(nullptr, 12, 0, theX, theY, theZ, nSectorB, 30, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -454,7 +454,7 @@ void DoRegenerates()
|
|||
|
||||
if (pSprite->extra <= 0)
|
||||
{
|
||||
BuildAnim(-1, 38, 0, pSprite->x, pSprite->y, pSprite->z, pSprite->sectnum, 64, 4);
|
||||
BuildAnim(nullptr, 38, 0, pSprite->x, pSprite->y, pSprite->z, pSprite->sectnum, 64, 4);
|
||||
D3PlayFX(StaticSound[kSoundTorchOn], nSprite);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -2116,7 +2116,7 @@ void AIObject::Tick(RunListEvent* ev)
|
|||
}
|
||||
|
||||
AddFlash(pSprite->sectnum, pSprite->x, pSprite->y, pSprite->z, 128);
|
||||
BuildAnim(-1, var_18, 0, pSprite->x, pSprite->y, sector[pSprite->sectnum].floorz, pSprite->sectnum, 240, 4);
|
||||
BuildAnim(nullptr, var_18, 0, pSprite->x, pSprite->y, sector[pSprite->sectnum].floorz, pSprite->sectnum, 240, 4);
|
||||
|
||||
// int edi = nSprite | 0x4000;
|
||||
|
||||
|
|
|
@ -2591,7 +2591,7 @@ sectdone:
|
|||
short mouthSect;
|
||||
WheresMyMouth(nPlayer, &mouthX, &mouthY, &mouthZ, &mouthSect);
|
||||
|
||||
BuildAnim(-1, 71, 0, mouthX, mouthY, pPlayerSprite->z + 3840, mouthSect, 75, 128);
|
||||
BuildAnim(nullptr, 71, 0, mouthX, mouthY, pPlayerSprite->z + 3840, mouthSect, 75, 128);
|
||||
}
|
||||
break;
|
||||
case 17:
|
||||
|
|
|
@ -240,7 +240,7 @@ void DestroyEgg(short nEgg)
|
|||
|
||||
if (QueenEgg[nEgg].nAction != 4)
|
||||
{
|
||||
BuildAnim(-1, 34, 0, pSprite->x, pSprite->y, pSprite->z, pSprite->sectnum, pSprite->xrepeat, 4);
|
||||
BuildAnim(nullptr, 34, 0, pSprite->x, pSprite->y, pSprite->z, pSprite->sectnum, pSprite->xrepeat, 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -108,7 +108,7 @@ void ExplodeSnakeSprite(int nSprite, short nPlayer)
|
|||
|
||||
pSprite->owner = nOwner;
|
||||
|
||||
BuildAnim(-1, 23, 0, pSprite->x, pSprite->y, pSprite->z, pSprite->sectnum, 40, 4);
|
||||
BuildAnim(nullptr, 23, 0, pSprite->x, pSprite->y, pSprite->z, pSprite->sectnum, 40, 4);
|
||||
|
||||
AddFlash(pSprite->sectnum, pSprite->x, pSprite->y, pSprite->z, 128);
|
||||
|
||||
|
|
Loading…
Reference in a new issue