Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Jeffrey Ventrella 2013-04-17 17:50:08 -07:00
commit de3de7b878
3 changed files with 5 additions and 3 deletions

View file

@ -25,7 +25,7 @@ int packFloatAngleToTwoByte(unsigned char* buffer, float angle) {
}
int unpackFloatAngleFromTwoByte(uint16_t* byteAnglePointer, float* destinationPointer) {
*destinationPointer = (*byteAnglePointer / std::numeric_limits<uint16_t>::max()) * 360.0 - 180;
*destinationPointer = (*byteAnglePointer / (float) std::numeric_limits<uint16_t>::max()) * 360.0 - 180;
return sizeof(uint16_t);
}
@ -83,6 +83,9 @@ void AvatarData::parseData(unsigned char* sourceBuffer, int numBytes) {
memcpy(&_handPosition, sourceBuffer, sizeof(float) * 3);
sourceBuffer += sizeof(float) * 3;
//std::cout << _bodyPosition.x << ", " << _bodyPosition.y << ", " << _bodyPosition.z << "\n";
}
glm::vec3 AvatarData::getBodyPosition() {

View file

@ -71,7 +71,6 @@ Agent::Agent(const Agent &otherAgent) {
}
Agent& Agent::operator=(Agent otherAgent) {
std::cout << "Agent swap constructor called on resize?\n";
swap(*this, otherAgent);
return *this;
}

View file

@ -107,7 +107,7 @@ void AgentList::processBulkAgentData(sockaddr *senderAddress, unsigned char *pac
bulkSendAgent->setLastRecvTimeUsecs(usecTimestampNow());
}
unsigned char *startPosition = (unsigned char *)packetData;
unsigned char *startPosition = packetData;
unsigned char *currentPosition = startPosition + 1;
unsigned char packetHolder[numBytesPerAgent + 1];