Added functionality for the auto-channeler

This commit is contained in:
David Anderson
2005-11-19 01:25:34 +00:00
parent 694d7c118c
commit 62e7e22a93
10 changed files with 78 additions and 16 deletions

View File

@@ -83,6 +83,19 @@ void CPlayer::PutInServer()
ingame = true;
}
int CPlayer::NextHUDChannel()
{
int ilow = 1;
for (int i=ilow+1; i<=4; i++)
{
if (channels[i] < channels[ilow])
ilow = i;
}
return ilow;
}
bool CPlayer::Connect(const char* connectname, const char* ipaddress)
{
name.assign(connectname);
@@ -98,6 +111,9 @@ bool CPlayer::Connect(const char* connectname, const char* ipaddress)
initialized = true;
authorized = false;
for (int i=0; i<=4; i++)
channels[i] = 0.0f;
const char* authid = GETPLAYERAUTHID(pEdict);
if ((authid == 0) || (*authid == 0) || (strcmp(authid, "STEAM_ID_PENDING") == 0))