Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 14, 2011, 8:29:14 PM (13 years ago)
Author:
jo
Message:

trying to find a bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/lastmanstanding2/src/orxonox/gametypes/LastTeamStanding.h

    r7699 r7890  
    5454            int lives; //!< Standard amount of lives. Each player starts a game with so many lives.
    5555            std::map< PlayerInfo*, int > playerLives_; //!< Each player's lives are stored here.
     56            std::vector<int> eachTeamsPlayers; //!<Number of players in each team.
    5657            int teamsAlive; //!< Counter counting teams with more than one player remaining.
     58//Data for CamperPunishment
    5759            float timeRemaining; //!< Each player has a certain time where he or she has to hit an opponent or will be punished.
    5860            std::map<PlayerInfo*, float> timeToAct_; //!< Each player's time till she/he will be punished is stored here.
     61            bool bNoPunishment; //!< Config value to switch off Punishment function if it is set to true.
     62            bool bHardPunishment; //!< Switches between damage and death as punishment.
     63            float punishDamageRate; //!< Makes Damage adjustable.
     64//Data for RespawnDelay
    5965            float respawnDelay; //!<Time in seconds when a player will respawn after death.
    6066            std::map<PlayerInfo*, float> playerDelayTime_; //!< Stores each Player's delay time.
    6167            std::map<PlayerInfo*, bool> inGame_; //!< Indicates each Player's state.
    62             bool bNoPunishment; //!< Config value to switch off Punishment function if it is set to true.
    63             bool bHardPunishment; //!< Switches between damage and death as punishment.
    64             float punishDamageRate; //!< Makes Damage adjustable.
     68
     69            bool bMinTeamsReached; //!< Lock. Game shouldn't end right at the beginning.
     70
    6571            virtual void spawnDeadPlayersIfRequested(); //!< Prevents dead players to respawn.
    6672            virtual int getMinLives(); //!< Returns minimum of each player's lives; players with 0 lives are skipped;
    67             int * eachTeamsPlayers; //!<Each teams player's alive.
    68             bool bMinPlayersReached;
    6973
    7074        public:
    7175            LastTeamStanding(BaseObject* creator); //!< Default Constructor.
    7276            virtual ~LastTeamStanding(); //!< Default Destructor.
     77
     78            virtual void playerEntered(PlayerInfo* player); //!< Initializes values.
     79            virtual bool playerLeft(PlayerInfo* player); //!< Manages all local variables.
     80
     81            virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0); //!< Manages each player's lost lives.
     82            virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = 0); //!< If a player shoot's an opponent, his punishment countdown will be resetted.
     83            virtual void playerStartsControllingPawn(PlayerInfo* player, Pawn* pawn); //!< Resets punishment time and respawn delay.
     84            void tick (float dt); //!< used to end the game
     85            virtual void end(); //!< Sends an end message.
     86            void punishPlayer(PlayerInfo* player); //!< Function in order to kill a player. Punishment for hiding longer than "timeRemaining".
     87            int playerGetLives(PlayerInfo* player); //!< getFunction for the map "playerLives_".
     88            inline int getNumTeamsAlive() const//!< Returns the number of players that are still alive.
     89            {return this->teamsAlive;}
    7390            void setConfigValues(); //!< Makes values configurable.
    7491
    75             virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = 0); //!< If a player shoot's an opponent, his punishment countdown will be resetted.
    76             virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0); //!< Manages each players lives.
    77 
    78             virtual void end(); //!< Sends an end message.
    79             int playerGetLives(PlayerInfo* player); //!< getFunction for the map "playerLives_".
    80             int getNumTeamsAlive() const; //!< Returns the number of players that are still alive.
    81             virtual void playerEntered(PlayerInfo* player); //!< Initializes values.
    82             virtual bool playerLeft(PlayerInfo* player); //!< Manages all local variables.
    83             virtual void playerStartsControllingPawn(PlayerInfo* player, Pawn* pawn); //!< Resets punishment time and respawn delay.
    84 
    85             void punishPlayer(PlayerInfo* player); //!< Function in order to kill a player. Punishment for hiding longer than "timeRemaining".
    86             void tick (float dt); //!< used to end the game
    8792    };
    8893}
Note: See TracChangeset for help on using the changeset viewer.