Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8597


Ignore:
Timestamp:
May 26, 2011, 2:29:03 PM (13 years ago)
Author:
dafrick
Message:

Merging steering branch into presentation branch.

Location:
code/branches/presentation
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation

  • code/branches/presentation/data/levels/includes/weaponSettingsAssff.oxi

    r8592 r8597  
    3030        <Weapon>
    3131          <attached>
    32             <Model mesh="stunweapon.mesh" pitch="180" roll="0" yaw="0" position="1.9,-.5,1" scale=".5"/>
    33             <BlinkingBillboard position="1.9, -.5, -5.5" material="PE/lensflare" colour="0.128, 0.28, 1" amplitude=0.25 frequency=16 quadratic=0 />
     32            <Model mesh="LightningGun.mesh" pitch="103" roll="90" yaw="90" position="0,-1.35,0" />
     33            <Model mesh="LightningGun-s.mesh" pitch="103" roll="90" yaw="90" position="0.2,-1.35,0" />
     34            <Model mesh="hs-w01_reduced.mesh" roll="90" pitch="-104" yaw="-90" position="0,1.3,0.3" scale=0.6 />
    3435          </attached>
    3536          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
  • code/branches/presentation/data/levels/templates/spaceshipAssff.oxt

    r8589 r8597  
    2020   primaryThrust     = 100
    2121   auxilaryThrust    = 30
    22    rotationThrust    = 25
     22   rotationThrust    = 50
     23
     24   lift = 1;
     25   stallSpeed = 220;
    2326
    2427   boostPower            = 15
  • code/branches/presentation/data/levels/templates/spaceshipAssff2.oxt

    r8593 r8597  
    1818   reloadwaittime      = 0.5
    1919
    20    primaryThrust     = 100;
    21    auxilaryThrust    = 30;
    22    rotationThrust    = 25;
     20   primaryThrust     = 100
     21   auxilaryThrust    = 30
     22   rotationThrust    = 50
     23
     24   lift = 1;
     25   stallSpeed = 220;
    2326
    2427   boostPower            = 10
  • code/branches/presentation/src/orxonox/worldentities/MobileEntity.cc

    r8589 r8597  
    8383                this->linearVelocity_.z += this->linearAcceleration_.z * dt;
    8484                this->node_->translate(this->linearVelocity_ * dt);
     85
     86   
    8587
    8688                // Angular part
  • code/branches/presentation/src/orxonox/worldentities/pawns/SpaceShip.cc

    r8589 r8597  
    3636#include "core/XMLPort.h"
    3737#include "tools/Shader.h"
     38#include "util/Debug.h" // TODO: Needed?
    3839#include "util/Math.h"
    3940
     
    6869        this->boostCooldownDuration_ = 5.0;
    6970        this->bBoostCooldown_ = false;
     71
     72        this->lift_ = 1.0f;                         // factor of the lift, standard is 1
     73        this->stallSpeed_ = 220.0f;                 // max speed where lift is added
    7074
    7175        this->bInvertYAxis_ = false;
     
    116120                XMLPortParamVariable(SpaceShip, "shakeFrequency", shakeFrequency_, xmlelement, mode);
    117121        XMLPortParamVariable(SpaceShip, "shakeAmplitude", shakeAmplitude_, xmlelement, mode);
     122                XMLPortParamVariable(SpaceShip, "lift", lift_, xmlelement, mode);
     123        XMLPortParamVariable(SpaceShip, "stallSpeed", stallSpeed_, xmlelement, mode);
    118124
    119125        XMLPortObject(SpaceShip, Engine, "engines", addEngine, getEngine, xmlelement, mode);
     
    132138        registerVariable(this->shakeFrequency_, VariableDirection::ToClient);
    133139        registerVariable(this->shakeAmplitude_, VariableDirection::ToClient);
     140        registerVariable(this->lift_, VariableDirection::ToClient);
     141        registerVariable(this->stallSpeed_, VariableDirection::ToClient);
    134142    }
    135143
     
    240248    void SpaceShip::rotatePitch(const Vector2& value)
    241249    {
    242         this->localAngularAcceleration_.setX(this->localAngularAcceleration_.x() + value.x);
     250        this->localAngularAcceleration_.setX(this->localAngularAcceleration_.x() + value.x*0.8);
    243251
    244252        Pawn::rotatePitch(value);
     253
     254                //This function call adds a lift to the ship when it is pitching to make it's movement more "realistic" and enhance the feeling.
     255        if (abs(this-> getLocalVelocity().z) < stallSpeed_)  {this->moveUpDown(lift_ / 5 * value * sqrt(abs(this-> getLocalVelocity().z)));}
    245256    }
    246257
  • code/branches/presentation/src/orxonox/worldentities/pawns/SpaceShip.h

    r8594 r8597  
    9898            float boostPowerRate_;
    9999            float boostCooldownDuration_;
     100            float lift_;
     101            float stallSpeed_;
    100102            Vector3 steering_;
    101103            float primaryThrust_;
Note: See TracChangeset for help on using the changeset viewer.