[Orxonox-commit 2897] r7600 - in code/branches/lastmanstanding: data/levels src/orxonox/gametypes
jo at orxonox.net
jo at orxonox.net
Thu Oct 28 23:53:27 CEST 2010
Author: jo
Date: 2010-10-28 23:53:27 +0200 (Thu, 28 Oct 2010)
New Revision: 7600
Modified:
code/branches/lastmanstanding/data/levels/gametype_lastmanstanding.oxw
code/branches/lastmanstanding/src/orxonox/gametypes/LastManStanding.cc
Log:
New functionality successfully added. No bugs found so far. Only the delaytimer is running a little bit too fast.
Modified: code/branches/lastmanstanding/data/levels/gametype_lastmanstanding.oxw
===================================================================
--- code/branches/lastmanstanding/data/levels/gametype_lastmanstanding.oxw 2010-10-28 10:42:59 UTC (rev 7599)
+++ code/branches/lastmanstanding/data/levels/gametype_lastmanstanding.oxw 2010-10-28 21:53:27 UTC (rev 7600)
@@ -61,6 +61,9 @@
j = math.random()
?>
+
+ <!--SpawnPoint team=0 position="<?lua print(y*1.4) ?>,0,<?lua print(z*1.4) ?>" spawnclass=SpaceShip pawndesign=spaceshipassff /-->
+
<StaticEntity position="<?lua print(y) ?>,0,<?lua print(z) ?>" scale=<?lua print(j * 2) ?> collisionType=static >
<attached>
<Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh">
Modified: code/branches/lastmanstanding/src/orxonox/gametypes/LastManStanding.cc
===================================================================
--- code/branches/lastmanstanding/src/orxonox/gametypes/LastManStanding.cc 2010-10-28 10:42:59 UTC (rev 7599)
+++ code/branches/lastmanstanding/src/orxonox/gametypes/LastManStanding.cc 2010-10-28 21:53:27 UTC (rev 7600)
@@ -45,7 +45,7 @@
this->bForceSpawn_=true;
this->lives=4;
this->playersAlive=0;
- this->timeRemaining=20.0f;
+ this->timeRemaining=10.0f;
this->respawnDelay=4.0f;
this->setHUDTemplate("LastmanstandingHUD");
}
@@ -63,14 +63,14 @@
else if ((!inGame_[it->first])&&(0<playerLives_[it->first]))
{
if (it->first->getClientID()== CLIENTID_UNKNOWN)
- return;
+ continue;
const std::string& message = "Respawn in " +multi_cast<std::string>(respawnDelay)+ " seconds." ;
this->gtinfo_->sendFadingMessage(message,it->first->getClientID());
}
else if (0>=playerLives_[it->first])
{
if (it->first->getClientID()== CLIENTID_UNKNOWN)
- return;
+ continue;
const std::string& message2 = "You have lost all " +multi_cast<std::string>(lives)+ " lives." ;
this->gtinfo_->sendFadingMessage(message2,it->first->getClientID());
}
@@ -235,7 +235,7 @@
for (std::map<PlayerInfo*, float>::iterator it = this->timeToAct_.begin(); it != this->timeToAct_.end(); ++it)
{
if (playerGetLives(it->first)<=0)//Players without lives shouldn't be affected by time.
- return;
+ continue;
it->second-=dt;//Decreases punishment time.
if (!inGame_[it->first])//Manages respawn delay - player is forced to respawn after the delaytime is used up.
{
@@ -252,7 +252,7 @@
else if (it->second<timeRemaining/6)//Warning message
{
if (it->first->getClientID()== CLIENTID_UNKNOWN)
- return;
+ continue;
const std::string& message = "Camper Warning! Don't forget to shoot.";
this->gtinfo_->sendFadingMessage(message,it->first->getClientID());
}
More information about the Orxonox-commit
mailing list