mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 15:17:42 +02:00
some spacing issues, conversions from const char to char *
This commit is contained in:
parent
11a317da96
commit
4f576ba86f
2 changed files with 9 additions and 9 deletions
|
@ -534,13 +534,13 @@ void simulateHead(float frametime)
|
||||||
|
|
||||||
// Send my stream of head/hand data to the avatar mixer and voxel server
|
// Send my stream of head/hand data to the avatar mixer and voxel server
|
||||||
char broadcastString[200];
|
char broadcastString[200];
|
||||||
int broadcastBytes = myHead.getBroadcastData(broadcast_string);
|
int broadcastBytes = myHead.getBroadcastData(broadcastString);
|
||||||
|
|
||||||
char broadcastReceivers[2];
|
char broadcastReceivers[2];
|
||||||
*broadcastReceivers = AGENT_TYPE_VOXEL;
|
*broadcastReceivers = AGENT_TYPE_VOXEL;
|
||||||
*(broadcastReceivers + 1) = AGENT_TYPE_AVATAR_MIXER;
|
*(broadcastReceivers + 1) = AGENT_TYPE_AVATAR_MIXER;
|
||||||
|
|
||||||
agentList.broadcastToAgents(broadcast_string, broadcast_bytes, broadcastReceivers);
|
agentList.broadcastToAgents(broadcastString, broadcastBytes, broadcastReceivers);
|
||||||
|
|
||||||
// If I'm in paint mode, send a voxel out to VOXEL server agents.
|
// If I'm in paint mode, send a voxel out to VOXEL server agents.
|
||||||
if (::paintOn) {
|
if (::paintOn) {
|
||||||
|
@ -559,8 +559,8 @@ void simulateHead(float frametime)
|
||||||
::paintingVoxel.y >= 0.0 && ::paintingVoxel.y <= 1.0 &&
|
::paintingVoxel.y >= 0.0 && ::paintingVoxel.y <= 1.0 &&
|
||||||
::paintingVoxel.z >= 0.0 && ::paintingVoxel.z <= 1.0) {
|
::paintingVoxel.z >= 0.0 && ::paintingVoxel.z <= 1.0) {
|
||||||
|
|
||||||
if (createVoxelEditMessage(PACKET_HEADER_SET_VOXEL,0,1,&::paintingVoxel,bufferOut,sizeOut)){
|
if (createVoxelEditMessage(PACKET_HEADER_SET_VOXEL, 0, 1, &::paintingVoxel, bufferOut, sizeOut)){
|
||||||
agentList.broadcastToAgents((char*)bufferOut, sizeOut, AGENT_TYPE_VOXEL);
|
agentList.broadcastToAgents((char*)bufferOut, sizeOut, &AGENT_TYPE_VOXEL);
|
||||||
delete bufferOut;
|
delete bufferOut;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -812,15 +812,15 @@ void testPointToVoxel()
|
||||||
void sendVoxelServerEraseAll() {
|
void sendVoxelServerEraseAll() {
|
||||||
char message[100];
|
char message[100];
|
||||||
sprintf(message,"%c%s",'Z',"erase all");
|
sprintf(message,"%c%s",'Z',"erase all");
|
||||||
int messageSize = strlen(message)+1;
|
int messageSize = strlen(message) + 1;
|
||||||
::agentList.broadcastToAgents(message, messageSize, AGENT_TYPE_VOXEL);
|
::agentList.broadcastToAgents(message, messageSize, &AGENT_TYPE_VOXEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sendVoxelServerAddScene() {
|
void sendVoxelServerAddScene() {
|
||||||
char message[100];
|
char message[100];
|
||||||
sprintf(message,"%c%s",'Z',"add scene");
|
sprintf(message,"%c%s",'Z',"add scene");
|
||||||
int messageSize = strlen(message)+1;
|
int messageSize = strlen(message) + 1;
|
||||||
::agentList.broadcastToAgents(message, messageSize, AGENT_TYPE_VOXEL);
|
::agentList.broadcastToAgents(message, messageSize, &AGENT_TYPE_VOXEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void shiftPaintingColor()
|
void shiftPaintingColor()
|
||||||
|
|
|
@ -229,7 +229,7 @@ bool AgentList::addOrUpdateAgent(sockaddr *publicSocket, sockaddr *localSocket,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AgentList::broadcastToAgents(char *broadcastData, size_t dataBytes,const char* agentTypes) {
|
void AgentList::broadcastToAgents(char *broadcastData, size_t dataBytes, const char* agentTypes) {
|
||||||
for(std::vector<Agent>::iterator agent = agents.begin(); agent != agents.end(); agent++) {
|
for(std::vector<Agent>::iterator agent = agents.begin(); agent != agents.end(); agent++) {
|
||||||
// only send to the AgentTypes we are asked to send to.
|
// only send to the AgentTypes we are asked to send to.
|
||||||
if (agent->getActiveSocket() != NULL && strchr(agentTypes,agent->getType())) {
|
if (agent->getActiveSocket() != NULL && strchr(agentTypes,agent->getType())) {
|
||||||
|
|
Loading…
Reference in a new issue