mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-08 06:32:35 +02:00
Found the problem we were having: the domain server was reporting back all
kinds of things as our ID.
This commit is contained in:
parent
19180ad900
commit
ccd61ee5a2
2 changed files with 18 additions and 21 deletions
|
@ -135,25 +135,26 @@ int main(int argc, const char * argv[])
|
|||
if (numInterestTypes > 0) {
|
||||
// if the agent has sent no types of interest, assume they want nothing but their own ID back
|
||||
for (AgentList::iterator agent = agentList->begin(); agent != agentList->end(); agent++) {
|
||||
if (!agent->matches((sockaddr*) &agentPublicAddress, (sockaddr*) &agentLocalAddress, agentType)
|
||||
&& memchr(agentTypesOfInterest, agent->getType(), numInterestTypes)) {
|
||||
// this is not the agent themselves
|
||||
// and this is an agent of a type in the passed agent types of interest
|
||||
// or the agent did not pass us any specific types they are interested in
|
||||
if (!agent->matches((sockaddr*) &agentPublicAddress, (sockaddr*) &agentLocalAddress, agentType)) {
|
||||
if (memchr(agentTypesOfInterest, agent->getType(), numInterestTypes)) {
|
||||
// this is not the agent themselves
|
||||
// and this is an agent of a type in the passed agent types of interest
|
||||
// or the agent did not pass us any specific types they are interested in
|
||||
|
||||
if (memchr(SOLO_AGENT_TYPES, agent->getType(), sizeof(SOLO_AGENT_TYPES)) == NULL) {
|
||||
// this is an agent of which there can be multiple, just add them to the packet
|
||||
// don't send avatar agents to other avatars, that will come from avatar mixer
|
||||
if (agentType != AGENT_TYPE_AVATAR || agent->getType() != AGENT_TYPE_AVATAR) {
|
||||
currentBufferPos = addAgentToBroadcastPacket(currentBufferPos, &(*agent));
|
||||
}
|
||||
if (memchr(SOLO_AGENT_TYPES, agent->getType(), sizeof(SOLO_AGENT_TYPES)) == NULL) {
|
||||
// this is an agent of which there can be multiple, just add them to the packet
|
||||
// don't send avatar agents to other avatars, that will come from avatar mixer
|
||||
if (agentType != AGENT_TYPE_AVATAR || agent->getType() != AGENT_TYPE_AVATAR) {
|
||||
currentBufferPos = addAgentToBroadcastPacket(currentBufferPos, &(*agent));
|
||||
}
|
||||
|
||||
} else {
|
||||
// solo agent, we need to only send newest
|
||||
if (newestSoloAgents[agent->getType()] == NULL ||
|
||||
newestSoloAgents[agent->getType()]->getWakeMicrostamp() < agent->getWakeMicrostamp()) {
|
||||
// we have to set the newer solo agent to add it to the broadcast later
|
||||
newestSoloAgents[agent->getType()] = &(*agent);
|
||||
} else {
|
||||
// solo agent, we need to only send newest
|
||||
if (newestSoloAgents[agent->getType()] == NULL ||
|
||||
newestSoloAgents[agent->getType()]->getWakeMicrostamp() < agent->getWakeMicrostamp()) {
|
||||
// we have to set the newer solo agent to add it to the broadcast later
|
||||
newestSoloAgents[agent->getType()] = &(*agent);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -827,8 +827,6 @@ void Application::terminate() {
|
|||
static void sendAvatarVoxelURLMessage(const QUrl& url) {
|
||||
uint16_t ownerID = AgentList::getInstance()->getOwnerID();
|
||||
|
||||
qDebug() << "me" << ownerID << url;
|
||||
|
||||
if (ownerID == UNKNOWN_AGENT_ID) {
|
||||
return; // we don't yet know who we are
|
||||
}
|
||||
|
@ -850,8 +848,6 @@ static void processAvatarVoxelURLMessage(unsigned char *packetData, size_t dataB
|
|||
packetData += sizeof(agentID);
|
||||
dataBytes -= sizeof(agentID);
|
||||
|
||||
qDebug() << "them" << agentID << QUrl::fromEncoded(QByteArray((char*)packetData, dataBytes));
|
||||
|
||||
// make sure the agent exists
|
||||
Agent* agent = AgentList::getInstance()->agentWithID(agentID);
|
||||
if (!agent || !agent->getLinkedData()) {
|
||||
|
|
Loading…
Reference in a new issue