[Orxonox-commit 5282] r9945 - in code/trunk/src: libraries/util modules/docking modules/gametypes modules/invader modules/objects modules/overlays/hud modules/pong modules/tetris modules/weapons/weaponmodes orxonox/gametypes orxonox/infos orxonox/sound orxonox/worldentities/pawns

landauf at orxonox.net landauf at orxonox.net
Fri Jan 3 13:50:22 CET 2014


Author: landauf
Date: 2014-01-03 13:50:22 +0100 (Fri, 03 Jan 2014)
New Revision: 9945

Modified:
   code/trunk/src/libraries/util/Math.cc
   code/trunk/src/modules/docking/Dock.cc
   code/trunk/src/modules/docking/MoveToDockingTarget.cc
   code/trunk/src/modules/gametypes/SpaceRaceController.cc
   code/trunk/src/modules/invader/InvaderWeaponEnemy.cc
   code/trunk/src/modules/objects/ForceField.cc
   code/trunk/src/modules/objects/Turret.cc
   code/trunk/src/modules/overlays/hud/HUDRadar.cc
   code/trunk/src/modules/overlays/hud/HUDRadar.h
   code/trunk/src/modules/pong/PongBall.cc
   code/trunk/src/modules/tetris/TetrisBrick.cc
   code/trunk/src/modules/tetris/TetrisScore.cc
   code/trunk/src/modules/weapons/weaponmodes/HsW01.cc
   code/trunk/src/modules/weapons/weaponmodes/HsW01.h
   code/trunk/src/orxonox/gametypes/Dynamicmatch.cc
   code/trunk/src/orxonox/infos/PlayerInfo.cc
   code/trunk/src/orxonox/sound/WorldAmbientSound.cc
   code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
Log:
replaced tabs with spaces. no changes in code

Modified: code/trunk/src/libraries/util/Math.cc
===================================================================
--- code/trunk/src/libraries/util/Math.cc	2014-01-03 12:29:33 UTC (rev 9944)
+++ code/trunk/src/libraries/util/Math.cc	2014-01-03 12:50:22 UTC (rev 9945)
@@ -203,28 +203,28 @@
     */
     orxonox::Vector2 get3DProjection(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition, const float mapangle, const float detectionlimit)
     {
-    	// Orxonox Vectors: x_direction you are looking, y_direction points up, z_direction points to the right
-    	orxonox::Vector3 distance = otherposition - myposition;	// get vector from Ship to object
+        // Orxonox Vectors: x_direction you are looking, y_direction points up, z_direction points to the right
+        orxonox::Vector3 distance = otherposition - myposition; // get vector from Ship to object
 
-    	// new coordinate system:	x_axsis:	mydirection		(points front)
-    	//							y_axsis:	myorthonormal	(points up)
-    	//							z_axsis:	myside			(points right)
+        // new coordinate system: x_axsis: mydirection   (points front)
+        //                        y_axsis: myorthonormal (points up)
+        //                        z_axsis: myside        (points right)
 
-    	orxonox::Vector3 myside = mydirection.crossProduct(myorthonormal); // get 3. base vector
+        orxonox::Vector3 myside = mydirection.crossProduct(myorthonormal); // get 3. base vector
 
-    	distance = 4*distance / detectionlimit; // shrink vector on map
-    	if(distance.length() > 1.0f) // if object would wander outside of the map
-    	    	{
-    	    	distance = distance / distance.length();
-    	   		}
+        distance = 4*distance / detectionlimit; // shrink vector on map
+        if(distance.length() > 1.0f) // if object would wander outside of the map
+        {
+            distance = distance / distance.length();
+        }
 
-    	// perform a coordinate transformation to get distance in relation of the position of the ship
-    	orxonox::Vector3 distanceShip = getTransformedVector(distance, mydirection, myorthonormal, myside);
+        // perform a coordinate transformation to get distance in relation of the position of the ship
+        orxonox::Vector3 distanceShip = getTransformedVector(distance, mydirection, myorthonormal, myside);
 
-    	// calculate 2D vector on the map (with angle between x/z - plain and line of sight)
-    	float xcoordinate = distanceShip.z; // z; cause x direction on screen is to the right side
-    	float ycoordinate = distanceShip.x*sin(mapangle)+distanceShip.y*cos(mapangle);
-    	return orxonox::Vector2(xcoordinate , ycoordinate);
+        // calculate 2D vector on the map (with angle between x/z - plain and line of sight)
+        float xcoordinate = distanceShip.z; // z; cause x direction on screen is to the right side
+        float ycoordinate = distanceShip.x*sin(mapangle)+distanceShip.y*cos(mapangle);
+        return orxonox::Vector2(xcoordinate , ycoordinate);
     }
 
     /**
@@ -242,49 +242,49 @@
     */
     bool isObjectHigherThanShipOnMap(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition, const float mapangle)
     {
-    	// Orxonox Vectors: x_direction you are looking, y_direction points up, z_direction points to the right
-    	orxonox::Vector3 distance = otherposition - myposition;
+        // Orxonox Vectors: x_direction you are looking, y_direction points up, z_direction points to the right
+        orxonox::Vector3 distance = otherposition - myposition;
 
-    	// new coordinate system:	x_axsis:	mydirection		(points front)
-    	//							y_axsis:	myorthonormal	(points up)
-       	//							z_axsis:	myside			(points right)
+        // new coordinate system: x_axsis: mydirection   (points front)
+        //                        y_axsis: myorthonormal (points up)
+        //                        z_axsis: myside        (points right)
 
-       	orxonox::Vector3 myside = mydirection.crossProduct(myorthonormal); // get vector from Ship to object
+        orxonox::Vector3 myside = mydirection.crossProduct(myorthonormal); // get vector from Ship to object
 
 
-       	// perform a coordinate transformation to get distance in relation of the position of the ship
-       	orxonox::Vector3 distanceShip = getTransformedVector(distance, mydirection, myorthonormal, myside);
+        // perform a coordinate transformation to get distance in relation of the position of the ship
+        orxonox::Vector3 distanceShip = getTransformedVector(distance, mydirection, myorthonormal, myside);
 
-       	if(distanceShip.y >= 0)
-       		return true;
-       	else
-       		return false;
+        if(distanceShip.y >= 0)
+            return true;
+        else
+            return false;
     }
 
     /**
                    @brief A value between 0 and 10, in order how other object is in front or in back
                    @param myposition My position
-               	   @param mydirection My viewing direction
-               	   @param myorthonormal My orthonormalvector (pointing upwards through my head)
-               	   @param otherposition The position of the other object
-               	   @param detectionlimit The limit in which objects are shown on the map
+                   @param mydirection My viewing direction
+                   @param myorthonormal My orthonormalvector (pointing upwards through my head)
+                   @param otherposition The position of the other object
+                   @param detectionlimit The limit in which objects are shown on the map
                    @return value between 0 and 100
     */
     int determineMap3DZOrder(const orxonox::Vector3& myposition, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& otherposition, const float detectionlimit)
     {
-    	orxonox::Vector3 distance = otherposition - myposition;	// get vector from Ship to object
-    	orxonox::Vector3 myside = mydirection.crossProduct(myorthonormal); 	// get vector to the side
+        orxonox::Vector3 distance = otherposition - myposition; // get vector from Ship to object
+        orxonox::Vector3 myside = mydirection.crossProduct(myorthonormal); // get vector to the side
 
-    	distance = 4*distance / detectionlimit; // shrink vector on map
-    	if(distance.length() > 1.0f) // if object would wander outside of the map
-    	{
-    		distance = distance / distance.length();
-    	}
+        distance = 4*distance / detectionlimit; // shrink vector on map
+        if(distance.length() > 1.0f) // if object would wander outside of the map
+        {
+            distance = distance / distance.length();
+        }
 
-    	// perform a coordinate transformation to get distance in relation of the position of the ship
-       	orxonox::Vector3 distanceShip = getTransformedVector(distance, mydirection, myorthonormal, myside);
+        // perform a coordinate transformation to get distance in relation of the position of the ship
+        orxonox::Vector3 distanceShip = getTransformedVector(distance, mydirection, myorthonormal, myside);
 
-       	return (int) 50 - 100*distanceShip.x;
+        return (int) 50 - 100*distanceShip.x;
     }
 
 
@@ -299,43 +299,43 @@
                 x is vector in old coordinates
                 y is vector in old coordinates
                 T is transform matrix with:
-                	T = (t1 , t2 , t3)
-                	t1 = mydirection
-                	t2 = myorthonormal
-                	t3 = myside
+                    T = (t1 , t2 , t3)
+                    t1 = mydirection
+                    t2 = myorthonormal
+                    t3 = myside
 
                 y = T^(-1)*x
             */
     orxonox::Vector3 getTransformedVector(const orxonox::Vector3& distance, const orxonox::Vector3& mydirection, const orxonox::Vector3& myorthonormal, const orxonox::Vector3& myside)
     {
-    	// inverse of the transform matrix
-    	float determinant = +mydirection.x * (myorthonormal.y*myside.z - myside.y*myorthonormal.z)
-    						-mydirection.y * (myorthonormal.x*myside.z - myorthonormal.z*myside.x)
-    						+mydirection.z * (myorthonormal.x*myside.y - myorthonormal.y*myside.x);
-    	float invdet = 1/determinant;
+        // inverse of the transform matrix
+        float determinant = +mydirection.x * (myorthonormal.y*myside.z - myside.y*myorthonormal.z)
+                            -mydirection.y * (myorthonormal.x*myside.z - myorthonormal.z*myside.x)
+                            +mydirection.z * (myorthonormal.x*myside.y - myorthonormal.y*myside.x);
+        float invdet = 1/determinant;
 
-    	// transform matrix
-    	orxonox::Vector3 xinvtransform;
-    	orxonox::Vector3 yinvtransform;
-    	orxonox::Vector3 zinvtransform;
+        // transform matrix
+        orxonox::Vector3 xinvtransform;
+        orxonox::Vector3 yinvtransform;
+        orxonox::Vector3 zinvtransform;
 
-    	xinvtransform.x = (myorthonormal.y * myside.z        - myside.y        * myorthonormal.z)*invdet;
-    	xinvtransform.y = (mydirection.z   * myside.y        - mydirection.y   * myside.z       )*invdet;
-    	xinvtransform.z = (mydirection.y   * myorthonormal.z - mydirection.z   * myorthonormal.y)*invdet;
-    	yinvtransform.x = (myorthonormal.z * myside.x        - myorthonormal.x * myside.z       )*invdet;
-    	yinvtransform.y = (mydirection.x   * myside.z        - mydirection.z   * myside.x       )*invdet;
-    	yinvtransform.z = (myorthonormal.x * mydirection.z   - mydirection.x   * myorthonormal.z)*invdet;
-    	zinvtransform.x = (myorthonormal.x * myside.y        - myside.x        * myorthonormal.y)*invdet;
-    	zinvtransform.y = (myside.x        * mydirection.y   - mydirection.x   * myside.y       )*invdet;
-    	zinvtransform.z = (mydirection.x   * myorthonormal.y - myorthonormal.x * mydirection.y  )*invdet;
+        xinvtransform.x = (myorthonormal.y * myside.z        - myside.y        * myorthonormal.z)*invdet;
+        xinvtransform.y = (mydirection.z   * myside.y        - mydirection.y   * myside.z       )*invdet;
+        xinvtransform.z = (mydirection.y   * myorthonormal.z - mydirection.z   * myorthonormal.y)*invdet;
+        yinvtransform.x = (myorthonormal.z * myside.x        - myorthonormal.x * myside.z       )*invdet;
+        yinvtransform.y = (mydirection.x   * myside.z        - mydirection.z   * myside.x       )*invdet;
+        yinvtransform.z = (myorthonormal.x * mydirection.z   - mydirection.x   * myorthonormal.z)*invdet;
+        zinvtransform.x = (myorthonormal.x * myside.y        - myside.x        * myorthonormal.y)*invdet;
+        zinvtransform.y = (myside.x        * mydirection.y   - mydirection.x   * myside.y       )*invdet;
+        zinvtransform.z = (mydirection.x   * myorthonormal.y - myorthonormal.x * mydirection.y  )*invdet;
 
-    	// coordinate transformation
-    	orxonox::Vector3 distanceShip;
-    	distanceShip.x = xinvtransform.x * distance.x + yinvtransform.x * distance.y + zinvtransform.x * distance.z;
-    	distanceShip.y = xinvtransform.y * distance.x + yinvtransform.y * distance.y + zinvtransform.y * distance.z;
-    	distanceShip.z = xinvtransform.z * distance.x + yinvtransform.z * distance.y + zinvtransform.z * distance.z;
+        // coordinate transformation
+        orxonox::Vector3 distanceShip;
+        distanceShip.x = xinvtransform.x * distance.x + yinvtransform.x * distance.y + zinvtransform.x * distance.z;
+        distanceShip.y = xinvtransform.y * distance.x + yinvtransform.y * distance.y + zinvtransform.y * distance.z;
+        distanceShip.z = xinvtransform.z * distance.x + yinvtransform.z * distance.y + zinvtransform.z * distance.z;
 
-    	return distanceShip;
+        return distanceShip;
     }
 
     /**

Modified: code/trunk/src/modules/docking/Dock.cc
===================================================================
--- code/trunk/src/modules/docking/Dock.cc	2014-01-03 12:29:33 UTC (rev 9944)
+++ code/trunk/src/modules/docking/Dock.cc	2014-01-03 12:50:22 UTC (rev 9945)
@@ -85,44 +85,44 @@
     bool Dock::undocking(bool bTriggered, BaseObject* trigger)
     {
 
-    	PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger);
-    	PlayerInfo* player = NULL;
+        PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger);
+        PlayerInfo* player = NULL;
 
-    	// Check whether it is a player trigger and extract pawn from it
-    	if(pTrigger != NULL)
-    	{
-    	      if(!pTrigger->isForPlayer()) {  // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one.
-    	      orxout(verbose, context::docking) << "Docking:execute PlayerTrigger was not triggered by a player.." << endl;
-    	      return false;
-    	      }
-    	      player = pTrigger->getTriggeringPlayer();
-    	}
-    	else
-    	{
-    	      orxout(verbose, context::docking) << "Docking::execute Not a player trigger, can't extract pawn from it.." << endl;
-    	      return false;
-    	}
-    	if(player == NULL)
-    	{
-    	      orxout(verbose, context::docking) << "Docking::execute Can't retrieve PlayerInfo from Trigger. (" << trigger->getIdentifier()->getName() << ")" << endl;
-    	      return false;
-    	}
+        // Check whether it is a player trigger and extract pawn from it
+        if(pTrigger != NULL)
+        {
+            if(!pTrigger->isForPlayer()) {  // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one.
+            orxout(verbose, context::docking) << "Docking:execute PlayerTrigger was not triggered by a player.." << endl;
+            return false;
+            }
+            player = pTrigger->getTriggeringPlayer();
+        }
+        else
+        {
+            orxout(verbose, context::docking) << "Docking::execute Not a player trigger, can't extract pawn from it.." << endl;
+            return false;
+        }
+        if(player == NULL)
+        {
+            orxout(verbose, context::docking) << "Docking::execute Can't retrieve PlayerInfo from Trigger. (" << trigger->getIdentifier()->getName() << ")" << endl;
+            return false;
+        }
 
- 	    if(bTriggered)
-    	{
-    	      // Add player to this Docks candidates
-    	      candidates_.insert(player);
+        if(bTriggered)
+        {
+            // Add player to this Docks candidates
+            candidates_.insert(player);
 
-    	      // Show docking dialog
-    	      this->showUndockingDialogHelper(player);
-    	}
-    	else
-    	{
-    	      // Remove player from candidates list
-    	      candidates_.erase(player);
-    	}
+            // Show docking dialog
+            this->showUndockingDialogHelper(player);
+        }
+        else
+        {
+            // Remove player from candidates list
+            candidates_.erase(player);
+        }
 
-    	return true;
+        return true;
     }
 
 

Modified: code/trunk/src/modules/docking/MoveToDockingTarget.cc
===================================================================
--- code/trunk/src/modules/docking/MoveToDockingTarget.cc	2014-01-03 12:29:33 UTC (rev 9944)
+++ code/trunk/src/modules/docking/MoveToDockingTarget.cc	2014-01-03 12:50:22 UTC (rev 9945)
@@ -65,11 +65,11 @@
     bool MoveToDockingTarget::release(PlayerInfo *player)
     {
         //TODO: Investigate strange things...
-    	//this->parent_->detach((WorldEntity*)player->getControllableEntity());
+        //this->parent_->detach((WorldEntity*)player->getControllableEntity());
 
-    	//TODO: Check the issue with this detach call.
-    	//I have removed the line because the detach call only caused a warning and terminated. And because I didn't find a attach call either.
-    	//Didn't find the need for the line.
+        //TODO: Check the issue with this detach call.
+        //I have removed the line because the detach call only caused a warning and terminated. And because I didn't find a attach call either.
+        //Didn't find the need for the line.
         this->parent_->undockingAnimationFinished(player);
         return true;
     }

Modified: code/trunk/src/modules/gametypes/SpaceRaceController.cc
===================================================================
--- code/trunk/src/modules/gametypes/SpaceRaceController.cc	2014-01-03 12:29:33 UTC (rev 9944)
+++ code/trunk/src/modules/gametypes/SpaceRaceController.cc	2014-01-03 12:50:22 UTC (rev 9945)
@@ -463,31 +463,31 @@
 
                 currentShape->getBoundingSphere(positionObject,radiusObject);
                 Vector3 positionObjectNonBT(positionObject.x(), positionObject.y(), positionObject.z());
-				Vector3 norm_r_CP = cP1ToCP2.crossProduct(centerCP1-positionObjectNonBT);
+                Vector3 norm_r_CP = cP1ToCP2.crossProduct(centerCP1-positionObjectNonBT);
 
-				if(norm_r_CP.length() == 0){
-					Vector3 zufall;
+                if(norm_r_CP.length() == 0){
+                    Vector3 zufall;
                     do{
                         zufall=Vector3(rnd(),rnd(),rnd());//random
                     }while((zufall.crossProduct(cP1ToCP2)).length() == 0);
-					norm_r_CP=zufall.crossProduct(cP1ToCP2);
-				}
-				Vector3 VecToVCP = norm_r_CP.crossProduct(cP1ToCP2);
-				float distanzToCP1 = sqrt(powf(radiusObject,4)/(powf((centerCP1-positionObjectNonBT).length(), 2)-powf(radiusObject,2))+powf(radiusObject,2));
-				float distanzToCP2 = sqrt(powf(radiusObject,4)/(powf((racepoint2->getPosition()-positionObjectNonBT).length(), 2)-powf(radiusObject,2))+powf(radiusObject,2));
+                    norm_r_CP=zufall.crossProduct(cP1ToCP2);
+                }
+                Vector3 VecToVCP = norm_r_CP.crossProduct(cP1ToCP2);
+                float distanzToCP1 = sqrt(powf(radiusObject,4)/(powf((centerCP1-positionObjectNonBT).length(), 2)-powf(radiusObject,2))+powf(radiusObject,2));
+                float distanzToCP2 = sqrt(powf(radiusObject,4)/(powf((racepoint2->getPosition()-positionObjectNonBT).length(), 2)-powf(radiusObject,2))+powf(radiusObject,2));
                 float distanz = std::max(distanzToCP1,distanzToCP2);
-				//float distanz = 0.0f; //TEMPORARY
-				Vector3 newCheckpointPositionPos = positionObjectNonBT+(distanz*VecToVCP)/VecToVCP.length();
-				Vector3 newCheckpointPositionNeg = positionObjectNonBT-(distanz*VecToVCP)/VecToVCP.length();
-				if((newCheckpointPositionPos - centerCP1).length() + (newCheckpointPositionPos - (centerCP1+cP1ToCP2)).length() < (newCheckpointPositionNeg - centerCP1).length() + (newCheckpointPositionNeg - (centerCP1+cP1ToCP2)).length() )
-				{
-					RaceCheckPoint* newVirtualCheckpoint = addVirtualCheckPoint(racepoint1,racepoint2->getCheckpointIndex(), newCheckpointPositionPos);
-				}
-				else
-				{
-					RaceCheckPoint* newVirtualCheckpoint = addVirtualCheckPoint(racepoint1,racepoint2->getCheckpointIndex(), newCheckpointPositionNeg);
-				}
-				return;
+                //float distanz = 0.0f; //TEMPORARY
+                Vector3 newCheckpointPositionPos = positionObjectNonBT+(distanz*VecToVCP)/VecToVCP.length();
+                Vector3 newCheckpointPositionNeg = positionObjectNonBT-(distanz*VecToVCP)/VecToVCP.length();
+                if((newCheckpointPositionPos - centerCP1).length() + (newCheckpointPositionPos - (centerCP1+cP1ToCP2)).length() < (newCheckpointPositionNeg - centerCP1).length() + (newCheckpointPositionNeg - (centerCP1+cP1ToCP2)).length() )
+                {
+                    RaceCheckPoint* newVirtualCheckpoint = addVirtualCheckPoint(racepoint1,racepoint2->getCheckpointIndex(), newCheckpointPositionPos);
+                }
+                else
+                {
+                    RaceCheckPoint* newVirtualCheckpoint = addVirtualCheckPoint(racepoint1,racepoint2->getCheckpointIndex(), newCheckpointPositionNeg);
+                }
+                return;
             }
         }
 

Modified: code/trunk/src/modules/invader/InvaderWeaponEnemy.cc
===================================================================
--- code/trunk/src/modules/invader/InvaderWeaponEnemy.cc	2014-01-03 12:29:33 UTC (rev 9944)
+++ code/trunk/src/modules/invader/InvaderWeaponEnemy.cc	2014-01-03 12:50:22 UTC (rev 9945)
@@ -44,7 +44,7 @@
 
     void InvaderWeaponEnemy::shot()
     {
-    	InvaderWeapon::shot();
+        InvaderWeapon::shot();
         // SUPER(InvaderWeaponEnemy, shot);
         // only shoot in foreward direction
         projectile->setVelocity(Vector3(1, 0, 0) * 300);

Modified: code/trunk/src/modules/objects/ForceField.cc
===================================================================
--- code/trunk/src/modules/objects/ForceField.cc	2014-01-03 12:29:33 UTC (rev 9944)
+++ code/trunk/src/modules/objects/ForceField.cc	2014-01-03 12:50:22 UTC (rev 9945)
@@ -202,18 +202,18 @@
         }
         else if(this->mode_ == forceFieldMode::homogen)
         {
-        	// Iterate over all objects that could possibly be affected by the ForceField.
-        	for (ObjectList<MobileEntity>::iterator it = ObjectList<MobileEntity>::begin(); it != ObjectList<MobileEntity>::end(); ++it)
-        	{
-        		Vector3 distanceVector = it->getWorldPosition() - this->getWorldPosition();
-        	    float distance = distanceVector.length();
-        	    if (distance < this->radius_ && distance > this->massRadius_)
-        	    {
-        	    	// Add a Acceleration in forceDirection_.
-        	    	// Vector3(0,0,0) is the direction, where the force should work.
-        	    	it->addAcceleration(forceDirection_ , Vector3(0,0,0));
-        	    }
-        	}
+            // Iterate over all objects that could possibly be affected by the ForceField.
+            for (ObjectList<MobileEntity>::iterator it = ObjectList<MobileEntity>::begin(); it != ObjectList<MobileEntity>::end(); ++it)
+            {
+                Vector3 distanceVector = it->getWorldPosition() - this->getWorldPosition();
+                float distance = distanceVector.length();
+                if (distance < this->radius_ && distance > this->massRadius_)
+                {
+                    // Add a Acceleration in forceDirection_.
+                    // Vector3(0,0,0) is the direction, where the force should work.
+                    it->addAcceleration(forceDirection_ , Vector3(0,0,0));
+                }
+            }
         }
     }
 

Modified: code/trunk/src/modules/objects/Turret.cc
===================================================================
--- code/trunk/src/modules/objects/Turret.cc	2014-01-03 12:29:33 UTC (rev 9944)
+++ code/trunk/src/modules/objects/Turret.cc	2014-01-03 12:50:22 UTC (rev 9945)
@@ -56,23 +56,23 @@
 
     void Turret::rotatePitch(const Vector2& value)
     {
-    	orxout()<< "Turret rotate Pitch"<< endl;
+        orxout()<< "Turret rotate Pitch"<< endl;
 
-    	const Quaternion& orient = this->getOrientation();
-    	Radian pitch = orient.getPitch();
+        const Quaternion& orient = this->getOrientation();
+        Radian pitch = orient.getPitch();
 
-    	if((value.x > 0 && pitch < Radian(180)) || (value.x < 0 && pitch > Radian(0)))
-    		SpaceShip::rotatePitch(value);
+        if((value.x > 0 && pitch < Radian(180)) || (value.x < 0 && pitch > Radian(0)))
+            SpaceShip::rotatePitch(value);
     }
 
 
     void Turret::setAlertnessRadius(float value)
     {
-    	this->controller_->setAlertnessRadius(value);
+        this->controller_->setAlertnessRadius(value);
     }
     float Turret::getAlertnessRadius()
     {
-    	return this->controller_->getAlertnessRadius();
+        return this->controller_->getAlertnessRadius();
     }
 
     void Turret::XMLPort(Element& xmlelement, XMLPort::Mode mode)

Modified: code/trunk/src/modules/overlays/hud/HUDRadar.cc
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDRadar.cc	2014-01-03 12:29:33 UTC (rev 9944)
+++ code/trunk/src/modules/overlays/hud/HUDRadar.cc	2014-01-03 12:50:22 UTC (rev 9945)
@@ -70,13 +70,13 @@
         this->owner_ = 0;
 
         this->map3DFront_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
-        	.createOverlayElement("Panel", "HUDRadar_mapDreiDFront_" + getUniqueNumberString()));
+            .createOverlayElement("Panel", "HUDRadar_mapDreiDFront_" + getUniqueNumberString()));
         this->map3DFront_->setMaterialName("Orxonox/Radar3DFront");
         this->overlay_->add2D(this->map3DFront_);
         this->map3DFront_->hide();
 
         this->map3DBack_ = static_cast<Ogre::PanelOverlayElement*>(Ogre::OverlayManager::getSingleton()
-        	.createOverlayElement("Panel", "HUDRadar_mapDreiDBack_" + getUniqueNumberString()));
+            .createOverlayElement("Panel", "HUDRadar_mapDreiDBack_" + getUniqueNumberString()));
         this->map3DBack_->setMaterialName("Orxonox/Radar3DBack");
         this->overlay_->add2D(this->map3DBack_);
         this->map3DBack_->hide();
@@ -188,17 +188,17 @@
 
         if(RadarMode_)
         {
-        	this->setBackgroundMaterial(material3D_);
-        	this->map3DFront_->_notifyZOrder(this->overlay_->getZOrder() * 100 + 250); // it seems that the ZOrder of overlayelements is 100 times the ZOrder of the overlay
-        	this->map3DBack_->_notifyZOrder(this->overlay_->getZOrder() * 100 - 250); // 250 a little bit buffer so that the two shels are displayed all in the front / in the back
-        	this->map3DFront_->show();
-        	this->map3DBack_->show();
+            this->setBackgroundMaterial(material3D_);
+            this->map3DFront_->_notifyZOrder(this->overlay_->getZOrder() * 100 + 250); // it seems that the ZOrder of overlayelements is 100 times the ZOrder of the overlay
+            this->map3DBack_->_notifyZOrder(this->overlay_->getZOrder() * 100 - 250); // 250 a little bit buffer so that the two shels are displayed all in the front / in the back
+            this->map3DFront_->show();
+            this->map3DBack_->show();
         }
         else
         {
-        	this->setBackgroundMaterial(material2D_);
-        	this->map3DFront_->hide();
-        	this->map3DBack_->hide();
+            this->setBackgroundMaterial(material2D_);
+            this->map3DFront_->hide();
+            this->map3DBack_->hide();
         }
 
         for( it = this->radarObjects_.begin(); it != this->radarObjects_.end(); ++it )
@@ -217,9 +217,9 @@
 
             float size;
             if(RadarMode_)
-            	size = maximumDotSize3D_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance) * it->first->getRadarObjectScale();
+                size = maximumDotSize3D_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance) * it->first->getRadarObjectScale();
             else
-            	size = maximumDotSize_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance) * it->first->getRadarObjectScale();
+                size = maximumDotSize_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance) * it->first->getRadarObjectScale();
             it->second->setDimensions(size, size);
 
             // calc position on radar...
@@ -227,19 +227,19 @@
 
             if(RadarMode_)
             {
-            	coord = get3DProjection(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition(), 0.6435011, detectionLimit_);
+                coord = get3DProjection(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition(), 0.6435011, detectionLimit_);
 
-            	// set zOrder on screen
-            	bool overXZPlain = isObjectHigherThanShipOnMap(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition(), this->mapAngle_);
+                // set zOrder on screen
+                bool overXZPlain = isObjectHigherThanShipOnMap(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition(), this->mapAngle_);
 
-            	int zOrder = determineMap3DZOrder(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition(), detectionLimit_);
-            	if(overXZPlain == false /*&& (it->second->getZOrder() >  100 * this->overlay_->getZOrder())*/) // it appears that zOrder of attached Overlayelements is 100 times the zOrder of the Overlay
-            		it->second->_notifyZOrder(this->overlay_->getZOrder() * 100 - 70 + zOrder);
-            	if(overXZPlain == true /*&& (it->second->getZOrder() <= 100 * this->overlay_->getZOrder())*/)
-            		it->second->_notifyZOrder(this->overlay_->getZOrder() * 100 + 70 + zOrder);
+                int zOrder = determineMap3DZOrder(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition(), detectionLimit_);
+                if(overXZPlain == false /*&& (it->second->getZOrder() >  100 * this->overlay_->getZOrder())*/) // it appears that zOrder of attached Overlayelements is 100 times the zOrder of the Overlay
+                    it->second->_notifyZOrder(this->overlay_->getZOrder() * 100 - 70 + zOrder);
+                if(overXZPlain == true /*&& (it->second->getZOrder() <= 100 * this->overlay_->getZOrder())*/)
+                    it->second->_notifyZOrder(this->overlay_->getZOrder() * 100 + 70 + zOrder);
             }
             else
-            	coord = get2DViewcoordinates(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition());
+                coord = get2DViewcoordinates(this->owner_->getPosition(), this->owner_->getOrientation() * WorldEntity::FRONT, this->owner_->getOrientation() * WorldEntity::UP, wePointer->getWorldPosition());
 
             coord *= math::pi / 3.5f; // small adjustment to make it fit the texture
             it->second->setPosition((1.0f + coord.x - size) * 0.5f, (1.0f - coord.y - size) * 0.5f);
@@ -255,7 +255,7 @@
                 this->marker_->setDimensions(size * 1.5f, size * 1.5f);
                 this->marker_->setPosition((1.0f + coord.x - size * 1.5f) * 0.5f, (1.0f - coord.y - size * 1.5f) * 0.5f);
                 if(RadarMode_)
-                	this->marker_->_notifyZOrder(it->second->getZOrder() -1);
+                    this->marker_->_notifyZOrder(it->second->getZOrder() -1);
                 this->marker_->show();
             }
         }

Modified: code/trunk/src/modules/overlays/hud/HUDRadar.h
===================================================================
--- code/trunk/src/modules/overlays/hud/HUDRadar.h	2014-01-03 12:29:33 UTC (rev 9944)
+++ code/trunk/src/modules/overlays/hud/HUDRadar.h	2014-01-03 12:50:22 UTC (rev 9945)
@@ -110,8 +110,8 @@
         float maximumDotSize3D_;
         float mapAngle_;
 
-        std::string material2D_;		//Material name for 2D map
-        std::string material3D_;		//Material names For the 3D minimap
+        std::string material2D_;        //Material name for 2D map
+        std::string material3D_;        //Material names For the 3D minimap
         std::string material3DFront_;
         std::string material3DBack_;
 

Modified: code/trunk/src/modules/pong/PongBall.cc
===================================================================
--- code/trunk/src/modules/pong/PongBall.cc	2014-01-03 12:29:33 UTC (rev 9944)
+++ code/trunk/src/modules/pong/PongBall.cc	2014-01-03 12:50:22 UTC (rev 9945)
@@ -146,7 +146,7 @@
         if (position.z > this->fieldHeight_ / 2 || position.z < -this->fieldHeight_ / 2)
         {
             defBoundarySound_->play(); //play boundary sound
-        	// Its velocity in z-direction is inverted (i.e. it bounces off).
+            // Its velocity in z-direction is inverted (i.e. it bounces off).
             velocity.z = -velocity.z;
             // And its position is set as to not overstep the boundary it has just crossed.
             if (position.z > this->fieldHeight_ / 2)
@@ -172,7 +172,7 @@
                     if (fabs(distance) <= 1) // If the bat is there to parry.
                     {
                         defBatSound_->play(); //play bat sound
-                    	// Set the ball to be exactly at the boundary.
+                        // Set the ball to be exactly at the boundary.
                         position.x = this->fieldWidth_ / 2;
                         // Invert its velocity in x-direction (i.e. it bounces off).
                         velocity.x = -velocity.x;
@@ -185,7 +185,7 @@
                     // If the left player scores.
                     else if (GameMode::isMaster() && position.x > this->fieldWidth_ / 2 * (1 + this->relMercyOffset_))
                     {
-                    	defScoreSound_->play();//play score sound
+                        defScoreSound_->play();//play score sound
                         if (this->getGametype() && this->bat_[0])
                         {
                             this->getGametype()->playerScored(this->bat_[0]->getPlayer());
@@ -201,7 +201,7 @@
                     if (fabs(distance) <= 1) // If the bat is there to parry.
                     {
                         defBatSound_->play(); //play bat sound
-                    	// Set the ball to be exactly at the boundary.
+                        // Set the ball to be exactly at the boundary.
                         position.x = -this->fieldWidth_ / 2;
                         // Invert its velocity in x-direction (i.e. it bounces off).
                         velocity.x = -velocity.x;
@@ -214,7 +214,7 @@
                     // If the right player scores.
                     else if (GameMode::isMaster() && position.x < -this->fieldWidth_ / 2 * (1 + this->relMercyOffset_))
                     {
-                    	defScoreSound_->play();//play score sound
+                        defScoreSound_->play();//play score sound
                         if (this->getGametype() && this->bat_[1])
                         {
                             this->getGametype()->playerScored(this->bat_[1]->getPlayer());

Modified: code/trunk/src/modules/tetris/TetrisBrick.cc
===================================================================
--- code/trunk/src/modules/tetris/TetrisBrick.cc	2014-01-03 12:29:33 UTC (rev 9944)
+++ code/trunk/src/modules/tetris/TetrisBrick.cc	2014-01-03 12:50:22 UTC (rev 9945)
@@ -86,7 +86,7 @@
                 if(this->tetris_->getCenterpoint() != NULL)
                     stone->addTemplate(this->tetris_->getCenterpoint()->getStoneTemplate());
                 else
-                	orxout()<< "tetris_->getCenterpoint == NULL in TetrisBrick.cc"<< endl;
+                    orxout()<< "tetris_->getCenterpoint == NULL in TetrisBrick.cc"<< endl;
             }
             else
                 orxout()<< "tetris_ == NULL in TetrisBrick.cc"<< endl;
@@ -115,52 +115,52 @@
         {
             if(this->shapeIndex_ == 1 || this->shapeIndex_ == 6 || this->shapeIndex_ == 7)
             {
-            	stone->setPosition(0.0f, 2*size_, 0.0f);
+                stone->setPosition(0.0f, 2*size_, 0.0f);
             }
             else if(this->shapeIndex_ == 3 || this->shapeIndex_ == 4|| this->shapeIndex_ == 5)
             {
-            	stone->setPosition(size_, 0, 0.0f);
+                stone->setPosition(size_, 0, 0.0f);
             }
             else if(this->shapeIndex_ == 2)
             {
-            	stone->setPosition(-size_, 0, 0.0f);
+                stone->setPosition(-size_, 0, 0.0f);
             }
         }
         else if(i == 3)
         {
             if(this->shapeIndex_ == 2 || this->shapeIndex_ == 5)
             {
-            	stone->setPosition(size_, size_, 0.0f);
+                stone->setPosition(size_, size_, 0.0f);
             }
             else if(this->shapeIndex_ == 1)
             {
-            	stone->setPosition(0, 3*size_, 0.0f);
+                stone->setPosition(0, 3*size_, 0.0f);
             }
             else if(this->shapeIndex_ == 3 || this->shapeIndex_ == 7)
             {
-            	stone->setPosition(-size_, 0, 0.0f);
+                stone->setPosition(-size_, 0, 0.0f);
             }
             else if(this->shapeIndex_ == 4)
             {
-            	stone->setPosition(-size_, size_, 0.0f);
+                stone->setPosition(-size_, size_, 0.0f);
             }
             else if(this->shapeIndex_ == 6)
             {
-            	stone->setPosition(size_, 0, 0.0f);
+                stone->setPosition(size_, 0, 0.0f);
             }
         }
     }
 
     bool TetrisBrick::isValidMove(const Vector3& position, bool isRotation = false)
     {
-    	return this->tetris_->isValidMove(this,position, isRotation);
+        return this->tetris_->isValidMove(this,position, isRotation);
     }
 
     TetrisStone* TetrisBrick::getStone(unsigned int i)
     {
-    	if(i < this->brickStones_.size())
+        if(i < this->brickStones_.size())
             return this->brickStones_[i];
-    	else return NULL;
+        else return NULL;
     }
 
 
@@ -191,8 +191,8 @@
         }
         else if(!this->lockRotation_) //rotate when key up is pressed
         {
-        	if(!isValidMove(this->getPosition(), true)) //catch illegal rotations
-        	    return;
+            if(!isValidMove(this->getPosition(), true)) //catch illegal rotations
+                return;
             this->lockRotation_ = true; // multiple calls of this function have to be filtered out.
             this->rotationTimer_.setTimer(0.1f, false, createExecutor(createFunctor(&TetrisBrick::unlockRotation, this)));
             Quaternion q(Degree(90), Vector3::UNIT_Z);

Modified: code/trunk/src/modules/tetris/TetrisScore.cc
===================================================================
--- code/trunk/src/modules/tetris/TetrisScore.cc	2014-01-03 12:29:33 UTC (rev 9944)
+++ code/trunk/src/modules/tetris/TetrisScore.cc	2014-01-03 12:50:22 UTC (rev 9945)
@@ -91,7 +91,7 @@
         if (this->owner_ != NULL)
         {
             std::string score("0");
-	        if(!this->owner_->hasEnded())
+            if(!this->owner_->hasEnded())
             {
                 //get the player
                 player_ = this->owner_->getPlayer();

Modified: code/trunk/src/modules/weapons/weaponmodes/HsW01.cc
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/HsW01.cc	2014-01-03 12:29:33 UTC (rev 9944)
+++ code/trunk/src/modules/weapons/weaponmodes/HsW01.cc	2014-01-03 12:50:22 UTC (rev 9945)
@@ -81,7 +81,7 @@
         XMLPortParam(HsW01, "delay", setDelay, getDelay, xmlelement, mode);
         XMLPortParam(HsW01, "material", setMaterial, getMaterial, xmlelement, mode);
         XMLPortParam(HsW01, "projectileMesh", setMesh, getMesh, xmlelement, mode);
-	XMLPortParam(HsW01, "sound", setSound, getSound, xmlelement, mode);
+        XMLPortParam(HsW01, "sound", setSound, getSound, xmlelement, mode);
     }
 
     /**

Modified: code/trunk/src/modules/weapons/weaponmodes/HsW01.h
===================================================================
--- code/trunk/src/modules/weapons/weaponmodes/HsW01.h	2014-01-03 12:29:33 UTC (rev 9944)
+++ code/trunk/src/modules/weapons/weaponmodes/HsW01.h	2014-01-03 12:50:22 UTC (rev 9945)
@@ -73,14 +73,14 @@
             const std::string& getMesh() const
                 { return this->mesh_; }
 
-	    /**
+            /**
             @brief Set the sound.
             @param mesh The Sound name.
             */
             void setSound(const std::string& sound)
                 { this->sound_ = sound; }
 
-	    /**
+            /**
             @brief Get the sound.
             @return Returns the sound name.
             */

Modified: code/trunk/src/orxonox/gametypes/Dynamicmatch.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/Dynamicmatch.cc	2014-01-03 12:29:33 UTC (rev 9944)
+++ code/trunk/src/orxonox/gametypes/Dynamicmatch.cc	2014-01-03 12:50:22 UTC (rev 9945)
@@ -275,7 +275,7 @@
             //Case: friendly fire
             else if (friendlyfire && (source == target))
             {
-           	    this->playerScored(originator->getPlayer(), -1);
+                this->playerScored(originator->getPlayer(), -1);
             }
         }
         return false; //default: no damage
@@ -291,7 +291,7 @@
         {
             if (playerParty_[originator->getPlayer()] == killer) //reward the killer
             {
-           	    this->playerScored(originator->getPlayer(), 25);
+                this->playerScored(originator->getPlayer(), 25);
             }
             return true;
         }
@@ -411,7 +411,7 @@
         {
             if (it->second==piggy)//Spieler mit der Pig-party frags++
             {
-            	 this->playerScored(it->first);
+                 this->playerScored(it->first);
             }
         }
     }

Modified: code/trunk/src/orxonox/infos/PlayerInfo.cc
===================================================================
--- code/trunk/src/orxonox/infos/PlayerInfo.cc	2014-01-03 12:29:33 UTC (rev 9944)
+++ code/trunk/src/orxonox/infos/PlayerInfo.cc	2014-01-03 12:50:22 UTC (rev 9945)
@@ -231,8 +231,8 @@
         Controller* tmp =this->controllableEntity_->getController();
         if (tmp == NULL)
         {
-        	orxout(verbose) <<  "PlayerInfo: pauseControl, Controller is NULL " << endl;
-        	return;
+            orxout(verbose) <<  "PlayerInfo: pauseControl, Controller is NULL " << endl;
+            return;
         }
         tmp->setActive(false);
         //this->controllableEntity_->getController()->setControllableEntity(NULL);

Modified: code/trunk/src/orxonox/sound/WorldAmbientSound.cc
===================================================================
--- code/trunk/src/orxonox/sound/WorldAmbientSound.cc	2014-01-03 12:29:33 UTC (rev 9944)
+++ code/trunk/src/orxonox/sound/WorldAmbientSound.cc	2014-01-03 12:50:22 UTC (rev 9945)
@@ -38,7 +38,7 @@
 
 namespace orxonox
 {
-	SetConsoleCommand("WorldAmbientSound", "nextsong",      &WorldAmbientSound::nextSong);
+    SetConsoleCommand("WorldAmbientSound", "nextsong",      &WorldAmbientSound::nextSong);
 
     RegisterClass(WorldAmbientSound);
 
@@ -112,14 +112,14 @@
     void WorldAmbientSound::nextSong()
     {
 
-    	//HACK: Assuption - there is only one WorldAmbientSound in a level and only one level is used.
-    	for (ObjectList<WorldAmbientSound>::iterator it = ObjectList<WorldAmbientSound>::begin();
-    	     it != ObjectList<WorldAmbientSound>::end(); ++it)
-    	{
-    		while(it->ambientSound_->setAmbientSource(WorldAmbientSound::soundList_[WorldAmbientSound::soundNumber_]) == false){
-    			WorldAmbientSound::soundNumber_ = (WorldAmbientSound::soundNumber_ + 1) % WorldAmbientSound::soundList_.size();
-    		}
-    		WorldAmbientSound::soundNumber_ = (WorldAmbientSound::soundNumber_ + 1) % WorldAmbientSound::soundList_.size();
-    	}
+        //HACK: Assuption - there is only one WorldAmbientSound in a level and only one level is used.
+        for (ObjectList<WorldAmbientSound>::iterator it = ObjectList<WorldAmbientSound>::begin();
+             it != ObjectList<WorldAmbientSound>::end(); ++it)
+        {
+            while(it->ambientSound_->setAmbientSource(WorldAmbientSound::soundList_[WorldAmbientSound::soundNumber_]) == false){
+                WorldAmbientSound::soundNumber_ = (WorldAmbientSound::soundNumber_ + 1) % WorldAmbientSound::soundList_.size();
+            }
+            WorldAmbientSound::soundNumber_ = (WorldAmbientSound::soundNumber_ + 1) % WorldAmbientSound::soundList_.size();
+        }
     }
 }

Modified: code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/Pawn.cc	2014-01-03 12:29:33 UTC (rev 9944)
+++ code/trunk/src/orxonox/worldentities/pawns/Pawn.cc	2014-01-03 12:50:22 UTC (rev 9945)
@@ -304,7 +304,7 @@
 
     void Pawn::kill()
     {
-    	this->damage(this->health_);
+        this->damage(this->health_);
         this->death();
     }
 
@@ -329,7 +329,7 @@
         if (this->getGametype() && this->getGametype()->allowPawnDeath(this, this->lastHitOriginator_))
         {
             explosionSound_->play();
-        	// Set bAlive_ to false and wait for PawnManager to do the destruction
+            // Set bAlive_ to false and wait for PawnManager to do the destruction
             this->bAlive_ = false;
 
             this->setDestroyWhenPlayerLeft(false);




More information about the Orxonox-commit mailing list