diff --git a/src/s_advsound.cpp b/src/s_advsound.cpp index cf6f3831b2..f5b268348e 100644 --- a/src/s_advsound.cpp +++ b/src/s_advsound.cpp @@ -2072,6 +2072,7 @@ class AAmbientSound : public AActor public: void Serialize (FArchive &arc); + void MarkPrecacheSounds () const; void BeginPlay (); void Tick (); void Activate (AActor *activator); @@ -2098,6 +2099,22 @@ void AAmbientSound::Serialize (FArchive &arc) arc << bActive << NextCheck; } +//========================================================================== +// +// AmbientSound :: MarkPrecacheSounds +// +//========================================================================== + +void AAmbientSound::MarkPrecacheSounds() const +{ + Super::MarkPrecacheSounds(); + FAmbientSound *ambient = Ambients.CheckKey(args[0]); + if (ambient != NULL) + { + ambient->sound.MarkUsed(); + } +} + //========================================================================== // // AmbientSound :: Tick