Load weapon sounds with zonebuilder

This commit is contained in:
rackover 2021-04-13 10:28:10 +02:00
parent d98cfb55cb
commit 1fe241c7e5

View File

@ -119,6 +119,74 @@ namespace Assets
if (asset->weapDef->projBeaconEffect) builder->loadAsset(Game::XAssetType::ASSET_TYPE_FX, asset->weapDef->projBeaconEffect); if (asset->weapDef->projBeaconEffect) builder->loadAsset(Game::XAssetType::ASSET_TYPE_FX, asset->weapDef->projBeaconEffect);
if (asset->weapDef->projIgnitionEffect) builder->loadAsset(Game::XAssetType::ASSET_TYPE_FX, asset->weapDef->projIgnitionEffect); if (asset->weapDef->projIgnitionEffect) builder->loadAsset(Game::XAssetType::ASSET_TYPE_FX, asset->weapDef->projIgnitionEffect);
if (asset->weapDef->turretOverheatEffect) builder->loadAsset(Game::XAssetType::ASSET_TYPE_FX, asset->weapDef->turretOverheatEffect); if (asset->weapDef->turretOverheatEffect) builder->loadAsset(Game::XAssetType::ASSET_TYPE_FX, asset->weapDef->turretOverheatEffect);
#define LoadWeapSound(sound) if (asset->weapDef->##sound##) builder->loadAsset(Game::XAssetType::ASSET_TYPE_SOUND, asset->weapDef->##sound##)
LoadWeapSound(pickupSound);
LoadWeapSound(pickupSoundPlayer);
LoadWeapSound(ammoPickupSound);
LoadWeapSound(ammoPickupSoundPlayer);
LoadWeapSound(projectileSound);
LoadWeapSound(pullbackSound);
LoadWeapSound(pullbackSoundPlayer);
LoadWeapSound(fireSound);
LoadWeapSound(fireSoundPlayer);
LoadWeapSound(fireSoundPlayerAkimbo);
LoadWeapSound(fireLoopSound);
LoadWeapSound(fireLoopSoundPlayer);
LoadWeapSound(fireStopSound);
LoadWeapSound(fireStopSoundPlayer);
LoadWeapSound(fireLastSound);
LoadWeapSound(fireLastSoundPlayer);
LoadWeapSound(emptyFireSound);
LoadWeapSound(emptyFireSoundPlayer);
LoadWeapSound(meleeSwipeSound);
LoadWeapSound(meleeSwipeSoundPlayer);
LoadWeapSound(meleeHitSound);
LoadWeapSound(meleeMissSound);
LoadWeapSound(rechamberSound);
LoadWeapSound(rechamberSoundPlayer);
LoadWeapSound(reloadSound);
LoadWeapSound(reloadSoundPlayer);
LoadWeapSound(reloadEmptySound);
LoadWeapSound(reloadEmptySoundPlayer);
LoadWeapSound(reloadStartSound);
LoadWeapSound(reloadStartSoundPlayer);
LoadWeapSound(reloadEndSound);
LoadWeapSound(reloadEndSoundPlayer);
LoadWeapSound(detonateSound);
LoadWeapSound(detonateSoundPlayer);
LoadWeapSound(nightVisionWearSound);
LoadWeapSound(nightVisionWearSoundPlayer);
LoadWeapSound(nightVisionRemoveSound);
LoadWeapSound(nightVisionRemoveSoundPlayer);
LoadWeapSound(altSwitchSound);
LoadWeapSound(altSwitchSoundPlayer);
LoadWeapSound(raiseSound);
LoadWeapSound(raiseSoundPlayer);
LoadWeapSound(firstRaiseSound);
LoadWeapSound(firstRaiseSoundPlayer);
LoadWeapSound(putawaySound);
LoadWeapSound(putawaySoundPlayer);
LoadWeapSound(scanSound);
// No idea how to handle this!
//if (asset->weapDef->bounceSound && *asset->weapDef->bounceSound) builder->loadAsset(Game::XAssetType::ASSET_TYPE_SOUND, *asset->weapDef->bounceSound);
LoadWeapSound(projExplosionSound);
LoadWeapSound(projDudSound);
LoadWeapSound(projIgnitionSound);
LoadWeapSound(turretOverheatSound);
LoadWeapSound(turretBarrelSpinMaxSnd);
for (size_t i = 0; i < 4; i++)
{
LoadWeapSound(turretBarrelSpinUpSnd[i]);
LoadWeapSound(turretBarrelSpinDownSnd[i]);
}
LoadWeapSound(missileConeSoundAlias);
LoadWeapSound(missileConeSoundAliasAtBase);
} }
void IWeapon::writeWeaponDef(Game::WeaponDef* def, Components::ZoneBuilder::Zone* builder, Utils::Stream* buffer) void IWeapon::writeWeaponDef(Game::WeaponDef* def, Components::ZoneBuilder::Zone* builder, Utils::Stream* buffer)