- Timestamp:
- Jul 2, 2006, 6:43:15 AM (18 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/util/hud.cc
r8996 r9000 185 185 printf("UPDATING RADAR\n"); 186 186 this->_radar->setCenterNode(State::getPlayer()->getPlayable()); 187 this->_radar->addEntityList(&State::getObjectManager()->getObjectList((OM_LIST)(State::getPlayer()->getPlayable()->getOMListNumber()+1)), Color ::red);187 this->_radar->addEntityList(&State::getObjectManager()->getObjectList((OM_LIST)(State::getPlayer()->getPlayable()->getOMListNumber()+1)), Color(.4, .4, 1.0)); 188 188 this->_radar->setAbsCoor2D(0.8 * this->resX, 0.1 * this->resY); 189 189 this->_radar->setWidgetSize(0.2 * this->resX, 0.2 * this->resY); -
trunk/src/world_entities/elements/glgui_radar.cc
r8999 r9000 53 53 void GLGuiRadar::addEntityList(const std::list<WorldEntity*>* entityList, const Color& color) 54 54 { 55 for (unsigned int i = 0; i < this->_dotLists.size(); ++i) 56 if (_dotLists[i].entityList == entityList) 57 return; 58 55 59 GLGuiRadar::DotList dotList; 56 60 dotList.dotColor = color; … … 108 112 if (_centerNode->distance(*it) < this->_range) 109 113 { 110 this->_dotLists[i].positions.push_back(Vector2D(this->getSizeX2D() / 2.0f, this->getSizeY2D() / 2.0f) + Vector2D( _centerNode->getAbsCoor().x - (*it)->getAbsCoor().x, _centerNode->getAbsCoor().z - (*it)->getAbsCoor().z)* (this->getSizeX2D() / 2.0f /_range));114 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)); 111 115 } 112 116 … … 133 137 } 134 138 } 135 136 139 this->endDraw(); 137 140 }
Note: See TracChangeset
for help on using the changeset viewer.