add constant for UNKNOWN_AGENT_ID

This commit is contained in:
Stephen Birarda 2013-05-07 12:39:35 -07:00
parent 83e59b1aa8
commit 85dfb23fbd
3 changed files with 4 additions and 2 deletions

View file

@ -431,7 +431,7 @@ void updateAvatar(float frametime) {
AgentList *agentList = AgentList::getInstance();
if (agentList->getOwnerID() >= 0) {
if (agentList->getOwnerID() != UNKNOWN_AGENT_ID) {
// if I know my ID, send head/hand data to the avatar mixer and voxel server
unsigned char broadcastString[200];
unsigned char* endOfBroadcastStringWrite = broadcastString;

View file

@ -64,7 +64,7 @@ AgentList::AgentList(char newOwnerType, unsigned int newSocketListenPort) :
agentSocket(newSocketListenPort),
_ownerType(newOwnerType),
socketListenPort(newSocketListenPort),
_ownerID(-1),
_ownerID(UNKNOWN_AGENT_ID),
lastAgentId(0) {
pthread_mutex_init(&mutex, 0);
}

View file

@ -31,6 +31,8 @@ extern char DOMAIN_HOSTNAME[];
extern char DOMAIN_IP[100]; // IP Address will be re-set by lookup on startup
extern const int DOMAINSERVER_PORT;
const int UNKNOWN_AGENT_ID = -1;
class AgentListIterator;
class AgentList {