Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9002 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
Jul 2, 2006, 12:47:18 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: redirect everything to see into the dof of the _centerNode

Location:
trunk/src/world_entities
Files:
3 edited

Legend:

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

    r9001 r9002  
    114114        if (_centerNode->distance(*it) < this->_range)
    115115        {
    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));
    117119        }
    118120
     
    128130    GLGuiWidget::draw();
    129131
    130     glPointSize(2.0f);
    131     for (unsigned int i = 0; i < this->_dotLists.size(); ++i)
     132    if (likely(this->_centerNode != NULL))
    132133    {
    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)
    135139      {
    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        }
    139147      }
    140148    }
  • trunk/src/world_entities/player.h

    r7339 r9002  
    3232    inline Playable*  getPlayable() const  { return this->playable; };
    3333
     34//     inline Hud& hud() { return this->_hud; };
     35//     inline const Hud& hud() const { return this->_hud; };
     36
     37
    3438    void              weaponConfigChanged();
    3539
     
    3842
    3943  private:
    40     Playable*         playable;                  //!< The one we controll or NULL if none
    41     Hud               hud;                       //!< The HUD to be displayed for this Player.
     44    Playable*         playable;                 //!< The one we controll or NULL if none
     45    Hud               hud;                      //!< The HUD to be displayed for this Player.
    4246};
    4347
  • trunk/src/world_entities/weapons/test_gun.cc

    r8984 r9002  
    120120  this->setStateDuration(WS_DEACTIVATING, .4);
    121121
    122   this->setEnergyMax(1000);
    123   this->increaseEnergy(1000);
     122  this->setEnergyMax(10000);
     123  this->increaseEnergy(10000);
    124124  //this->minCharge = 2;
    125125
Note: See TracChangeset for help on using the changeset viewer.