Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 30, 2012, 9:25:47 PM (12 years ago)
Author:
jo
Message:

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.

Location:
code/branches/presentation2012merge/src/orxonox/gametypes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2012merge/src/orxonox/gametypes/Dynamicmatch.cc

    r9286 r9338  
    8282        this->numberOf[killer]=0;
    8383        this->tutorial=true;
    84         this->pointsPerTime=0.0f;
     84        this->pointsPerTime=1.0f;
    8585        this->setHUDTemplate("DynamicmatchHUD");
    8686    }
     
    453453    {
    454454        //pigs: 1 + every 6th player is a pig
    455         if ( (1+this->getNumberOfPlayers()/6) > numberOf[piggy])
     455        if ( (1 + getPlayerCount()/6) > numberOf[piggy])
    456456        {
    457457            notEnoughPigs=true;
     
    502502        }
    503503        //killers: every 4th player is a killer
    504         if (getNumberOfPlayers()/4 > numberOf[killer])
     504        if (getPlayerCount()/4 > numberOf[killer])
    505505        {
    506506            notEnoughKillers=true;
  • code/branches/presentation2012merge/src/orxonox/gametypes/Dynamicmatch.h

    r8727 r9338  
    8181            SpawnPoint* getBestSpawnPoint(PlayerInfo* player) const;
    8282
     83
    8384        protected:
     85            inline int getPlayerCount() const
     86                 { return this->numberOf[chaser] + numberOf[piggy] + this->numberOf[killer]; }
    8487
    8588            std::map< PlayerInfo*, int > playerParty_; //player's parties are recorded here
Note: See TracChangeset for help on using the changeset viewer.