[Orxonox-commit 4945] r9614 - code/branches/formationupdate/src/orxonox/worldentities/pawns
maxima at orxonox.net
maxima at orxonox.net
Tue Apr 9 16:02:46 CEST 2013
Author: maxima
Date: 2013-04-09 16:02:46 +0200 (Tue, 09 Apr 2013)
New Revision: 9614
Modified:
code/branches/formationupdate/src/orxonox/worldentities/pawns/Pawn.cc
Log:
Only a few comments
Modified: code/branches/formationupdate/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- code/branches/formationupdate/src/orxonox/worldentities/pawns/Pawn.cc 2013-04-09 13:49:06 UTC (rev 9613)
+++ code/branches/formationupdate/src/orxonox/worldentities/pawns/Pawn.cc 2013-04-09 14:02:46 UTC (rev 9614)
@@ -307,13 +307,12 @@
}
}
- // Two functions to find the slaves of a Pawn
+
+ /* Two functions to find the slaves of a Pawn
+ *
+ */
bool Pawn::hasSlaves()
{
- /* TEST TEST This is used to find out if the current pawn is also
- * the master of the formation and to find his slaves.
- *
- */
for (ObjectList<FormationController>::iterator it =
ObjectList<FormationController>::begin();
it != ObjectList<FormationController>::end(); ++it )
@@ -326,7 +325,6 @@
}
}
return false;
- /* TEST TEST */
}
Controller* Pawn::getSlave(){
@@ -357,18 +355,21 @@
if (this->getPlayer() && this->getPlayer()->getControllableEntity() == this)
{
- if(this->hasSlaves())
+ /* Do different things if Pawn is the Master of a Formation
+ * Doesn't work yet
+ *
+ * if(this->hasSlaves())
{
// start to control a slave
this->getPlayer()->startControl(this->getSlave()->getControllableEntity());
- }
+ }*/
this->getPlayer()->stopControl();
}
- /*if (GameMode::isMaster())
+ if (GameMode::isMaster())
{
// this->deathEffect();
this->goWithStyle();
- }*/
+ }
}
}
void Pawn::goWithStyle()
More information about the Orxonox-commit
mailing list