Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2007, 5:52:08 PM (17 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/world_entities/space_ships
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/world_entities/space_ships/space_ship.cc

    r10261 r10270  
    395395
    396396  LoadParam(root, "playmode", this, SpaceShip, setPlaymodeXML);
     397  LoadParam(root, "cameraDistance", this, SpaceShip, setCameraDistance);
     398  LoadParam(root, "cameraFovy", this, SpaceShip, setCameraFovy);
    397399}
    398400
     
    418420  this->secWeaponMan.showCrosshair();
    419421  this->toList( OM_GROUP_01 );
     422  State::getPlayer()->hud().setRadarCenterNode(this->travelNode);
    420423  State::getPlayer()->hud().setOverlayActive(true);
    421424  //dynamic_cast <OrxGui::GLGuiEnergyWidgetVertical*> (State::getPlayer()->hud().getArmorWidget())->setDisplayedName("Armor");
     
    431434  State::getPlayer()->hud().setOverlayActive(false);
    432435  State::getCamera()->setEventHandling(true);
     436  State::getPlayer()->hud().setRadarCenterNode(NULL);
    433437  //dynamic_cast<Element2D*>(this->secWeaponMan.getFixedTarget())->setVisibility( false);
    434438  //this->detachCamera();
     
    10801084  }
    10811085}
     1086
     1087void SpaceShip::setCameraDistance(float dist)
     1088{
     1089  State::getCamera()->setViewTopDistance(dist);
     1090}
     1091
     1092void SpaceShip::setCameraFovy(float fovy)
     1093{
     1094  State::getCamera()->setViewTopFovy(fovy);
     1095}
  • branches/playability/src/world_entities/space_ships/space_ship.h

    r10261 r10270  
    7171    inline float getElectronicCur() { return this->electronicCur; }; //!< returns current electronic value
    7272    inline float getElectronicMax() { return this->electronicMax; }; //!< returns current electronic value
     73
     74    inline PNode* getTravelNode() { return this->travelNode; };
    7375
    7476    //damage handler
     
    179181    float                 cameraSpeed;
    180182
     183    void                  setCameraDistance(float dist);
     184    void                  setCameraFovy(float fovy);
     185
    181186    /*
    182187    Quaternion            mouseDir;           //!< the direction where the player wants to fly
Note: See TracChangeset for help on using the changeset viewer.