mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-17 22:08:27 +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) {
|
||||
linkedDataCreateCallback = NULL;
|
||||
audioMixerSocketUpdate = NULL;
|
||||
voxelServerAddCallback = NULL;
|
||||
}
|
||||
|
||||
AgentList::AgentList(int socketListenPort) : agentSocket(socketListenPort) {
|
||||
linkedDataCreateCallback = NULL;
|
||||
audioMixerSocketUpdate = NULL;
|
||||
voxelServerAddCallback = NULL;
|
||||
}
|
||||
|
||||
AgentList::~AgentList() {
|
||||
|
@ -158,8 +156,8 @@ bool AgentList::addOrUpdateAgent(sockaddr *publicSocket, sockaddr *localSocket,
|
|||
// to use the local socket information the domain server gave us
|
||||
sockaddr_in *localSocketIn = (sockaddr_in *)localSocket;
|
||||
audioMixerSocketUpdate(localSocketIn->sin_addr.s_addr, localSocketIn->sin_port);
|
||||
} else if (newAgent.getType() == 'V' && voxelServerAddCallback != NULL) {
|
||||
voxelServerAddCallback(localSocket);
|
||||
} else if (newAgent.getType() == 'V') {
|
||||
newAgent.activateLocalSocket();
|
||||
}
|
||||
|
||||
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 now assume we only want to send to other interface clients
|
||||
// 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
|
||||
agentSocket.send(agent->getActiveSocket(), broadcastData, dataBytes);
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ class AgentList {
|
|||
|
||||
void(*linkedDataCreateCallback)(Agent *);
|
||||
void(*audioMixerSocketUpdate)(in_addr_t, in_port_t);
|
||||
void(*voxelServerAddCallback)(sockaddr *);
|
||||
|
||||
std::vector<Agent>& getAgents();
|
||||
UDPSocket& getAgentSocket();
|
||||
|
|
Loading…
Reference in a new issue