Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9340 for code


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
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2012merge/data/overlays/dynamicMatchHUD.oxo

    r7679 r9340  
    22  <OverlayGroup name="DynamicmatcHUD" scale = "1, 1">
    33   
     4    <!--OverlayText
     5     position  = "0.02, 0.02"
     6     pickpoint = "0.0, 0.0"
     7     font      = "ShareTechMono"
     8     textsize  = 0.04
     9     colour    = "1.0, 1.0, 1.0, 1.0"
     10     align     = "left"
     11     caption   = "Target:"
     12    />
     13
     14    <OverlayText
     15     position  = "0.02, 0.055"
     16     pickpoint = "0.0, 0.0"
     17     font      = "ShareTechMono"
     18     textsize  = 0.04
     19     colour    = "1.0, 1.0, 1.0, 1.0"
     20     align     = "left"
     21     caption   = "Score:"
     22    /-->
     23
     24
    425 <GametypeStaticMessage
    526   name     = "staticmessage"
  • code/branches/presentation2012merge/src/modules/pong/Pong.cc

    r9258 r9340  
    256256        Is called when the player scored.
    257257    */
    258     void Pong::playerScored(PlayerInfo* player)
    259     {
    260         Deathmatch::playerScored(player);
     258    void Pong::playerScored(PlayerInfo* player, int score)
     259    {
     260        Deathmatch::playerScored(player, score);
    261261
    262262        if (this->center_ != NULL) // If there is a centerpoint.
  • code/branches/presentation2012merge/src/modules/pong/Pong.h

    r9258 r9340  
    7373            virtual void spawnPlayer(PlayerInfo* player); //!< Spawns the input player.
    7474
    75             virtual void playerScored(PlayerInfo* player); //!< Is called when the player scored.
     75            virtual void playerScored(PlayerInfo* player, int score = 1); //!< Is called when the player scored.
    7676
    7777            /**
  • code/branches/presentation2012merge/src/modules/tetris/Tetris.cc

    r9330 r9340  
    2626 *
    2727 *
    28  *BUG c) destroying the old stones causes segfault -> WeakPointer as solution ?
    29  *BUG d) wrong collision detection: sometimes stones "bounce off"
    3028 *
    3129 *
  • 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.