- Precache $ambient sounds.

SVN r3844 (trunk)
This commit is contained in:
Randy Heit 2012-08-22 23:58:18 +00:00
parent cc4aadbfaf
commit 04f09d9b57

View file

@ -2072,6 +2072,7 @@ class AAmbientSound : public AActor
public: public:
void Serialize (FArchive &arc); void Serialize (FArchive &arc);
void MarkPrecacheSounds () const;
void BeginPlay (); void BeginPlay ();
void Tick (); void Tick ();
void Activate (AActor *activator); void Activate (AActor *activator);
@ -2098,6 +2099,22 @@ void AAmbientSound::Serialize (FArchive &arc)
arc << bActive << NextCheck; 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 // AmbientSound :: Tick