so the bot_sounds.cpp can be reduced file size alot by adding a method similar to this:
Code:
void SoundMethod(boolean a,float b, float c, boolean d)
{
if(a){
if ((iIndex < 0) || (iIndex >= gpGlobals->maxClients))
iIndex = UTIL_GetNearestPlayerIndex (VecBModelOrigin (pEdict));
}
clients[iIndex].fHearingDistance = b * fVolume;
clients[iIndex].fTimeSoundLasting = gpGlobals->time + c;
if(d)
clients[iIndex].vecSoundPosition = pEdict->v.origin;
else
clients[iIndex].vecSoundPosition = vecPosition;
}
and having 1 method call at each place instead of 3-5 lines?
but will it be efficient??