Changeset 3089 for code/trunk/src/orxonox/objects/worldentities
- Timestamp:
- May 27, 2009, 4:11:31 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/map (added) merged: 2802,2812,2837-2838,2856,2913,2942,2956,2977,3082
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/objects/worldentities/CameraPosition.cc
r2826 r3089 30 30 #include "CameraPosition.h" 31 31 32 #include <OgreCamera.h> 33 32 34 #include "core/CoreIncludes.h" 33 35 #include "core/XMLPort.h" … … 45 47 this->bAllowMouseLook_ = false; 46 48 this->bAbsolute_ = false; 49 this->bRenderCamera_ = false; 47 50 48 51 this->setObjectMode(0x0); … … 60 63 XMLPortParam(CameraPosition, "mouselook", setAllowMouseLook, getAllowMouseLook, xmlelement, mode).defaultValues(false); 61 64 XMLPortParam(CameraPosition, "absolute", setIsAbsolute, getIsAbsolute, xmlelement, mode).defaultValues(false); 65 XMLPortParam(CameraPosition, "rendercamera", setRenderCamera, getRenderCamera, xmlelement, mode).defaultValues(false); 62 66 } 63 67 … … 72 76 camera->setDrag(true); 73 77 } 78 79 void CameraPosition::attachCamera(Ogre::Camera* camera) 80 { 81 this->attachOgreObject(camera); 82 } 74 83 } -
code/trunk/src/orxonox/objects/worldentities/CameraPosition.h
r2826 r3089 59 59 { return this->bAbsolute_; } 60 60 61 inline void setRenderCamera(bool bRenderCamera) 62 { this->bRenderCamera_ = bRenderCamera; } 63 inline bool getRenderCamera() const 64 { return this->bRenderCamera_; } 65 61 66 void attachCamera(Camera* camera); 67 void attachCamera(Ogre::Camera* camera); 62 68 63 69 private: … … 65 71 bool bAllowMouseLook_; 66 72 bool bAbsolute_; 73 bool bRenderCamera_; 67 74 }; 68 75 } -
code/trunk/src/orxonox/objects/worldentities/ControllableEntity.cc
r3084 r3089 63 63 this->camera_ = 0; 64 64 this->xmlcontroller_ = 0; 65 this->reverseCamera_ = 0; 65 66 this->bDestroyWhenPlayerLeft_ = false; 66 67 this->cameraPositionRootNode_ = this->node_->createChildSceneNode(); … … 143 144 parent->attach(position); 144 145 } 145 this->cameraPositions_.push_back(position); 146 147 if (!position->getRenderCamera()) 148 this->cameraPositions_.push_back(position); 149 else 150 this->setReverseCamera(position); 146 151 } 147 152 -
code/trunk/src/orxonox/objects/worldentities/ControllableEntity.h
r3073 r3089 107 107 inline const std::string& getCameraPositionTemkplate() const 108 108 { return this->cameraPositionTemplate_; } 109 110 inline void setReverseCamera(CameraPosition* camera) 111 { this->reverseCamera_ = camera; } 112 inline CameraPosition* getReverseCamera() const 113 { return this->reverseCamera_; } 109 114 110 115 using WorldEntity::setPosition; … … 192 197 std::string cameraPositionTemplate_; 193 198 Controller* xmlcontroller_; 199 CameraPosition* reverseCamera_; 194 200 }; 195 201 } -
code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.cc
r3087 r3089 86 86 87 87 this->registerVariables(); 88 89 this->isHumanShip_ = this->hasLocalController(); 88 90 } 89 91 … … 365 367 } 366 368 369 //Tell the Map (RadarViewable), if this is a playership 370 void Pawn::startLocalHumanControl() 371 { 372 // SUPER(ControllableEntity, changedPlayer()); 373 ControllableEntity::startLocalHumanControl(); 374 this->isHumanShip_ = true; 375 } 376 367 377 368 378 /////////////////// -
code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.h
r3087 r3089 112 112 virtual void useItem() 113 113 { this->pickups_.useItem(); } 114 115 virtual void startLocalHumanControl(); 114 116 115 117 protected:
Note: See TracChangeset
for help on using the changeset viewer.