mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 16:36:54 +02:00
send head data to VS for level differentiation, remove the VS add callback
This commit is contained in:
parent
2c701c8e69
commit
bb47967126
2 changed files with 3 additions and 6 deletions
|
@ -24,13 +24,11 @@ pthread_mutex_t vectorChangeMutex = PTHREAD_MUTEX_INITIALIZER;
|
||||||
AgentList::AgentList() : agentSocket(AGENT_SOCKET_LISTEN_PORT) {
|
AgentList::AgentList() : agentSocket(AGENT_SOCKET_LISTEN_PORT) {
|
||||||
linkedDataCreateCallback = NULL;
|
linkedDataCreateCallback = NULL;
|
||||||
audioMixerSocketUpdate = NULL;
|
audioMixerSocketUpdate = NULL;
|
||||||
voxelServerAddCallback = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AgentList::AgentList(int socketListenPort) : agentSocket(socketListenPort) {
|
AgentList::AgentList(int socketListenPort) : agentSocket(socketListenPort) {
|
||||||
linkedDataCreateCallback = NULL;
|
linkedDataCreateCallback = NULL;
|
||||||
audioMixerSocketUpdate = NULL;
|
audioMixerSocketUpdate = NULL;
|
||||||
voxelServerAddCallback = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AgentList::~AgentList() {
|
AgentList::~AgentList() {
|
||||||
|
@ -158,8 +156,8 @@ bool AgentList::addOrUpdateAgent(sockaddr *publicSocket, sockaddr *localSocket,
|
||||||
// to use the local socket information the domain server gave us
|
// to use the local socket information the domain server gave us
|
||||||
sockaddr_in *localSocketIn = (sockaddr_in *)localSocket;
|
sockaddr_in *localSocketIn = (sockaddr_in *)localSocket;
|
||||||
audioMixerSocketUpdate(localSocketIn->sin_addr.s_addr, localSocketIn->sin_port);
|
audioMixerSocketUpdate(localSocketIn->sin_addr.s_addr, localSocketIn->sin_port);
|
||||||
} else if (newAgent.getType() == 'V' && voxelServerAddCallback != NULL) {
|
} else if (newAgent.getType() == 'V') {
|
||||||
voxelServerAddCallback(localSocket);
|
newAgent.activateLocalSocket();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << "Added agent - " << &newAgent << "\n";
|
std::cout << "Added agent - " << &newAgent << "\n";
|
||||||
|
@ -186,7 +184,7 @@ void AgentList::broadcastToAgents(char *broadcastData, size_t dataBytes) {
|
||||||
for(std::vector<Agent>::iterator agent = agents.begin(); agent != agents.end(); agent++) {
|
for(std::vector<Agent>::iterator agent = agents.begin(); agent != agents.end(); agent++) {
|
||||||
// for now assume we only want to send to other interface clients
|
// for now assume we only want to send to other interface clients
|
||||||
// until the Audio class uses the AgentList
|
// until the Audio class uses the AgentList
|
||||||
if (agent->getActiveSocket() != NULL && agent->getType() == 'I') {
|
if (agent->getActiveSocket() != NULL && (agent->getType() == 'I' || agent->getType() == 'V')) {
|
||||||
// we know which socket is good for this agent, send there
|
// we know which socket is good for this agent, send there
|
||||||
agentSocket.send(agent->getActiveSocket(), broadcastData, dataBytes);
|
agentSocket.send(agent->getActiveSocket(), broadcastData, dataBytes);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,6 @@ class AgentList {
|
||||||
|
|
||||||
void(*linkedDataCreateCallback)(Agent *);
|
void(*linkedDataCreateCallback)(Agent *);
|
||||||
void(*audioMixerSocketUpdate)(in_addr_t, in_port_t);
|
void(*audioMixerSocketUpdate)(in_addr_t, in_port_t);
|
||||||
void(*voxelServerAddCallback)(sockaddr *);
|
|
||||||
|
|
||||||
std::vector<Agent>& getAgents();
|
std::vector<Agent>& getAgents();
|
||||||
UDPSocket& getAgentSocket();
|
UDPSocket& getAgentSocket();
|
||||||
|
|
Loading…
Reference in a new issue