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
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/SpaceRace_HS16/data/levels/Spacerace2.oxw

    r11246 r11256  
    2020  include("templates/spaceshipPirate.oxt")
    2121?>
    22 
     22   
    2323<Level
    24  name         = "Spacerace2"
     24 name         = "Spacerace2"   
    2525 description  = "Just a few tests"
    2626 plugins = "gametypes"
  • code/branches/SpaceRace_HS16/data/levels/newnewnewspacerace.oxw

    r11250 r11256  
    7474
    7575
    76     <SpaceShip position="0,0,200" lookat="0,0,0">
     76
     77  <!-- Das erste Bot -->
     78    <SpaceShip position="20,0,0" lookat="25,0,0">
    7779      <templates>
    78         <Template link=spaceshipassff />
     80        <Template link=fastship />
    7981      </templates>
    8082      <controller>
    81         <WaypointPatrolController alertnessradius=0 team=10>
     83        <WaypointPatrolController alertnessradius=1 team=10>
    8284          <waypoints>
    83             <Model mesh="cube.mesh" scale=0 position="0,-2000,1000" />
    84             <Model mesh="cube.mesh" scale=0 position="0,2100,2300" />
    85             <Model mesh="cube.mesh" scale=0 position="0,-400,300" />
     85            <Model mesh="cube.mesh" scale=0 position="1000,0,0" />
     86            <Model mesh="cube.mesh" scale=0 position="1500,1000,250" />
     87            <Model mesh="cube.mesh" scale=0 position="0,400,300" />
    8688          </waypoints>
    8789        </WaypointPatrolController>
    8890      </controller>
    8991    </SpaceShip>
     92
     93
     94
     95
    9096
    9197
  • 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.