mirror of
https://github.com/ENSL/NS.git
synced 2024-11-10 07:11:38 +00:00
Performance Changes: Removed the passing by value of large objects
git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@222 67975925-1194-0748-b3d5-c16f83f1a3a1
This commit is contained in:
parent
f083c5eb31
commit
8c9da6f517
5 changed files with 6 additions and 6 deletions
|
@ -796,7 +796,7 @@ void AvHMP3Audio::ClearSoundNameList()
|
|||
sSoundList.clear();
|
||||
}
|
||||
|
||||
StringList AvHMP3Audio::GetSoundNameList()
|
||||
const StringList& AvHMP3Audio::GetSoundNameList()
|
||||
{
|
||||
return sSoundList;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1368,7 +1368,7 @@ bool AvHGamerules::GetCanJoinTeamInFuture(AvHPlayer* inPlayer, AvHTeamNumber inT
|
|||
return theCanJoinTeam;
|
||||
}
|
||||
|
||||
AvHBaseInfoLocationListType AvHGamerules::GetInfoLocations() const
|
||||
const AvHBaseInfoLocationListType& AvHGamerules::GetInfoLocations() const
|
||||
{
|
||||
return mInfoLocations;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in a new issue