diff --git a/dev/performance-3.0.5/source/mod/AvHEntities.cpp b/dev/performance-3.0.5/source/mod/AvHEntities.cpp index b350782b..b0e8f152 100644 --- a/dev/performance-3.0.5/source/mod/AvHEntities.cpp +++ b/dev/performance-3.0.5/source/mod/AvHEntities.cpp @@ -796,7 +796,7 @@ void AvHMP3Audio::ClearSoundNameList() sSoundList.clear(); } -StringList AvHMP3Audio::GetSoundNameList() +const StringList& AvHMP3Audio::GetSoundNameList() { return sSoundList; } diff --git a/dev/performance-3.0.5/source/mod/AvHEntities.h b/dev/performance-3.0.5/source/mod/AvHEntities.h index 3c12b0ea..a468bb81 100644 --- a/dev/performance-3.0.5/source/mod/AvHEntities.h +++ b/dev/performance-3.0.5/source/mod/AvHEntities.h @@ -259,7 +259,7 @@ public: void EXPORT SpecialSoundUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ); static void ClearSoundNameList(); - static StringList GetSoundNameList(); + static const StringList& GetSoundNameList(); private: static StringList sSoundList; diff --git a/dev/performance-3.0.5/source/mod/AvHGamerules.cpp b/dev/performance-3.0.5/source/mod/AvHGamerules.cpp index b615829e..e00c6375 100644 --- a/dev/performance-3.0.5/source/mod/AvHGamerules.cpp +++ b/dev/performance-3.0.5/source/mod/AvHGamerules.cpp @@ -1368,7 +1368,7 @@ bool AvHGamerules::GetCanJoinTeamInFuture(AvHPlayer* inPlayer, AvHTeamNumber inT return theCanJoinTeam; } -AvHBaseInfoLocationListType AvHGamerules::GetInfoLocations() const +const AvHBaseInfoLocationListType& AvHGamerules::GetInfoLocations() const { return mInfoLocations; } diff --git a/dev/performance-3.0.5/source/mod/AvHGamerules.h b/dev/performance-3.0.5/source/mod/AvHGamerules.h index c888c12d..c919bf0d 100644 --- a/dev/performance-3.0.5/source/mod/AvHGamerules.h +++ b/dev/performance-3.0.5/source/mod/AvHGamerules.h @@ -226,7 +226,7 @@ public: bool GetIsTesting(void) const; bool GetIsValidFutureTeam(AvHPlayer inPlayer, int inTeamNumber) const; bool GetCanJoinTeamInFuture(AvHPlayer* inPlayer, AvHTeamNumber theTeamNumber, string& outString) const; - AvHBaseInfoLocationListType GetInfoLocations() const; + const AvHBaseInfoLocationListType& GetInfoLocations() const; int GetMaxWeight(void) const; const char* GetSpawnEntityName(AvHPlayer* inPlayer) const; Vector GetSpawnAreaCenter(AvHTeamNumber inTeamNumber) const; diff --git a/dev/performance-3.0.5/source/mod/AvHPlayer.cpp b/dev/performance-3.0.5/source/mod/AvHPlayer.cpp index 1dbed837..41868a3a 100644 --- a/dev/performance-3.0.5/source/mod/AvHPlayer.cpp +++ b/dev/performance-3.0.5/source/mod/AvHPlayer.cpp @@ -10285,7 +10285,7 @@ void AvHPlayer::UpdateParticleTemplates() void AvHPlayer::UpdateInfoLocations() { // Get map location list - AvHBaseInfoLocationListType theInfoLocations = GetGameRules()->GetInfoLocations(); + const AvHBaseInfoLocationListType& theInfoLocations = GetGameRules()->GetInfoLocations(); // Compare with ours, send one down each tick (assumes that previous ones sent don't change) int theNumClientInfoLocations = this->mClientInfoLocations.size(); @@ -10533,7 +10533,7 @@ void AvHPlayer::UpdateSoundNames() if(this->pev != NULL ) // Not fully connected yet { // Send list of special sounds - StringList theSoundNameList = AvHMP3Audio::GetSoundNameList(); + const StringList& theSoundNameList = AvHMP3Audio::GetSoundNameList(); int theNumberOfSounds = theSoundNameList.size(); int theNumberOfSoundsOnClient = this->mClientSoundNames.size();