Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 11, 2010, 1:35:49 AM (14 years ago)
Author:
landauf
Message:

compiles and works

Location:
code/branches/lastmanstanding/src/orxonox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/lastmanstanding/src/orxonox/OrxonoxPrereqs.h

    r7163 r7636  
    9393    class Dynamicmatch;
    9494    class Gametype;
     95    class LastManStanding;
    9596    class TeamBaseMatch;
    9697    class TeamDeathmatch;
  • code/branches/lastmanstanding/src/orxonox/gametypes/LastManStanding.cc

    r7635 r7636  
    147147    }
    148148
    149     int LastManStanding::pawnGetLives(Pawn* pawn)
    150     {
    151         if(!pawn)
    152             return -1;
    153         PlayerInfo* player= dynamic_cast<PlayerInfo*>(pawn);
    154         if(!player)
    155             return -2;
    156         return playerLives_[player];
    157     }
    158 
    159     const int LastManStanding::playerGetLives(PlayerInfo* player)
     149    int LastManStanding::playerGetLives(PlayerInfo* player)
    160150    {
    161151        if (player)
     
    163153        else
    164154            return 0;
     155    }
     156   
     157    int LastManStanding::getNumPlayersAlive() const
     158    {
     159        return this->playersAlive;
    165160    }
    166161
  • code/branches/lastmanstanding/src/orxonox/gametypes/LastManStanding.h

    r7635 r7636  
    7373
    7474            virtual void end(); //!< Sends an end message.
    75             virtual int pawnGetLives(Pawn* pawn); //!< Returns amount of Lives of a certain player.
    76             const int playerGetLives(PlayerInfo* player); //!< getFunction for the map "playerLives_".
     75            int playerGetLives(PlayerInfo* player); //!< getFunction for the map "playerLives_".
     76            int getNumPlayersAlive() const; //!< Returns the number of players that are still alive.
    7777            virtual void playerEntered(PlayerInfo* player); //!< Initializes values. Manages the gametype's HUD. #Players alive via StaticMessage.
    7878            virtual bool playerLeft(PlayerInfo* player); //!< Manages the gametype's HUD. #Players alive via StaticMessage.
Note: See TracChangeset for help on using the changeset viewer.