[Orxonox-commit 4667] r9338 - in code/branches/presentation2012merge: data/levels src/orxonox/gametypes
jo at orxonox.net
jo at orxonox.net
Mon Jul 30 21:25:47 CEST 2012
Author: jo
Date: 2012-07-30 21:25:47 +0200 (Mon, 30 Jul 2012)
New Revision: 9338
Modified:
code/branches/presentation2012merge/data/levels/dynamicMatch.oxw
code/branches/presentation2012merge/src/orxonox/gametypes/Dynamicmatch.cc
code/branches/presentation2012merge/src/orxonox/gametypes/Dynamicmatch.h
Log:
Trying to find quick fixes for dynamic match. Somehow gametypes getNumberOfPlayer() function is broken, so I created a new, local function. Furthermore the rocket usage is in conflict with colouring spaceships, so I changed the spaceship model. Surprisingly the usage of spaceshipswallow and adding 7 bots caused my system to freeze some seconds after the gametype started.
Modified: code/branches/presentation2012merge/data/levels/dynamicMatch.oxw
===================================================================
--- code/branches/presentation2012merge/data/levels/dynamicMatch.oxw 2012-07-29 21:02:13 UTC (rev 9337)
+++ code/branches/presentation2012merge/data/levels/dynamicMatch.oxw 2012-07-30 19:25:47 UTC (rev 9338)
@@ -9,6 +9,8 @@
include("HUDTemplates3.oxo")
include("stats.oxo")
include("templates/spaceshipAssff.oxt")
+ include("templates/spaceshipSwallow.oxt")
+ include("templates/spaceshipPirate.oxt")
include("templates/spaceshipGhost.oxt")
include("dynamicMatchHUD.oxo")
include("templates/lodInformation.oxt")
@@ -38,19 +40,19 @@
<!-- -----------12-Spawnpoints around the planet------------- -->
<!-- inner Spawnpoints -->
-<TeamSpawnPoint team=0 position="1000,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
-<TeamSpawnPoint team=0 position="-1000,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
-<TeamSpawnPoint team=0 position="0,1000,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
-<TeamSpawnPoint team=0 position="0,-1000,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
-<TeamSpawnPoint team=0 position="0,0,1000" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
-<TeamSpawnPoint team=0 position="0,0,-1000" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
+<TeamSpawnPoint team=0 position="1000,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
+<TeamSpawnPoint team=0 position="-1000,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
+<TeamSpawnPoint team=0 position="0,1000,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
+<TeamSpawnPoint team=0 position="0,-1000,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
+<TeamSpawnPoint team=0 position="0,0,1000" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
+<TeamSpawnPoint team=0 position="0,0,-1000" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
<!--outer Spawnpoints -->
-<TeamSpawnPoint team=0 position="2000,0,0" lookat="0,0,1" spawnclass=SpaceShip pawndesign=spaceshipassff/>
-<TeamSpawnPoint team=0 position="-2000,0,0" lookat="0,0,-1" spawnclass=SpaceShip pawndesign=spaceshipassff/>
-<TeamSpawnPoint team=0 position="0,2000,0" lookat="0,1,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
-<TeamSpawnPoint team=0 position="0,-2000,0" lookat="0,-1,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
-<TeamSpawnPoint team=0 position="0,0,2000" lookat="1,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
-<TeamSpawnPoint team=0 position="0,0,-2000" lookat="-1,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff/>
+<TeamSpawnPoint team=0 position="2000,0,0" lookat="0,0,1" spawnclass=SpaceShip pawndesign=spaceshippirate/>
+<TeamSpawnPoint team=0 position="-2000,0,0" lookat="0,0,-1" spawnclass=SpaceShip pawndesign=spaceshippirate/>
+<TeamSpawnPoint team=0 position="0,2000,0" lookat="0,1,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
+<TeamSpawnPoint team=0 position="0,-2000,0" lookat="0,-1,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
+<TeamSpawnPoint team=0 position="0,0,2000" lookat="1,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
+<TeamSpawnPoint team=0 position="0,0,-2000" lookat="-1,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
<?lua
dofile("includes/CuboidSpaceStation.lua")
@@ -63,9 +65,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=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/>
+ <TeamSpawnPoint team=2 position="20,20,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
+ <TeamSpawnPoint team=2 position="-20,-20,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
+ <TeamSpawnPoint team=2 position="-10,10,20" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate/>
</attached>
</StaticEntity>
</attached>
Modified: code/branches/presentation2012merge/src/orxonox/gametypes/Dynamicmatch.cc
===================================================================
--- code/branches/presentation2012merge/src/orxonox/gametypes/Dynamicmatch.cc 2012-07-29 21:02:13 UTC (rev 9337)
+++ code/branches/presentation2012merge/src/orxonox/gametypes/Dynamicmatch.cc 2012-07-30 19:25:47 UTC (rev 9338)
@@ -81,7 +81,7 @@
this->numberOf[piggy]=0;
this->numberOf[killer]=0;
this->tutorial=true;
- this->pointsPerTime=0.0f;
+ this->pointsPerTime=1.0f;
this->setHUDTemplate("DynamicmatchHUD");
}
@@ -452,7 +452,7 @@
void Dynamicmatch::evaluatePlayerParties() //manages the notEnough booleans (here the percentage of special players is implemented)
{
//pigs: 1 + every 6th player is a pig
- if ( (1+this->getNumberOfPlayers()/6) > numberOf[piggy])
+ if ( (1 + getPlayerCount()/6) > numberOf[piggy])
{
notEnoughPigs=true;
if (tutorial) // Announce selectionphase
@@ -501,7 +501,7 @@
}
}
//killers: every 4th player is a killer
- if (getNumberOfPlayers()/4 > numberOf[killer])
+ if (getPlayerCount()/4 > numberOf[killer])
{
notEnoughKillers=true;
if (tutorial) // Announce selectionphase
Modified: code/branches/presentation2012merge/src/orxonox/gametypes/Dynamicmatch.h
===================================================================
--- code/branches/presentation2012merge/src/orxonox/gametypes/Dynamicmatch.h 2012-07-29 21:02:13 UTC (rev 9337)
+++ code/branches/presentation2012merge/src/orxonox/gametypes/Dynamicmatch.h 2012-07-30 19:25:47 UTC (rev 9338)
@@ -80,7 +80,10 @@
void tick (float dt);// used to end the game
SpawnPoint* getBestSpawnPoint(PlayerInfo* player) const;
+
protected:
+ inline int getPlayerCount() const
+ { return this->numberOf[chaser] + numberOf[piggy] + this->numberOf[killer]; }
std::map< PlayerInfo*, int > playerParty_; //player's parties are recorded here
std::vector<ColourValue> partyColours_; //aus TeamDeathmatch
More information about the Orxonox-commit
mailing list