[Orxonox-commit 2348] r7063 - in code/branches/presentation3: data/levels src/orxonox/gametypes
jo at orxonox.net
jo at orxonox.net
Mon May 31 17:21:40 CEST 2010
Author: jo
Date: 2010-05-31 17:21:40 +0200 (Mon, 31 May 2010)
New Revision: 7063
Modified:
code/branches/presentation3/data/levels/gametype_dynamicmatch.oxw
code/branches/presentation3/src/orxonox/gametypes/Dynamicmatch.cc
code/branches/presentation3/src/orxonox/gametypes/Dynamicmatch.h
Log:
stable version without the ghost-spaceship
Modified: code/branches/presentation3/data/levels/gametype_dynamicmatch.oxw
===================================================================
--- code/branches/presentation3/data/levels/gametype_dynamicmatch.oxw 2010-05-31 14:55:05 UTC (rev 7062)
+++ code/branches/presentation3/data/levels/gametype_dynamicmatch.oxw 2010-05-31 15:21:40 UTC (rev 7063)
@@ -56,9 +56,9 @@
<?lua
createSpaceStationPar(0,2,1,2,1,4,1,50)
?>
- <TeamSpawnPoint team=2 position="20,20,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipghost/>
- <TeamSpawnPoint team=2 position="-20,-20,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipghost/>
- <TeamSpawnPoint team=2 position="-10,10,20" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipghost/>
+ <TeamSpawnPoint team=2 position="20,20,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
+ <TeamSpawnPoint team=2 position="-20,-20,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
+ <TeamSpawnPoint team=2 position="-10,10,20" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
</attached>
</StaticEntity>
</attached>
Modified: code/branches/presentation3/src/orxonox/gametypes/Dynamicmatch.cc
===================================================================
--- code/branches/presentation3/src/orxonox/gametypes/Dynamicmatch.cc 2010-05-31 14:55:05 UTC (rev 7062)
+++ code/branches/presentation3/src/orxonox/gametypes/Dynamicmatch.cc 2010-05-31 15:21:40 UTC (rev 7063)
@@ -81,8 +81,6 @@
this->tutorial=true;
this->pointsPerTime=0.0f;
this->setHUDTemplate("DynamicmatchHUD");
- this->allowDeath=false;
- this->notYet=true;
}
void Dynamicmatch::setConfigValues()
@@ -121,12 +119,6 @@
setPlayerColour(victim->getPlayer()); //victim's new colour
numberOf[piggy]++; //party switch: number of players is not affected (decrease and increase)
- if (target == killer)
- {
- allowDeath=true;
- victim->kill(); //new ship
- }
-
if(tutorial) //announce party switch
{
std::map<PlayerInfo*, Player>::iterator it2 = this->players_.find(victim->getPlayer());
@@ -142,8 +134,7 @@
playerParty_[originator->getPlayer()]=killer; //originator's new party: killer
setPlayerColour(originator->getPlayer()); //originator's new colour
numberOf[killer]++;
- allowDeath=true;
- originator->kill(); //new ship for killer
+
if(tutorial) //announce party switch
{
std::map<PlayerInfo*, Player>::iterator it3 = this->players_.find(originator->getPlayer());
@@ -174,8 +165,7 @@
setPlayerColour(originator->getPlayer()); //originator colour
numberOf[killer]++; //party switch: number of players is not affected (decrease and increase)
- allowDeath=true;
- originator->kill(); //new ship
+
if(tutorial) //announce party switch
{
std::map<PlayerInfo*, Player>::iterator it3 = this->players_.find(originator->getPlayer());
@@ -194,9 +184,6 @@
playerParty_[victim->getPlayer()]=chaser; //victim's new party: chaser
setPlayerColour(victim->getPlayer()); //victim colour
numberOf[chaser]++; //party switch: number of players is not affected (decrease and increase)
-
- allowDeath=true;
- victim->kill(); //new ship
if(tutorial) //announce party switch
{
@@ -278,12 +265,6 @@
setPlayerColour(victim->getPlayer()); //victim colour
setPlayerColour(originator->getPlayer()); //originator colour
- notYet=false;
- allowDeath=true;
- victim->kill(); //new ship
- originator->kill(); //new ship
-
-
if(tutorial) //Announce pary switch
{
std::map<PlayerInfo*, Player>::iterator it = this->players_.find(originator->getPlayer());
@@ -317,14 +298,6 @@
bool Dynamicmatch::allowPawnDeath(Pawn* victim, Pawn* originator)
{
- if (allowDeath)//Hack for Ghost-Spaceship
- {
- if (notYet)
- {allowDeath=false;}
- else
- {notYet=true;}
- return true;
- }
//killers can kill chasers and killers can be killed by chasers
if ((playerParty_[originator->getPlayer()] == killer && playerParty_[victim->getPlayer()] == chaser)||(playerParty_[victim->getPlayer()] == killer &&
playerParty_[originator->getPlayer()] == chaser ))
@@ -394,7 +367,7 @@
if (this->hasStarted() && !gameEnded_)
{ pointsPerTime =pointsPerTime + dt;
gameTime_ = gameTime_ - dt;
- if (pointsPerTime > 3.0f)//hard coded!! should be changed
+ if (pointsPerTime > 2.0f)//hard coded!! should be changed
{
pointsPerTime=0.0f;
rewardPig();
Modified: code/branches/presentation3/src/orxonox/gametypes/Dynamicmatch.h
===================================================================
--- code/branches/presentation3/src/orxonox/gametypes/Dynamicmatch.h 2010-05-31 14:55:05 UTC (rev 7062)
+++ code/branches/presentation3/src/orxonox/gametypes/Dynamicmatch.h 2010-05-31 15:21:40 UTC (rev 7063)
@@ -78,8 +78,6 @@
protected:
- bool allowDeath;
- bool notYet;
std::map< PlayerInfo*, int > playerParty_; //player's parties are recorded here
std::vector<ColourValue> partyColours_; //aus TeamDeathmatch
unsigned int numberOf[3]; //array to count number of chasers, pigs, killers
More information about the Orxonox-commit
mailing list