Changeset 2956 for code/branches/map/src/orxonox/objects
- Timestamp:
- May 7, 2009, 4:44:12 PM (16 years ago)
- Location:
- code/branches/map/src/orxonox/objects
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/map/src/orxonox/objects/RadarViewable.cc
r2942 r2956 52 52 , MapEntity_(NULL) 53 53 , line_(NULL) 54 , isHumanShip_(false) 54 55 { 55 56 RegisterRootObject(RadarViewable); … … 69 70 { 70 71 delete MapNode_; 72 MapNode_=0; 71 73 delete MapEntity_; 74 MapEntity_=0; 75 delete line_; 76 line_=0; 77 delete LineNode_; 78 LineNode_=0; 72 79 } 73 80 … … 91 98 92 99 this->MapNode_->attachObject( this->MapEntity_ ); 93 this->MapNode_->attachObject( this->line_ ); 100 101 this->LineNode_ = this->MapNode_->createChildSceneNode(); 102 this->LineNode_->attachObject( this->line_ ); 94 103 } 95 104 else … … 106 115 this->MapNode_->translate( this->getRVOrientedVelocity(), (Ogre::Node::TransformSpace)3 ); 107 116 this->MapNode_->setOrientation( this->getWorldEntity()->getOrientation() ); 108 Vector3 v = this->getRVWorldPosition(); 109 this->line_->setPoint(1, Vector3(0,v.y,0) ); 117 //Vector3 v = this->getRVWorldPosition(); 118 //this->line_->setPoint(1, Vector3(0,v.y,0) ); 119 this->line_->setPoint(1, Vector3(0, -this->getRVWorldPosition().y ,0) ); 120 this->line_->update(); 121 this->LineNode_->setDirection(Vector3::UNIT_Y,Ogre::Node::TS_WORLD,Vector3::UNIT_Y); 110 122 } 111 123 } -
code/branches/map/src/orxonox/objects/RadarViewable.h
r2942 r2956 101 101 Ogre::Entity * MapEntity_; 102 102 DynamicLines* line_; 103 Ogre::SceneNode * LineNode_; 103 104 void addMapEntity(); 104 105 void updateMapPosition(); 106 bool isHumanShip_; 107 inline std::string getUniqueId() 108 { 109 return this->uniqueId_; 110 } 111 105 112 private: 106 113 void validate(const WorldEntity* object) const … … 113 120 } 114 121 122 //Map 123 std::string uniqueId_; 115 124 116 std::string uniqueId_;117 125 126 //Radar 118 127 float radarObjectCamouflage_; 119 128 Shape radarObjectShape_; -
code/branches/map/src/orxonox/objects/worldentities/pawns/Pawn.cc
r2782 r2956 75 75 76 76 this->registerVariables(); 77 78 this->isHumanShip_ = this->hasLocalController(); 77 79 } 78 80 … … 291 293 } 292 294 295 //Tell the Map (RadarViewable), if this is a playership 296 void Pawn::startLocalHumanControl() 297 { 298 // SUPER(ControllableEntity, changedPlayer()); 299 ControllableEntity::startLocalHumanControl(); 300 this->isHumanShip_ = true; 301 } 302 293 303 294 304 /////////////////// -
code/branches/map/src/orxonox/objects/worldentities/pawns/Pawn.h
r2662 r2956 108 108 109 109 virtual void dropItems(); 110 111 virtual void startLocalHumanControl(); 110 112 111 113 protected:
Note: See TracChangeset
for help on using the changeset viewer.