Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 25, 2011, 10:56:31 PM (13 years ago)
Author:
jo
Message:

On the way to a multiplayer gametype basceclass.

Location:
code/branches/gamecontent/src
Files:
2 added
9 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gamecontent/src/modules/pong/Pong.cc

    r8900 r8904  
    293293            std::string message(name1 + " has won!");
    294294            ChatManager::message(message);
    295 this->tick(0);
    296295            this->end();
    297296        }
     
    301300             std::string message2(name2 + " has won!");
    302301             ChatManager::message(message2);
    303 this->tick(0);
    304302             this->end();
    305303        }
  • code/branches/gamecontent/src/orxonox/controllers/WaypointPatrolController.cc

    r7184 r8904  
    4242        RegisterObject(WaypointPatrolController);
    4343
    44         //this->team_ = 0;
    4544        this->alertnessradius_ = 500;
    4645
     
    5352
    5453        XMLPortParam(WaypointPatrolController, "alertnessradius", setAlertnessRadius, getAlertnessRadius, xmlelement, mode).defaultValues(500.0f);
    55 //        XMLPortParam(WaypointPatrolController, "team", setTeam, getTeam, xmlelement, mode).defaultValues(0);
    5654    }
    5755
  • code/branches/gamecontent/src/orxonox/controllers/WaypointPatrolController.h

    r7163 r8904  
    4646            virtual void tick(float dt);
    4747
    48            /* inline void setTeam(int team)
    49                 { this->team_ = team; }
    50             inline int getTeam() const
    51                 { return this->team_; } */
    52 
    5348            inline void setAlertnessRadius(float radius)
    5449                { this->alertnessradius_ = radius; }
     
    5954            void searchEnemy();
    6055
    61             //int team_;
    6256            float alertnessradius_;
    6357            Timer patrolTimer_;
  • code/branches/gamecontent/src/orxonox/gametypes/CMakeLists.txt

    r8899 r8904  
    1010  LastTeamStanding.cc
    1111  TeamGametype.cc
     12  Mission.cc
    1213)
  • code/branches/gamecontent/src/orxonox/gametypes/Gametype.h

    r8706 r8904  
    123123                { return this->gtinfo_->getHUDTemplate(); }
    124124
    125             void addBots(unsigned int amount);
     125            virtual void addBots(unsigned int amount);
    126126            void killBots(unsigned int amount = 0);
    127127
  • code/branches/gamecontent/src/orxonox/gametypes/TeamDeathmatch.h

    r5781 r8904  
    5656
    5757            int getTeam(PlayerInfo* player);
    58 
    5958            inline const ColourValue& getTeamColour(int teamnr) const
    6059                { return this->teamcolours_[teamnr]; }
  • code/branches/gamecontent/src/orxonox/gametypes/TeamGametype.cc

    r8901 r8904  
    6767    {
    6868        Gametype::playerEntered(player);
    69 
    70         std::vector<unsigned int> playersperteam(this->teams_, 0);
     69        this->findAndSetTeam(player);
     70    }
     71
     72    void TeamGametype::findAndSetTeam(PlayerInfo* player)
     73    {
     74         std::vector<unsigned int> playersperteam(this->teams_, 0);
    7175
    7276        for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)
     
    8690
    8791        this->teamnumbers_[player] = minplayersteam;
     92
    8893    }
    8994
  • code/branches/gamecontent/src/orxonox/gametypes/TeamGametype.h

    r8901 r8904  
    4747
    4848            virtual void playerEntered(PlayerInfo* player);
     49            virtual void findAndSetTeam(PlayerInfo* player);
    4950            virtual bool playerLeft(PlayerInfo* player);
    5051
  • code/branches/gamecontent/src/orxonox/worldentities/pawns/Pawn.cc

    r8891 r8904  
    455455        SUPER(Pawn, changedActivity);
    456456
    457         this->setRadarVisibility(this->isActive());
     457        this->setRadarVisibility(this->isVisible());
    458458    }
    459459
Note: See TracChangeset for help on using the changeset viewer.