Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9000 in orxonox.OLD for trunk/src/world_entities/elements


Ignore:
Timestamp:
Jul 2, 2006, 6:43:15 AM (19 years ago)
Author:
bensch
Message:

nicer, better radar

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/elements/glgui_radar.cc

    r8999 r9000  
    5353  void GLGuiRadar::addEntityList(const std::list<WorldEntity*>* entityList, const Color& color)
    5454  {
     55    for (unsigned int i = 0; i < this->_dotLists.size(); ++i)
     56      if (_dotLists[i].entityList == entityList)
     57        return;
     58
    5559    GLGuiRadar::DotList dotList;
    5660    dotList.dotColor = color;
     
    108112        if (_centerNode->distance(*it) < this->_range)
    109113        {
    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));
    111115        }
    112116
     
    133137      }
    134138    }
    135 
    136139    this->endDraw();
    137140  }
Note: See TracChangeset for help on using the changeset viewer.