[Orxonox-commit 3994] r8668 - in code/branches/presentation/src/orxonox: controllers interfaces worldentities/pawns
landauf at orxonox.net
landauf at orxonox.net
Sun May 29 19:15:43 CEST 2011
Author: landauf
Date: 2011-05-29 19:15:43 +0200 (Sun, 29 May 2011)
New Revision: 8668
Modified:
code/branches/presentation/src/orxonox/controllers/Controller.h
code/branches/presentation/src/orxonox/interfaces/InterfaceCompilation.cc
code/branches/presentation/src/orxonox/interfaces/PlayerTrigger.h
code/branches/presentation/src/orxonox/worldentities/pawns/SpaceShip.cc
Log:
small cleanup
Modified: code/branches/presentation/src/orxonox/controllers/Controller.h
===================================================================
--- code/branches/presentation/src/orxonox/controllers/Controller.h 2011-05-29 16:44:45 UTC (rev 8667)
+++ code/branches/presentation/src/orxonox/controllers/Controller.h 2011-05-29 17:15:43 UTC (rev 8668)
@@ -49,7 +49,7 @@
inline PlayerInfo* getPlayer() const
{ return this->player_; }
- virtual inline void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage) {};
+ virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage) {};
/* Override needed for different visual effects (e.g. in "NewHumanController.cc") depending on
the DIFFERENT AMOUNT OF DAMAGE done to the shield and to the health of "victim" (see Projectile.cc, Pawn.cc)
Modified: code/branches/presentation/src/orxonox/interfaces/InterfaceCompilation.cc
===================================================================
--- code/branches/presentation/src/orxonox/interfaces/InterfaceCompilation.cc 2011-05-29 16:44:45 UTC (rev 8667)
+++ code/branches/presentation/src/orxonox/interfaces/InterfaceCompilation.cc 2011-05-29 17:15:43 UTC (rev 8668)
@@ -41,6 +41,9 @@
#include "core/CoreIncludes.h"
+#include "infos/PlayerInfo.h"
+#include "worldentities/pawns/Pawn.h"
+
namespace orxonox
{
//----------------------------
@@ -61,6 +64,14 @@
this->isForPlayer_ = false;
}
+ void PlayerTrigger::setTriggeringPawn(Pawn* pawn)
+ {
+ assert(pawn);
+ this->pawn_ = WeakPtr<Pawn>(pawn);
+ if (pawn)
+ this->player_ = WeakPtr<PlayerInfo>(pawn->getPlayer());
+ }
+
//----------------------------
// RadarListener
//----------------------------
Modified: code/branches/presentation/src/orxonox/interfaces/PlayerTrigger.h
===================================================================
--- code/branches/presentation/src/orxonox/interfaces/PlayerTrigger.h 2011-05-29 16:44:45 UTC (rev 8667)
+++ code/branches/presentation/src/orxonox/interfaces/PlayerTrigger.h 2011-05-29 17:15:43 UTC (rev 8668)
@@ -39,9 +39,6 @@
#include "core/OrxonoxClass.h"
-#include "infos/PlayerInfo.h"
-#include "worldentities/pawns/Pawn.h"
-
namespace orxonox
{
/**
@@ -85,8 +82,7 @@
@brief Set the player that triggered the PlayerTrigger. This is normally done by classes inheriting vom PlayerTrigger.
@param player A pointer to the Pawn that triggered the PlayerTrigger.
*/
- inline void setTriggeringPawn(Pawn* pawn)
- { assert(pawn); this->player_ = WeakPtr<PlayerInfo>(pawn->getPlayer()); this->pawn_ = WeakPtr<Pawn>(pawn); }
+ void setTriggeringPawn(Pawn* pawn);
/**
@brief Set whether the PlayerTrigger normally is triggered by Pawns.
Modified: code/branches/presentation/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/branches/presentation/src/orxonox/worldentities/pawns/SpaceShip.cc 2011-05-29 16:44:45 UTC (rev 8667)
+++ code/branches/presentation/src/orxonox/worldentities/pawns/SpaceShip.cc 2011-05-29 17:15:43 UTC (rev 8668)
@@ -244,7 +244,7 @@
Pawn::rotateYaw(value);
- //This function call adds a lift to the ship when it is rotating to make it's movement more "realistic" and enhance the feeling.
+ //This function call adds a lift to the ship when it is rotating to make it's movement more "realistic" and enhance the feeling.
if (abs(this-> getLocalVelocity().z) < stallSpeed_) {this->moveRightLeft(-lift_ / 5 * value * sqrt(abs(this-> getLocalVelocity().z)));}
}
@@ -254,7 +254,7 @@
Pawn::rotatePitch(value);
- //This function call adds a lift to the ship when it is pitching to make it's movement more "realistic" and enhance the feeling.
+ //This function call adds a lift to the ship when it is pitching to make it's movement more "realistic" and enhance the feeling.
if (abs(this-> getLocalVelocity().z) < stallSpeed_) {this->moveUpDown(lift_ / 5 * value * sqrt(abs(this-> getLocalVelocity().z)));}
}
More information about the Orxonox-commit
mailing list