[Orxonox-commit 3923] r8597 - in code/branches/presentation: . data/levels/includes data/levels/templates src/orxonox/worldentities src/orxonox/worldentities/pawns
dafrick at orxonox.net
dafrick at orxonox.net
Thu May 26 14:29:04 CEST 2011
Author: dafrick
Date: 2011-05-26 14:29:03 +0200 (Thu, 26 May 2011)
New Revision: 8597
Modified:
code/branches/presentation/
code/branches/presentation/data/levels/includes/weaponSettingsAssff.oxi
code/branches/presentation/data/levels/templates/spaceshipAssff.oxt
code/branches/presentation/data/levels/templates/spaceshipAssff2.oxt
code/branches/presentation/src/orxonox/worldentities/MobileEntity.cc
code/branches/presentation/src/orxonox/worldentities/pawns/SpaceShip.cc
code/branches/presentation/src/orxonox/worldentities/pawns/SpaceShip.h
Log:
Merging steering branch into presentation branch.
Property changes on: code/branches/presentation
___________________________________________________________________
Modified: svn:mergeinfo
- /code/branches/ai:6592-7033
/code/branches/bigships:8137-8588
/code/branches/buildsystem:1874-2276,2278-2400
/code/branches/buildsystem2:2506-2658
/code/branches/buildsystem3:2662-2708
/code/branches/ceguilua:1802-1808
/code/branches/chat:6527-6797
/code/branches/chat2:6836-6910
/code/branches/console:5941-6104
/code/branches/consolecommands2:6451-7178
/code/branches/consolecommands3:7178-7283
/code/branches/core3:1572-1739
/code/branches/core4:3221-3224,3227,3234-3238,3242,3244-3250,3252-3254,3256,3259-3261,3264-3265,3268-3275,3277-3278,3280,3284-3285,3287,3289-3294,3305,3309-3310
/code/branches/core5:5768-5928,6009
/code/branches/data_cleanup:7537-7686
/code/branches/doc:7290-7400
/code/branches/dockingsystem:8101-8192
/code/branches/dockingsystem2:8196-8560
/code/branches/dynamicmatch:6584-7030
/code/branches/fps:6591-7072
/code/branches/gameimmersion:8102-8577
/code/branches/gamestate:6430-6572,6621-6661
/code/branches/gamestates2:6594-6745
/code/branches/gametypes:2826-3031
/code/branches/gcc43:1580
/code/branches/gui:1635-1723,2795-2894
/code/branches/hudelements:6584-6941
/code/branches/ingamemenu:6000-6023
/code/branches/input:1629-1636
/code/branches/ipv6:7293-7458
/code/branches/kicklib:7940-8096,8098-8277
/code/branches/kicklib2:8282-8350
/code/branches/lastmanstanding:7479-7644
/code/branches/lastmanstanding3:7903-8175
/code/branches/libraries:5612-5692
/code/branches/libraries2:5703-5737
/code/branches/lod:6586-6911
/code/branches/lodfinal:2372-2411
/code/branches/mac_osx:7789-8128,8135
/code/branches/map:2801-3086,3089
/code/branches/masterserver:7502-7738
/code/branches/menu:5941-6146,6148,7536-7687
/code/branches/miniprojects:2754-2824
/code/branches/netp2:2835-2988
/code/branches/netp3:2988-3082
/code/branches/netp6:3214-3302
/code/branches/network:2356
/code/branches/network2:6434-6465
/code/branches/network3:7196-7344
/code/branches/network4:7497-7755
/code/branches/network5:7757-7781
/code/branches/network6:7823-8315
/code/branches/network64:2210-2355
/code/branches/notifications:7314-7401
/code/branches/objecthierarchy:1911-2085,2100,2110-2169
/code/branches/objecthierarchy2:2171-2479
/code/branches/ois_update:7506-7788
/code/branches/overlay:2117-2385
/code/branches/particles:2829-3085
/code/branches/particles2:6050-6106,6109
/code/branches/pch:3113-3194
/code/branches/physics:1912-2055,2107-2439
/code/branches/physics_merge:2436-2457
/code/branches/pickup:8145-8555
/code/branches/pickup2:5942-6405
/code/branches/pickup3:6418-6523
/code/branches/pickup4:6594-6710
/code/branches/pickups:1926-2086,2127,2827-2915
/code/branches/pickups2:2107-2497,2915-3071
/code/branches/png2:7262-7263
/code/branches/portals:8087-8455
/code/branches/ppspickups1:6552-6708
/code/branches/ppspickups2:6527-6532,6554-6709
/code/branches/ppspickups3:6757-6997
/code/branches/ppspickups4:7003-7089
/code/branches/presentation:2369-2652,2654-2660,7736-7786
/code/branches/presentation2:6106-6416,7787-7800
/code/branches/presentation3:6913-7162
/code/branches/questsystem:1894-2088
/code/branches/questsystem2:2107-2259
/code/branches/questsystem5:2776-2905
/code/branches/releasetodo:7614-7647
/code/branches/resource:3327-3366
/code/branches/resource2:3372-5694
/code/branches/rocket:6523-6950
/code/branches/rocket2:6953-6970
/code/branches/script_trigger:1295-1953,1955
/code/branches/skybox2:6559-6989
/code/branches/sound:2829-3010
/code/branches/sound3:5941-6102
/code/branches/spaceboundaries:8085-8457
/code/branches/steering:5949-6091,8140-8377
/code/branches/tetris:8100-8563
/code/branches/usability:7915-8078
/code/branches/weapon:1925-2094
/code/branches/weapon2:2107-2488
/code/branches/weapons:2897-3051,8143-8591
/code/branches/weaponsystem:2742-2890
+ /code/branches/ai:6592-7033
/code/branches/bigships:8137-8588
/code/branches/buildsystem:1874-2276,2278-2400
/code/branches/buildsystem2:2506-2658
/code/branches/buildsystem3:2662-2708
/code/branches/ceguilua:1802-1808
/code/branches/chat:6527-6797
/code/branches/chat2:6836-6910
/code/branches/console:5941-6104
/code/branches/consolecommands2:6451-7178
/code/branches/consolecommands3:7178-7283
/code/branches/core3:1572-1739
/code/branches/core4:3221-3224,3227,3234-3238,3242,3244-3250,3252-3254,3256,3259-3261,3264-3265,3268-3275,3277-3278,3280,3284-3285,3287,3289-3294,3305,3309-3310
/code/branches/core5:5768-5928,6009
/code/branches/data_cleanup:7537-7686
/code/branches/doc:7290-7400
/code/branches/dockingsystem:8101-8192
/code/branches/dockingsystem2:8196-8560
/code/branches/dynamicmatch:6584-7030
/code/branches/fps:6591-7072
/code/branches/gameimmersion:8102-8577
/code/branches/gamestate:6430-6572,6621-6661
/code/branches/gamestates2:6594-6745
/code/branches/gametypes:2826-3031
/code/branches/gcc43:1580
/code/branches/gui:1635-1723,2795-2894
/code/branches/hudelements:6584-6941
/code/branches/ingamemenu:6000-6023
/code/branches/input:1629-1636
/code/branches/ipv6:7293-7458
/code/branches/kicklib:7940-8096,8098-8277
/code/branches/kicklib2:8282-8350
/code/branches/lastmanstanding:7479-7644
/code/branches/lastmanstanding3:7903-8175
/code/branches/libraries:5612-5692
/code/branches/libraries2:5703-5737
/code/branches/lod:6586-6911
/code/branches/lodfinal:2372-2411
/code/branches/mac_osx:7789-8128,8135
/code/branches/map:2801-3086,3089
/code/branches/masterserver:7502-7738
/code/branches/menu:5941-6146,6148,7536-7687
/code/branches/miniprojects:2754-2824
/code/branches/netp2:2835-2988
/code/branches/netp3:2988-3082
/code/branches/netp6:3214-3302
/code/branches/network:2356
/code/branches/network2:6434-6465
/code/branches/network3:7196-7344
/code/branches/network4:7497-7755
/code/branches/network5:7757-7781
/code/branches/network6:7823-8315
/code/branches/network64:2210-2355
/code/branches/notifications:7314-7401
/code/branches/objecthierarchy:1911-2085,2100,2110-2169
/code/branches/objecthierarchy2:2171-2479
/code/branches/ois_update:7506-7788
/code/branches/overlay:2117-2385
/code/branches/particles:2829-3085
/code/branches/particles2:6050-6106,6109
/code/branches/pch:3113-3194
/code/branches/physics:1912-2055,2107-2439
/code/branches/physics_merge:2436-2457
/code/branches/pickup:8145-8555
/code/branches/pickup2:5942-6405
/code/branches/pickup3:6418-6523
/code/branches/pickup4:6594-6710
/code/branches/pickups:1926-2086,2127,2827-2915
/code/branches/pickups2:2107-2497,2915-3071
/code/branches/png2:7262-7263
/code/branches/portals:8087-8455
/code/branches/ppspickups1:6552-6708
/code/branches/ppspickups2:6527-6532,6554-6709
/code/branches/ppspickups3:6757-6997
/code/branches/ppspickups4:7003-7089
/code/branches/presentation:2369-2652,2654-2660,7736-7786
/code/branches/presentation2:6106-6416,7787-7800
/code/branches/presentation3:6913-7162
/code/branches/questsystem:1894-2088
/code/branches/questsystem2:2107-2259
/code/branches/questsystem5:2776-2905
/code/branches/releasetodo:7614-7647
/code/branches/resource:3327-3366
/code/branches/resource2:3372-5694
/code/branches/rocket:6523-6950
/code/branches/rocket2:6953-6970
/code/branches/script_trigger:1295-1953,1955
/code/branches/skybox2:6559-6989
/code/branches/sound:2829-3010
/code/branches/sound3:5941-6102
/code/branches/spaceboundaries:8085-8457
/code/branches/steering:5949-6091,8140-8595
/code/branches/tetris:8100-8563
/code/branches/usability:7915-8078
/code/branches/weapon:1925-2094
/code/branches/weapon2:2107-2488
/code/branches/weapons:2897-3051,8143-8591
/code/branches/weaponsystem:2742-2890
Modified: code/branches/presentation/data/levels/includes/weaponSettingsAssff.oxi
===================================================================
--- code/branches/presentation/data/levels/includes/weaponSettingsAssff.oxi 2011-05-26 12:22:22 UTC (rev 8596)
+++ code/branches/presentation/data/levels/includes/weaponSettingsAssff.oxi 2011-05-26 12:29:03 UTC (rev 8597)
@@ -29,8 +29,9 @@
</Weapon>
<Weapon>
<attached>
- <Model mesh="stunweapon.mesh" pitch="180" roll="0" yaw="0" position="1.9,-.5,1" scale=".5"/>
- <BlinkingBillboard position="1.9, -.5, -5.5" material="PE/lensflare" colour="0.128, 0.28, 1" amplitude=0.25 frequency=16 quadratic=0 />
+ <Model mesh="LightningGun.mesh" pitch="103" roll="90" yaw="90" position="0,-1.35,0" />
+ <Model mesh="LightningGun-s.mesh" pitch="103" roll="90" yaw="90" position="0.2,-1.35,0" />
+ <Model mesh="hs-w01_reduced.mesh" roll="90" pitch="-104" yaw="-90" position="0,1.3,0.3" scale=0.6 />
</attached>
<HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
<HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
Modified: code/branches/presentation/data/levels/templates/spaceshipAssff.oxt
===================================================================
--- code/branches/presentation/data/levels/templates/spaceshipAssff.oxt 2011-05-26 12:22:22 UTC (rev 8596)
+++ code/branches/presentation/data/levels/templates/spaceshipAssff.oxt 2011-05-26 12:29:03 UTC (rev 8597)
@@ -19,8 +19,11 @@
primaryThrust = 100
auxilaryThrust = 30
- rotationThrust = 25
+ rotationThrust = 50
+ lift = 1;
+ stallSpeed = 220;
+
boostPower = 15
boostPowerRate = 1
boostRate = 5
Modified: code/branches/presentation/data/levels/templates/spaceshipAssff2.oxt
===================================================================
--- code/branches/presentation/data/levels/templates/spaceshipAssff2.oxt 2011-05-26 12:22:22 UTC (rev 8596)
+++ code/branches/presentation/data/levels/templates/spaceshipAssff2.oxt 2011-05-26 12:29:03 UTC (rev 8597)
@@ -17,10 +17,13 @@
reloadrate = 5
reloadwaittime = 0.5
- primaryThrust = 100;
- auxilaryThrust = 30;
- rotationThrust = 25;
+ primaryThrust = 100
+ auxilaryThrust = 30
+ rotationThrust = 50
+ lift = 1;
+ stallSpeed = 220;
+
boostPower = 10
boostPowerRate = 1
boostRate = 5
Modified: code/branches/presentation/src/orxonox/worldentities/MobileEntity.cc
===================================================================
--- code/branches/presentation/src/orxonox/worldentities/MobileEntity.cc 2011-05-26 12:22:22 UTC (rev 8596)
+++ code/branches/presentation/src/orxonox/worldentities/MobileEntity.cc 2011-05-26 12:29:03 UTC (rev 8597)
@@ -83,6 +83,8 @@
this->linearVelocity_.z += this->linearAcceleration_.z * dt;
this->node_->translate(this->linearVelocity_ * dt);
+
+
// Angular part
// Note: angularVelocity_ is a Quaternion with w = 0 while angularAcceleration_ is a Vector3
this->angularVelocity_.x += angularAcceleration_.x * dt;
Modified: code/branches/presentation/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/branches/presentation/src/orxonox/worldentities/pawns/SpaceShip.cc 2011-05-26 12:22:22 UTC (rev 8596)
+++ code/branches/presentation/src/orxonox/worldentities/pawns/SpaceShip.cc 2011-05-26 12:29:03 UTC (rev 8597)
@@ -35,6 +35,7 @@
#include "core/Template.h"
#include "core/XMLPort.h"
#include "tools/Shader.h"
+#include "util/Debug.h" // TODO: Needed?
#include "util/Math.h"
#include "graphics/Camera.h"
@@ -68,6 +69,9 @@
this->boostCooldownDuration_ = 5.0;
this->bBoostCooldown_ = false;
+ this->lift_ = 1.0f; // factor of the lift, standard is 1
+ this->stallSpeed_ = 220.0f; // max speed where lift is added
+
this->bInvertYAxis_ = false;
this->setDestroyWhenPlayerLeft(true);
@@ -115,6 +119,8 @@
XMLPortParamVariable(SpaceShip, "boostCooldownDuration", boostCooldownDuration_, xmlelement, mode);
XMLPortParamVariable(SpaceShip, "shakeFrequency", shakeFrequency_, xmlelement, mode);
XMLPortParamVariable(SpaceShip, "shakeAmplitude", shakeAmplitude_, xmlelement, mode);
+ XMLPortParamVariable(SpaceShip, "lift", lift_, xmlelement, mode);
+ XMLPortParamVariable(SpaceShip, "stallSpeed", stallSpeed_, xmlelement, mode);
XMLPortObject(SpaceShip, Engine, "engines", addEngine, getEngine, xmlelement, mode);
}
@@ -131,6 +137,8 @@
registerVariable(this->boostCooldownDuration_, VariableDirection::ToClient);
registerVariable(this->shakeFrequency_, VariableDirection::ToClient);
registerVariable(this->shakeAmplitude_, VariableDirection::ToClient);
+ registerVariable(this->lift_, VariableDirection::ToClient);
+ registerVariable(this->stallSpeed_, VariableDirection::ToClient);
}
void SpaceShip::setConfigValues()
@@ -239,9 +247,12 @@
void SpaceShip::rotatePitch(const Vector2& value)
{
- this->localAngularAcceleration_.setX(this->localAngularAcceleration_.x() + value.x);
+ this->localAngularAcceleration_.setX(this->localAngularAcceleration_.x() + value.x*0.8);
Pawn::rotatePitch(value);
+
+ //This function call adds a lift to the ship when it is pitching to make it's movement more "realistic" and enhance the feeling.
+ if (abs(this-> getLocalVelocity().z) < stallSpeed_) {this->moveUpDown(lift_ / 5 * value * sqrt(abs(this-> getLocalVelocity().z)));}
}
void SpaceShip::rotateRoll(const Vector2& value)
Modified: code/branches/presentation/src/orxonox/worldentities/pawns/SpaceShip.h
===================================================================
--- code/branches/presentation/src/orxonox/worldentities/pawns/SpaceShip.h 2011-05-26 12:22:22 UTC (rev 8596)
+++ code/branches/presentation/src/orxonox/worldentities/pawns/SpaceShip.h 2011-05-26 12:29:03 UTC (rev 8597)
@@ -97,6 +97,8 @@
float boostRate_;
float boostPowerRate_;
float boostCooldownDuration_;
+ float lift_;
+ float stallSpeed_;
Vector3 steering_;
float primaryThrust_;
float auxilaryThrust_;
More information about the Orxonox-commit
mailing list