Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 20, 2012, 4:46:52 PM (12 years ago)
Author:
jo
Message:

On the way of repairing a bug that was caused by manual refactoring of gametype's playerScored function.

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

Legend:

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

    r8858 r9340  
    114114    }
    115115
    116     void Deathmatch::playerScored(PlayerInfo* player)
     116    void Deathmatch::playerScored(PlayerInfo* player, int score)
    117117    {
    118         Gametype::playerScored(player);
     118        Gametype::playerScored(player, score);
    119119
    120120        if (player)
  • code/branches/presentation2012merge/src/orxonox/gametypes/Deathmatch.h

    r5781 r9340  
    4848
    4949            virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);
    50             virtual void playerScored(PlayerInfo* player);
     50            virtual void playerScored(PlayerInfo* player, int score = 1);
    5151    };
    5252}
  • code/branches/presentation2012merge/src/orxonox/gametypes/Dynamicmatch.cc

    r9339 r9340  
    310310        if (spaceship)
    311311        {
     312            WeakPtr<SpaceShip>* ptr = new WeakPtr<SpaceShip>(spaceship);
     313            if(ptr == NULL)
     314                return;
    312315            spaceship->addSpeedFactor(5);
    313             WeakPtr<SpaceShip>* ptr = new WeakPtr<SpaceShip>(spaceship);
    314316            ExecutorPtr executor = createExecutor(createFunctor(&Dynamicmatch::resetSpeedFactor, this));
    315317            executor->setDefaultValue(0, ptr);
     
    490492        }
    491493        //killers: every 4th player is a killer
    492         if (getPlayerCount()/4 > (int)numberOf[killer])
     494        if ( static_cast<unsigned int>(getPlayerCount()/4) > numberOf[killer])
    493495        {
    494496            notEnoughKillers=true;
  • code/branches/presentation2012merge/src/orxonox/gametypes/TeamBaseMatch.cc

    r8952 r9340  
    128128
    129129    // collect Points for killing oppenents
    130     void TeamBaseMatch::playerScored(PlayerInfo* player)
     130    void TeamBaseMatch::playerScored(PlayerInfo* player, int score)
    131131    {
    132132        int teamnr = this->getTeam(player);
  • code/branches/presentation2012merge/src/orxonox/gametypes/TeamBaseMatch.h

    r5929 r9340  
    4747            virtual bool allowPawnDamage(Pawn* victim, Pawn* originator);
    4848
    49             virtual void playerScored(PlayerInfo* player);
     49            virtual void playerScored(PlayerInfo* player, int score = 1);
    5050            virtual void showPoints();
    5151            virtual void endGame();
  • code/branches/presentation2012merge/src/orxonox/gametypes/TeamDeathmatch.cc

    r9286 r9340  
    113113    }
    114114
    115     void TeamDeathmatch::playerScored(PlayerInfo* player)
     115    void TeamDeathmatch::playerScored(PlayerInfo* player, int score)
    116116    {
    117         TeamGametype::playerScored(player);
     117        TeamGametype::playerScored(player, score);
    118118
    119119        if (player)
  • code/branches/presentation2012merge/src/orxonox/gametypes/TeamDeathmatch.h

    r9286 r9340  
    4848
    4949            virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);
    50             virtual void playerScored(PlayerInfo* player);
     50            virtual void playerScored(PlayerInfo* player, int score = 1);
    5151    };
    5252}
Note: See TracChangeset for help on using the changeset viewer.