Index: orxonox/trunk/src/lib/coord/p_node.cc
===================================================================
--- orxonox/trunk/src/lib/coord/p_node.cc	(revision 3799)
+++ orxonox/trunk/src/lib/coord/p_node.cc	(revision 3800)
@@ -29,8 +29,4 @@
 #include "null_parent.h"
 
-#ifdef __unix__
- #include <glib-2.0/glib/gmacros.h>
-#endif
-
 //#include "vector.h"
 //#include "quaternion.h"
@@ -64,13 +60,10 @@
 
   *this->absCoordinate = *absCoordinate;
-#ifdef __unix__
-  if ( G_UNLIKELY(parent != NULL))
-#else 
-  if ( parent != NULL)
-#endif
-    {
-      *this->relCoordinate = *this->absCoordinate - parent->getAbsCoor ();
-      parent->addChild (this);
-    }
+
+  __LIKELY_IF(parent != NULL)
+  {
+    *this->relCoordinate = *this->absCoordinate - parent->getAbsCoor ();
+    parent->addChild (this);
+  }
   else 
     this->relCoordinate = new Vector(0,0,0);
@@ -252,9 +245,6 @@
 void PNode::shiftCoor (Vector* shift)
 {
-#ifdef __unix__
-  if( G_UNLIKELY(this->bAbsCoorChanged))
-#else
-  if( this->bAbsCoorChanged)
-#endif
+
+  __UNLIKELY_IF( this->bAbsCoorChanged)
     {
       *this->absCoordinate = *this->absCoordinate + *shift;
@@ -291,9 +281,6 @@
 void PNode::shiftCoor (Vector shift)
 {
-#ifdef __unix__
-  if( G_UNLIKELY(this->bAbsCoorChanged))
-#else
-  if( this->bAbsCoorChanged)
-#endif
+
+  __UNLIKELY_IF( this->bAbsCoorChanged)
     {
       *this->absCoordinate = *this->absCoordinate + shift;
@@ -437,9 +424,5 @@
 float PNode::getSpeed()
 {
-#ifdef __unix__
-  if( G_UNLIKELY(this->time == 0))
-#else
-  if(this->time == 0)
-#endif
+  __UNLIKELY_IF( this->time == 0)
     return 1000;
   Vector diff;
@@ -471,5 +454,6 @@
 void PNode::addChild (PNode* pNode, int parentingMode)
 {
-  if( pNode->parent != NULL )
+
+  __UNLIKELY_IF( pNode->parent != NULL)
     {
       PRINTF(3)("PNode::addChild() - reparenting node: removing it and adding it again\n");
@@ -585,20 +569,25 @@
   this->time = dt;
   PRINTF(4)("PNode::update - %s - (%f, %f, %f)\n", this->objectName, this->absCoordinate->x, this->absCoordinate->y, this->absCoordinate->z);
-  if(this->mode & PNODE_MOVEMENT )
-    {
-      if( this->bAbsCoorChanged /*&& this->timeStamp != DataTank::timeStamp*/)
+
+
+  __LIKELY_IF( this->mode & PNODE_MOVEMENT)
+    {
+      __UNLIKELY_IF(this->bAbsCoorChanged /*&& this->timeStamp != DataTank::timeStamp*/)
 	{
 	  /* if you have set the absolute coordinates this overrides all other changes */
 	  *this->relCoordinate = *this->absCoordinate - parent->getAbsCoor ();
 	}
-      else if( this->bRelCoorChanged /*&& this->timeStamp != DataTank::timeStamp*/)
+      __LIKELY_IF(this->bRelCoorChanged /*&& this->timeStamp != DataTank::timeStamp*/)
+
 	{
 	  /*this is bad style... must be deleted later - just for testing*/
-	  if( this->parent == NULL)
+
+	  /*
+	  __UNLIKELY_IF( this->parent == NULL)
 	    {
 	      *this->absCoordinate = *this->relCoordinate;
 	    }
-	  else
-	    *this->absCoordinate = parent->getAbsCoor() + *this->relCoordinate;	      /* update the current absCoordinate */
+	    else */
+	  *this->absCoordinate = parent->getAbsCoor() + *this->relCoordinate;	      /* update the current absCoordinate */
 	}
     }
@@ -606,10 +595,10 @@
   if( this->mode & PNODE_LOCAL_ROTATE)
     {
-      if( this->bAbsDirChanged /*&& this->timeStamp != DataTank::timeStamp*/)
+      __UNLIKELY_IF( this->bAbsDirChanged /*&& this->timeStamp != DataTank::timeStamp*/)
 	{
 	  /* if you have set the absolute coordinates this overrides all other changes */
 	  *this->relDirection = *this->absDirection - parent->getAbsDir();
 	}
-      else if( this->bRelDirChanged /*&& this->timeStamp != DataTank::timeStamp*/)
+      else __LIKELY_IF( this->bRelDirChanged /*&& this->timeStamp != DataTank::timeStamp*/)
 	{
 	  /* update the current absDirection - remember * means rotation around sth.*/
@@ -620,16 +609,16 @@
   if( this->mode & PNODE_ROTATE_MOVEMENT)
     {
-      if( this->bAbsCoorChanged /*&& this->timeStamp != DataTank::timeStamp*/)
+      __UNLIKELY_IF( this->bAbsCoorChanged /*&& this->timeStamp != DataTank::timeStamp*/)
 	{
 	  /* if you have set the absolute coordinates this overrides all other changes */
 	  *this->relCoordinate = *this->absCoordinate - parent->getAbsCoor ();
 	}
-      else if( this->bRelCoorChanged /*&& this->timeStamp != DataTank::timeStamp*/)
+      else __LIKELY_IF( this->bRelCoorChanged /*&& this->timeStamp != DataTank::timeStamp*/)
 	{
 	  /*this is bad style... must be deleted later - just for testing*/
-	  if( this->parent == NULL)
+	  /*if( this->parent == NULL)
 	    *this->absCoordinate = *this->relCoordinate;
-	  else
-	    *this->absCoordinate = parent->getAbsCoor() + parent->getAbsDir().apply(*this->relCoordinate);	      /* update the current absCoordinate */
+	    else*/
+	  *this->absCoordinate = parent->getAbsCoor() + parent->getAbsDir().apply(*this->relCoordinate);	      /* update the current absCoordinate */
 	}
     }
@@ -642,7 +631,7 @@
     { 
       /* if this node has changed, make sure, that all children are updated also */
-      if( this->bRelCoorChanged || this->bAbsCoorChanged)
+      __LIKELY_IF( this->bRelCoorChanged || this->bAbsCoorChanged)
 	pn->parentCoorChanged ();
-      if( this->bRelDirChanged || this->bAbsDirChanged)
+      __LIKELY_IF( this->bRelDirChanged || this->bAbsDirChanged)
 	pn->parentDirChanged ();
 
