Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4326 in orxonox.OLD for orxonox/trunk/src/story_entities/world.cc


Ignore:
Timestamp:
May 27, 2005, 3:06:16 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: working on an alternativ flight mode and a new event handlig system at the same time. crazy…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/story_entities/world.cc

    r4324 r4326  
    2525#include "null_parent.h"
    2626#include "helper_parent.h"
     27#include "pilot_node.h"
    2728#include "track_node.h"
    2829#include "world_entity.h"
     
    473474
    474475
     476/**
     477   \brief loads the debug world: only for experimental stuff
     478*/
    475479void World::loadDebugWorld(int worldID)
    476480{
     
    555559
    556560
    557         // create a player
    558561        this->localPlayer = new Player ();
    559562        this->localPlayer->setName ("player");
    560563        this->spawn (this->localPlayer);
    561564        /*monitor progress*/
    562         //this->glmis->step();
    563565        this->glmis->step();
    564566
    565         // bind input
    566         Orxonox *orx = Orxonox::getInstance ();
    567         orx->getLocalInput()->bind (this->localPlayer);
    568            
    569567        // bind camera
    570568        this->localCamera = new Camera();
    571569        this->localCamera->setName ("camera");
    572            
    573570        /*monitor progress*/
    574571        this->glmis->step();
     
    591588        this->glmis->step();
    592589
     590        this->pilotNode = new PilotNode();
     591        this->pilotNode->addChild(this->localPlayer);
     592        this->pilotNode->addChild(this->localCamera);
     593        // bind input
     594        Orxonox *orx = Orxonox::getInstance ();
     595        //orx->getLocalInput()->bind (this->pilotNode);     
     596       
     597        /*
    593598        PNode* tn = trackManager->getTrackNode();
    594599        tn->addChild(this->localPlayer);
    595600        this->localCamera->lookAt(tn);
    596 
    597 
     601       
    598602        tn->addChild(this->localCamera);
    599603        this->localPlayer->setMode(PNODE_ALL);
    600604        trackManager->condition(2, LEFTRIGHT, this->localPlayer);
     605        */
    601606        this->glmis->step();
    602607        break;
     
    628633{
    629634  this->bPause = false;
     635  this->pilotNode = NULL;
    630636  CommandNode* cn = Orxonox::getInstance()->getLocalInput();
    631637  cn->addToWorld(this);
     
    10991105  else if( !strcmp( cmd->cmd, CONFIG_NAME_VIEW4)) this->localCamera->setViewMode(VIEW_RIGHT);
    11001106  else if( !strcmp( cmd->cmd, CONFIG_NAME_VIEW5)) this->localCamera->setViewMode(VIEW_TOP);
    1101 
     1107  else if(this->pilotNode != NULL) if( !strcmp( cmd->cmd, "cursor")) this->pilotNode->command(cmd);
    11021108  return false;
    11031109}
Note: See TracChangeset for help on using the changeset viewer.