SoundAsset Array

Few fixes to soundasset array to stop it complaining
This commit is contained in:
marauder2k7 2021-09-20 10:49:34 +01:00
parent 3ad6d47ca9
commit 1ea693fea6
4 changed files with 80 additions and 61 deletions

View file

@ -63,7 +63,10 @@ class LightningData : public GameBaseData
//-------------------------------------- Console set variables
public:
SFXTrack* thunderSounds[MaxThunders];
//SFXTrack* thunderSounds[MaxThunders];
DECLARE_SOUNDASSET_ARRAY(LightningData, ThunderSound, MaxThunders);
DECLARE_SOUNDASSET_ARRAY_SETGET(LightningData, ThunderSound);
DECLARE_SOUNDASSET(LightningData, StrikeSound);
DECLARE_SOUNDASSET_SETGET(LightningData, StrikeSound);
@ -91,6 +94,14 @@ class LightningData : public GameBaseData
DECLARE_CONOBJECT(LightningData);
static void initPersistFields();
SFXProfile* getThunderProfile(U32 id)
{
if (mThunderSoundAsset[id] != NULL)
return mThunderSoundAsset[id]->getSfxProfile();
else
return NULL;
}
SFXProfile* getSFXProfile() {
if (mStrikeSoundAsset.notNull())
return mStrikeSoundAsset->getSfxProfile();