Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 31, 2016, 4:01:40 PM (8 years ago)
Author:
bberabi
Message:

racing bots.. under maintanence…

Location:
code/branches/SpaceRace_HS16/src/modules/gametypes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/SpaceRace_HS16/src/modules/gametypes/OldSpaceRace.cc

    r11246 r11256  
    3333#include "util/Convert.h"
    3434#include "util/Math.h"
    35 #include "SpaceRaceBot.h"
     35#include "infos/Bot.h"
    3636#include "items/Engine.h"
    3737#include "controllers/HumanController.h"
     38#include "SpaceRaceBot.h"
     39
     40#include "core/CoreIncludes.h"
     41#include "chat/ChatManager.h"
     42#include "infos/PlayerInfo.h"
     43#include "worldentities/pawns/Pawn.h"
     44#include "core/config/ConfigValueIncludes.h"
    3845
    3946
     
    4350    RegisterUnloadableClass(OldSpaceRace);
    4451
     52
    4553    OldSpaceRace::OldSpaceRace(Context* context) : Gametype(context)
    4654    {
    4755        RegisterObject(OldSpaceRace);
     56       
     57        //this->botclass_ = Class();
     58
    4859        this->checkpointsReached_ = 0;
    4960        this->bTimeIsUp_ = false;
    50         this->numberOfBots_ = 1;
     61        this->setConfigValues();
     62    }
     63
     64    void OldSpaceRace::setConfigValues()
     65    {
     66       
     67   
    5168    }
    5269
     
    127144    }
    128145 
     146
     147 void OldSpaceRace::playerEntered(PlayerInfo* player)
     148    {
     149        Gametype::playerEntered(player);
     150
     151        const std::string& message = player->getName() + " entered the game";
     152        ChatManager::message(message);
     153    }
     154
     155
     156
    129157    void OldSpaceRace::newCheckpointReached()
    130158    {
  • code/branches/SpaceRace_HS16/src/modules/gametypes/OldSpaceRace.h

    r11246 r11256  
    5555            virtual ~OldSpaceRace() {}
    5656
     57                        void setConfigValues();
     58
    5759            virtual void start() override;
    5860
    5961            virtual void end() override;
    6062
    61 
     63            virtual void playerEntered(PlayerInfo* player) override;
    6264            virtual void newCheckpointReached();
    6365            virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command.
     66                                          //<! This is only a temporary solution. Better: create racingBots.
     67
     68
    6469            virtual  void countdownFinished();
    65                                           //<! This is only a temporary solution. Better: create racingBots.
    6670
    6771            inline void setCheckpointsReached(int n)
  • code/branches/SpaceRace_HS16/src/modules/gametypes/SpaceRaceBot.cc

    r10262 r11256  
    3636        this->createController();
    3737    }
     38
     39
     40
     41
     42
     43
     44
     45   
    3846}
Note: See TracChangeset for help on using the changeset viewer.