- nFinaleSpr.

This commit is contained in:
Christoph Oelckers 2021-10-21 13:20:00 +02:00
parent b480bb3634
commit 51202cba78
4 changed files with 13 additions and 8 deletions

View file

@ -309,7 +309,7 @@ enum kStatus
extern short nSmokeSparks;
extern short nDronePitch;
extern int lFinaleStart;
extern short nFinaleSpr;
extern DExhumedActor* pFinaleSpr;
void InitObjects();
void InitElev();

View file

@ -191,7 +191,7 @@ int lFinaleStart;
short nEnergyBlocks;
short nFinaleStage;
short nFinaleSpr;
DExhumedActor* pFinaleSpr;
short nDronePitch = 0;
short nSmokeSparks = 0;
@ -387,7 +387,7 @@ void SerializeObjects(FSerializer& arc)
("finalestart", lFinaleStart)
("energyblocks", nEnergyBlocks)
("finalestage", nFinaleStage)
("finalespr", nFinaleSpr)
("finalespr", pFinaleSpr)
("dronepitch", nDronePitch)
("smokesparks", nSmokeSparks)
.EndObject();
@ -1640,13 +1640,13 @@ void DoFinale()
if (!(dword_96788 & 2))
{
int nAng = RandomSize(11);
sprite[nFinaleSpr].ang = nAng;
BuildSpark(&exhumedActors[nFinaleSpr], 1);
pFinaleSpr->s().ang = nAng;
BuildSpark(pFinaleSpr, 1);
}
if (!RandomSize(2))
{
PlayFX2(StaticSound[kSound78] | 0x2000, nFinaleSpr);
PlayFX2(StaticSound[kSound78] | 0x2000, pFinaleSpr);
for (int i = 0; i < nTotalPlayers; i++) {
nQuake[i] = 1280;
@ -1847,7 +1847,7 @@ void ExplodeEnergyBlock(int nSprite)
}
else
{
nFinaleSpr = nSprite;
pFinaleSpr = &exhumedActors[nSprite];
lFinaleStart = PlayClock;
if (!lFinaleStart) {

View file

@ -1066,7 +1066,7 @@ void runlist_ProcessSectorTag(int nSector, int nLotag, int nHitag)
int nEnergyBlock = BuildEnergyBlock(nSector);
if (nLotag == 36) {
nFinaleSpr = nEnergyBlock;
pFinaleSpr = &exhumedActors[nEnergyBlock];
}
return;

View file

@ -132,6 +132,11 @@ void BendAmbientSound();
void CheckAmbience(short nSector);
void PlayFX2(unsigned short nSound, short nSprite, int sectf = 0, EChanFlags chanflags = CHANF_NONE, int sprflags = 0);
inline void PlayFX2(unsigned short nSound, DExhumedActor* actor, int sectf = 0, EChanFlags chanflags = CHANF_NONE, int sprflags = 0)
{
PlayFX2(nSound, actor->GetSpriteIndex(), sectf, chanflags, sprflags);
}
void PlayFXAtXYZ(unsigned short nSound, int x, int y, int z, int nSector, EChanFlags chanflags = CHANF_NONE, int sectf = 0);
inline void D3PlayFX(unsigned short nSound, short nSprite, short flags = 0)
{