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/modules/overlays/hud
Files:
1 added
3 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__ */
Note: See TracChangeset for help on using the changeset viewer.