repair indentation and NULL comparisons in Avatar class

This commit is contained in:
Stephen Birarda 2013-06-06 16:01:36 -07:00
parent b40af0f02b
commit bd553ef061

View file

@ -90,9 +90,7 @@ _mouseRayDirection(0.0f, 0.0f, 0.0f),
_interactingOther(NULL),
_isMouseTurningRight(false),
_voxels(this)
{
// give the pointer to our head to inherited _headData variable from AvatarData
_headData = &_head;
@ -659,7 +657,7 @@ void Avatar::updateHandMovementAndTouching(float deltaTime) {
//loop through all the other avatars for potential interactions...
AgentList* agentList = AgentList::getInstance();
for (AgentList::iterator agent = agentList->begin(); agent != agentList->end(); agent++) {
if (agent->getLinkedData() != NULL && agent->getType() == AGENT_TYPE_AVATAR) {
if (agent->getLinkedData() && agent->getType() == AGENT_TYPE_AVATAR) {
Avatar *otherAvatar = (Avatar *)agent->getLinkedData();
// test whether shoulders are close enough to allow for reaching to touch hands
@ -828,7 +826,7 @@ void Avatar::updateAvatarCollisions(float deltaTime) {
// loop through all the other avatars for potential interactions...
AgentList* agentList = AgentList::getInstance();
for (AgentList::iterator agent = agentList->begin(); agent != agentList->end(); agent++) {
if (agent->getLinkedData() != NULL && agent->getType() == AGENT_TYPE_AVATAR) {
if (agent->getLinkedData() && agent->getType() == AGENT_TYPE_AVATAR) {
Avatar *otherAvatar = (Avatar *)agent->getLinkedData();
// check if the bounding spheres of the two avatars are colliding