Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10270 in orxonox.OLD for branches/playability/src/util


Ignore:
Timestamp:
Jan 17, 2007, 5:52:08 PM (18 years ago)
Author:
muellmic
Message:

1) the centerpoint of the radar is now the centerpoint of the camera, so the enemies won't move in the radar when the player is moving; 2)fovy and cameradistance of each viewmode can now be set dynamically. so one would't have to readjust the fovy for each viewmode, when it has been manually changed once. (it's better to just change the fovy or distance for the viewmode where you need it); 3)unlike in the last revision, it doesnt have a soft- zoom- effect when setting a fovy anymore.

Location:
branches/playability/src/util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/util/hud.cc

    r10234 r10270  
    3030#include "specials/glgui_notifier.h"
    3131#include "elements/glgui_radar.h"
     32#include "world_entities/space_ships/space_ship.h"
    3233
    3334
     
    6970
    7071  this->_radar = new OrxGui::GLGuiRadar();
     72  this->radarCenterNode = NULL;
    7173
    7274  this->subscribeEvent(ES_ALL, EV_VIDEO_RESIZE);
     
    329331    PRINTF(4)("UPDATING RADAR\n");
    330332    this->_radar->setParent2D(this->leftRect);
    331     this->_radar->setCenterNode(State::getPlayer()->getPlayable());
     333    if (radarCenterNode == NULL)
     334      this->_radar->setCenterNode(State::getPlayer()->getPlayable());
     335    else
     336      this->_radar->setCenterNode(this->radarCenterNode);
     337
    332338    //this->_radar->addEntityList(&State::getObjectManager()->getEntityList((OM_LIST)(State::getPlayer()->getPlayable()->getOMListNumber()+1)), Color(.4, .4, 1.0));
    333339    this->_radar->addEntityList(&State::getObjectManager()->getEntityList(OM_GROUP_00), Color(1, 0, 0));
  • branches/playability/src/util/hud.h

    r10233 r10270  
    4646
    4747  void setWeaponManager(WeaponManager* weaponMan, WeaponManager* weaponManSec = NULL);
     48  inline void setRadarCenterNode(PNode* node) {this->radarCenterNode = node;};
    4849
    4950  void addWeaponWidget(OrxGui::GLGuiWidget* widget);
     
    9091  OrxGui::GLGuiInputLine*  inputLine;
    9192  OrxGui::GLGuiRadar*      _radar;
     93  PNode*                   radarCenterNode;
    9294
    9395  OrxGui::GLGuiWidget*     rightRect;
Note: See TracChangeset for help on using the changeset viewer.