- Timestamp:
- Jul 2, 2006, 12:47:18 PM (18 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/elements/glgui_radar.cc
r9001 r9002 114 114 if (_centerNode->distance(*it) < this->_range) 115 115 { 116 this->_dotLists[i].positions.push_back(Vector2D(this->getSizeX2D() / 2.0f, this->getSizeY2D() / 2.0f) + Vector2D((_centerNode->getAbsCoor().x - (*it)->getAbsCoor().x) * this->getSizeX2D(), (_centerNode->getAbsCoor().z - (*it)->getAbsCoor().z) * this->getSizeY2D())/ (2.0f * _range)); 116 this->_dotLists[i].positions.push_back(Vector2D(((*it)->getAbsCoor().x - _centerNode->getAbsCoor().x) * this->getSizeX2D() , 117 ((*it)->getAbsCoor().z - _centerNode->getAbsCoor().z) * this->getSizeY2D() ) 118 / (2.0f * _range)); 117 119 } 118 120 … … 128 130 GLGuiWidget::draw(); 129 131 130 glPointSize(2.0f); 131 for (unsigned int i = 0; i < this->_dotLists.size(); ++i) 132 if (likely(this->_centerNode != NULL)) 132 133 { 133 glColor4fv(&_dotLists[i].dotColor[0]); 134 for (unsigned int j = 0; j < this->_dotLists[i].positions.size(); ++j) 134 glTranslatef(this->getSizeX2D()/2.0f, this->getSizeY2D()/2.0f, 0); 135 glRotatef((this->_centerNode->getAbsDir().getHeading() - M_PI_2)* 180.0 /M_PI , 0, 0, 1); 136 137 glPointSize(2.0f); 138 for (unsigned int i = 0; i < this->_dotLists.size(); ++i) 135 139 { 136 glBegin(GL_POINTS); 137 glVertex2f(this->_dotLists[i].positions[j].x, this->_dotLists[i].positions[j].y); 138 glEnd(); 140 glColor4fv(&_dotLists[i].dotColor[0]); 141 for (unsigned int j = 0; j < this->_dotLists[i].positions.size(); ++j) 142 { 143 glBegin(GL_POINTS); 144 glVertex2f(this->_dotLists[i].positions[j].x, this->_dotLists[i].positions[j].y); 145 glEnd(); 146 } 139 147 } 140 148 } -
trunk/src/world_entities/player.h
r7339 r9002 32 32 inline Playable* getPlayable() const { return this->playable; }; 33 33 34 // inline Hud& hud() { return this->_hud; }; 35 // inline const Hud& hud() const { return this->_hud; }; 36 37 34 38 void weaponConfigChanged(); 35 39 … … 38 42 39 43 private: 40 Playable* playable; 41 Hud hud; 44 Playable* playable; //!< The one we controll or NULL if none 45 Hud hud; //!< The HUD to be displayed for this Player. 42 46 }; 43 47 -
trunk/src/world_entities/weapons/test_gun.cc
r8984 r9002 120 120 this->setStateDuration(WS_DEACTIVATING, .4); 121 121 122 this->setEnergyMax(1000 );123 this->increaseEnergy(1000 );122 this->setEnergyMax(10000); 123 this->increaseEnergy(10000); 124 124 //this->minCharge = 2; 125 125
Note: See TracChangeset
for help on using the changeset viewer.