Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10498 in orxonox.OLD for trunk/src/world_entities


Ignore:
Timestamp:
Jan 30, 2007, 11:10:09 AM (18 years ago)
Author:
bknecht
Message:

use pauseCamera in scripts to pause the track of the camera. this works also with pause on NPCs and spaceships with tracks

Location:
trunk/src/world_entities
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/cameraman.cc

    r10497 r10498  
    4848                        ->addMethod("setRelCoor", Executor4<CameraMan, lua_State*,const std::string&,float,float,float>(&CameraMan::setRelCameraCoor))
    4949                        ->addMethod("setRelCoorSoft", Executor5<CameraMan, lua_State*,const std::string&,float,float,float,float>(&CameraMan::setRelCameraCoorSoft))
     50                        ->addMethod("pauseCamera", Executor2<CameraMan, lua_State*, const std::string&, bool>(&CameraMan::pauseCamera))
    5051                       );
    5152
     
    134135     dynamic_cast<Camera*>(newCam)->setRelCoorSoft(x,y,z,bias);
    135136     dynamic_cast<Camera*>(newCam)->target->setRelCoorSoft(0,0,0,bias);
     137}
     138
     139void CameraMan::pauseCamera(const std::string& camName, bool stop)
     140{
     141     BaseObject* newCam = ObjectListBase::getBaseObject("Camera", camName);
     142     dynamic_cast<Camera*>(newCam)->pauseTrack(stop);
    136143}
    137144
  • trunk/src/world_entities/cameraman.h

    r10497 r10498  
    5858    void setRelCameraCoorSoft(const std::string& cameraName, float x, float y, float z, float bias);
    5959    //void setViewMode(const std::string& camName, const std::string& viewMode);
     60    void pauseCamera(const std::string& camName, bool stop);
    6061   
    6162    void changeSpeed(float speed);
  • trunk/src/world_entities/npcs/npc.cc

    r10459 r10498  
    5252                        ->addMethod("setAbsDir", Executor4<PNode, lua_State*,float,float,float,float>(&PNode::setAbsDir))
    5353                        ->addMethod("fire", Executor0<NPC, lua_State*>(&NPC::fire))
    54 
     54                        ->addMethod("pause", Executor1<WorldEntity, lua_State*, bool>(&WorldEntity::pauseTrack))
    5555                       );
    5656
  • trunk/src/world_entities/space_ships/space_ship.cc

    r10497 r10498  
    9191                        ->addMethod("getAbsCoorZ", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorZ))
    9292                        //->addMethod("setCameraSpeed", Executor1<SpaceShip, lua_State*, float>(&SpaceShip::setCameraSpeed))
     93                        ->addMethod("pause", Executor1<WorldEntity, lua_State*, bool>(&WorldEntity::pauseTrack))
    9394                       );
    9495
  • trunk/src/world_entities/world_entity.cc

    r10449 r10498  
    198198}
    199199
     200void WorldEntity::pauseTrack(bool stop)
     201{
     202     if(this->entityTrack)
     203       this->entityTrack->pauseTrack(stop);
     204}
     205
    200206
    201207/**
  • trunk/src/world_entities/world_entity.h

    r10449 r10498  
    176176  ;  ///FIXME
    177177  void debugEntity() const;
     178 
     179  void pauseTrack(bool stop);
    178180
    179181
     
    192194  void updateHealthWidget();
    193195  void addTrack(const TiXmlElement* root);
     196 
    194197
    195198
Note: See TracChangeset for help on using the changeset viewer.