diff --git a/src/g_shared/a_pickups.cpp b/src/g_shared/a_pickups.cpp index 661367753..f071171a7 100644 --- a/src/g_shared/a_pickups.cpp +++ b/src/g_shared/a_pickups.cpp @@ -459,6 +459,18 @@ void AInventory::Serialize (FArchive &arc) arc << Owner << Amount << MaxAmount << RespawnTics << ItemFlags << Icon << PickupSound << SpawnPointClass; } +//=========================================================================== +// +// AInventory :: MarkPrecacheSounds +// +//=========================================================================== + +void AInventory::MarkPrecacheSounds() const +{ + Super::MarkPrecacheSounds(); + PickupSound.MarkUsed(); +} + //=========================================================================== // // AInventory :: SpecialDropAction diff --git a/src/g_shared/a_pickups.h b/src/g_shared/a_pickups.h index 52c2b6d13..beaa65872 100644 --- a/src/g_shared/a_pickups.h +++ b/src/g_shared/a_pickups.h @@ -143,6 +143,7 @@ public: virtual void Touch (AActor *toucher); virtual void Serialize (FArchive &arc); + virtual void MarkPrecacheSounds() const; virtual void BeginPlay (); virtual void Destroy (); virtual void Tick (); @@ -276,6 +277,7 @@ public: bool bAltFire; // Set when this weapon's alternate fire is used. + virtual void MarkPrecacheSounds() const; virtual void Serialize (FArchive &arc); virtual bool ShouldStay (); virtual void AttachToOwner (AActor *other); diff --git a/src/g_shared/a_weapons.cpp b/src/g_shared/a_weapons.cpp index 8f45d892a..a59e8f564 100644 --- a/src/g_shared/a_weapons.cpp +++ b/src/g_shared/a_weapons.cpp @@ -67,6 +67,19 @@ void AWeapon::Serialize (FArchive &arc) << Crosshair; } +//=========================================================================== +// +// AWeapon :: MarkPrecacheSounds +// +//=========================================================================== + +void AWeapon::MarkPrecacheSounds() const +{ + Super::MarkPrecacheSounds(); + UpSound.MarkUsed(); + ReadySound.MarkUsed(); +} + //=========================================================================== // // AWeapon :: TryPickup