Ported performance changes from SVN revision 222, 3.0.5 performance branch.

git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@240 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
tankefugl 2005-07-06 00:08:14 +00:00
parent 241a3b0282
commit f5cdfe00ad
5 changed files with 6 additions and 6 deletions

View file

@ -803,7 +803,7 @@ void AvHMP3Audio::ClearSoundNameList()
sSoundList.clear(); sSoundList.clear();
} }
StringList AvHMP3Audio::GetSoundNameList() const StringList& AvHMP3Audio::GetSoundNameList()
{ {
return sSoundList; return sSoundList;
} }

View file

@ -259,7 +259,7 @@ public:
void EXPORT SpecialSoundUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ); void EXPORT SpecialSoundUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value );
static void ClearSoundNameList(); static void ClearSoundNameList();
static StringList GetSoundNameList(); static const StringList& GetSoundNameList();
private: private:
static StringList sSoundList; static StringList sSoundList;

View file

@ -1032,7 +1032,7 @@ bool AvHGamerules::GetCanJoinTeamInFuture(AvHPlayer* inPlayer, AvHTeamNumber inT
return theCanJoinTeam; return theCanJoinTeam;
} }
AvHBaseInfoLocationListType AvHGamerules::GetInfoLocations() const const AvHBaseInfoLocationListType& AvHGamerules::GetInfoLocations() const
{ {
return mInfoLocations; return mInfoLocations;
} }

View file

@ -213,7 +213,7 @@ public:
bool GetIsTesting(void) const; bool GetIsTesting(void) const;
bool GetIsValidFutureTeam(AvHPlayer inPlayer, int inTeamNumber) const; bool GetIsValidFutureTeam(AvHPlayer inPlayer, int inTeamNumber) const;
bool GetCanJoinTeamInFuture(AvHPlayer* inPlayer, AvHTeamNumber theTeamNumber, string& outString) const; bool GetCanJoinTeamInFuture(AvHPlayer* inPlayer, AvHTeamNumber theTeamNumber, string& outString) const;
AvHBaseInfoLocationListType GetInfoLocations() const; const AvHBaseInfoLocationListType& GetInfoLocations() const;
int GetMaxWeight(void) const; int GetMaxWeight(void) const;
const char* GetSpawnEntityName(AvHPlayer* inPlayer) const; const char* GetSpawnEntityName(AvHPlayer* inPlayer) const;
Vector GetSpawnAreaCenter(AvHTeamNumber inTeamNumber) const; Vector GetSpawnAreaCenter(AvHTeamNumber inTeamNumber) const;

View file

@ -9308,7 +9308,7 @@ void AvHPlayer::UpdateParticleTemplates()
void AvHPlayer::UpdateInfoLocations() void AvHPlayer::UpdateInfoLocations()
{ {
// Get map location list // 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) // Compare with ours, send one down each tick (assumes that previous ones sent don't change)
int theNumClientInfoLocations = this->mClientInfoLocations.size(); int theNumClientInfoLocations = this->mClientInfoLocations.size();
@ -9459,7 +9459,7 @@ void AvHPlayer::UpdateSoundNames()
if(this->pev != NULL ) // Not fully connected yet if(this->pev != NULL ) // Not fully connected yet
{ {
// Send list of special sounds // Send list of special sounds
StringList theSoundNameList = AvHMP3Audio::GetSoundNameList(); const StringList& theSoundNameList = AvHMP3Audio::GetSoundNameList();
int theNumberOfSounds = theSoundNameList.size(); int theNumberOfSounds = theSoundNameList.size();
int theNumberOfSoundsOnClient = this->mClientSoundNames.size(); int theNumberOfSoundsOnClient = this->mClientSoundNames.size();