Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 16, 2011, 11:17:30 AM (14 years ago)
Author:
scheusso
Message:

Merge branch 'jo-test' into lms3

Location:
code/branches/lastmanstanding3/src
Files:
3 added
6 edited
1 copied

Legend:

Unmodified
Added
Removed
  • code/branches/lastmanstanding3/src/modules/overlays/hud/CMakeLists.txt

    r7655 r7903  
    1616  GametypeFadingMessage.cc
    1717  LastManStandingInfos.cc
     18  LastTeamStandingInfos.cc
    1819)
  • code/branches/lastmanstanding3/src/modules/overlays/hud/GametypeStatus.cc

    r7284 r7903  
    3636#include "worldentities/ControllableEntity.h"
    3737#include "worldentities/pawns/Spectator.h"
     38//#include "gametypes/Gametype.h"
    3839
    3940namespace orxonox
     
    5051        RegisterObject(GametypeStatus);
    5152
     53        //this->game_ = 0;
    5254        this->owner_ = 0;
    5355        this->bNoCaption_ = false;
     56        //this->bForcedSpawn_ = false;
    5457
    5558        ModifyConsoleCommand(__CC_GametypeStatus_name, __CC_displayCaption_name).setObject(this);
     
    6770        if (this->owner_ && this->owner_->getGametypeInfo() && this->owner_->getControllableEntity())
    6871        {
     72            //if (this->game_)
     73            //    this->bForcedSpawn_ = this->game_->getForceSpawn();
     74            //else
     75            //    this->bForcedSpawn_ = false;
     76
    6977            const GametypeInfo* gtinfo = this->owner_->getGametypeInfo();
    7078            ControllableEntity* ce = this->owner_->getControllableEntity();
     
    8795                if (gtinfo->isStartCountdownRunning())
    8896                    this->setCaption(multi_cast<std::string>(static_cast<int>(ceil(gtinfo->getStartCountdown()))));
    89                 else if (ce->isA(Class(Spectator)))
     97                else if (ce->isA(Class(Spectator))/*&&(!bForcedSpawn_)*/)
    9098                    this->setCaption("Press [Fire] to respawn");
    9199                else
     
    101109    {
    102110        SUPER(GametypeStatus, changedOwner);
    103 
     111        //this->game_ = orxonox_cast<Gametype*>(this->getOwner());
    104112        this->owner_ = orxonox_cast<PlayerInfo*>(this->getOwner());
    105113    }
  • code/branches/lastmanstanding3/src/modules/overlays/hud/GametypeStatus.h

    r7284 r7903  
    4949
    5050        private:
     51            //Gametype* game_;
    5152            PlayerInfo* owner_;
    5253            bool bNoCaption_;
     54            //bool bForcedSpawn_;
    5355
    5456    };
  • code/branches/lastmanstanding3/src/modules/overlays/hud/LastTeamStandingInfos.h

    r7902 r7903  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
     23 *      Johannes Ritz
    2424 *   Co-authors:
    25  *      ...
     25 *     
    2626 *
    2727 */
    2828
    29 #ifndef _GametypeStatus_H__
    30 #define _GametypeStatus_H__
     29#ifndef _LastTeamStandingInfos_H__
     30#define _LastTeamStandingInfos_H__
    3131
    3232#include "overlays/OverlaysPrereqs.h"
     
    3737namespace orxonox
    3838{
    39     class _OverlaysExport GametypeStatus : public OverlayText, public Tickable
     39    class _OverlaysExport LastTeamStandingInfos : public OverlayText, public Tickable
    4040    {
    4141        public:
    42             GametypeStatus(BaseObject* creator);
    43             virtual ~GametypeStatus();
     42            LastTeamStandingInfos(BaseObject* creator);
     43            virtual ~LastTeamStandingInfos();
    4444
    4545            virtual void tick(float dt);
     46            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    4647            virtual void changedOwner();
    4748
    48             void setDisplayCaption(bool bValue); //!< Toggles whether the gametype status is displayed.
     49            inline void setShowLives(bool value)
     50                { this->bShowLives_ = value; }
     51            inline bool getShowLives() const
     52                { return this->bShowLives_; }
     53
     54            inline void setShowTeams(bool value)
     55                { this->bShowTeams_ = value; }
     56            inline bool getShowTeams() const
     57                { return this->bShowTeams_; }
    4958
    5059        private:
    51             PlayerInfo* owner_;
    52             bool bNoCaption_;
    53 
     60            LastTeamStanding* lts_;
     61            PlayerInfo* player_;
     62            bool bShowLives_;
     63            bool bShowTeams_;
    5464    };
    5565}
    56 #endif /* _GametypeStatus_H__ */
     66#endif /* _LastTeamStandingInfos_H__ */
  • code/branches/lastmanstanding3/src/orxonox/OrxonoxPrereqs.h

    r7854 r7903  
    9696    class Gametype;
    9797    class LastManStanding;
     98    class LastTeamStanding;
    9899    class TeamBaseMatch;
    99100    class TeamDeathmatch;
  • code/branches/lastmanstanding3/src/orxonox/gametypes/CMakeLists.txt

    r7655 r7903  
    88  Dynamicmatch.cc
    99  LastManStanding.cc
     10  LastTeamStanding.cc
    1011)
  • code/branches/lastmanstanding3/src/orxonox/gametypes/Gametype.h

    r7801 r7903  
    150150              { this->timeLimit_ = t; }
    151151
     152            //inline bool getForceSpawn()
     153            //  { return this->bForceSpawn_; }       
     154
    152155            virtual void resetTimer();
    153156            virtual void resetTimer(float t);
Note: See TracChangeset for help on using the changeset viewer.