Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9833


Ignore:
Timestamp:
Dec 1, 2013, 11:38:21 PM (10 years ago)
Author:
jo
Message:

Fixing cleanup bug, that causes orxonox to crash when tetris was quitted before calling Tetris::end() and thus missing the cleanup process.

Location:
code/trunk/src/modules/tetris
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/tetris/Tetris.cc

    r9803 r9833  
    344344            if (it->first->isHumanPlayer() && (it->first->isReadyToSpawn() || this->bForceSpawn_))
    345345                this->spawnPlayer(it->first);
     346    }
     347   
     348    bool Tetris::playerLeft(PlayerInfo* player)
     349    {
     350        bool left = Gametype::playerLeft(player);
     351        if(player && player->isHumanPlayer())
     352        {
     353            this->end();
     354        }
     355        return left;
    346356    }
    347357
  • code/trunk/src/modules/tetris/Tetris.h

    r9802 r9833  
    6464
    6565            virtual void spawnPlayer(PlayerInfo* player); //!< Spawns the input player.
     66            virtual bool playerLeft(PlayerInfo* player);
    6667
    6768            void setCenterpoint(TetrisCenterpoint* center);
Note: See TracChangeset for help on using the changeset viewer.