[Orxonox-commit 3903] r8577 - in code/branches/gameimmersion: data/levels data/levels/includes data/levels/templates src/orxonox/graphics src/orxonox/weaponsystem src/orxonox/worldentities/pawns
dafrick at orxonox.net
dafrick at orxonox.net
Wed May 25 21:07:17 CEST 2011
Author: dafrick
Date: 2011-05-25 21:07:17 +0200 (Wed, 25 May 2011)
New Revision: 8577
Added:
code/branches/gameimmersion/data/levels/shieldTest.oxw
Removed:
code/branches/gameimmersion/data/levels/test-immersion-shield-01.oxw
Modified:
code/branches/gameimmersion/data/levels/includes/weaponSettingsAssff.oxi
code/branches/gameimmersion/data/levels/templates/spaceshipAssff.oxt
code/branches/gameimmersion/src/orxonox/graphics/Camera.cc
code/branches/gameimmersion/src/orxonox/graphics/Camera.h
code/branches/gameimmersion/src/orxonox/weaponsystem/WeaponMode.cc
code/branches/gameimmersion/src/orxonox/weaponsystem/WeaponMode.h
code/branches/gameimmersion/src/orxonox/worldentities/pawns/Pawn.cc
code/branches/gameimmersion/src/orxonox/worldentities/pawns/Pawn.h
code/branches/gameimmersion/src/orxonox/worldentities/pawns/SpaceShip.cc
Log:
Cleanup. Adding shield and boost shaking to Assff.
Modified: code/branches/gameimmersion/data/levels/includes/weaponSettingsAssff.oxi
===================================================================
--- code/branches/gameimmersion/data/levels/includes/weaponSettingsAssff.oxi 2011-05-25 17:03:45 UTC (rev 8576)
+++ code/branches/gameimmersion/data/levels/includes/weaponSettingsAssff.oxi 2011-05-25 19:07:17 UTC (rev 8577)
@@ -25,7 +25,7 @@
</attached>
<HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
<HsW01 mode=0 munitionpershot=0 delay=0 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
- <LightningGun mode=1 muzzleoffset="0,0,0" damage=23 />
+ <LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20 />
</Weapon>
<Weapon>
<attached>
@@ -35,11 +35,11 @@
</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" />
- <LightningGun mode=1 muzzleoffset="0,0,0" damage=23 />
+ <LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20 />
</Weapon>
<Weapon>
- <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=50 />
- <RocketFire mode=3 muzzleoffset="0,0,0" damage=100 />
+ <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
+ <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
</Weapon>
</WeaponPack>
<WeaponPack>
Copied: code/branches/gameimmersion/data/levels/shieldTest.oxw (from rev 8573, code/branches/gameimmersion/data/levels/test-immersion-shield-01.oxw)
===================================================================
--- code/branches/gameimmersion/data/levels/shieldTest.oxw (rev 0)
+++ code/branches/gameimmersion/data/levels/shieldTest.oxw 2011-05-25 19:07:17 UTC (rev 8577)
@@ -0,0 +1,85 @@
+<LevelInfo
+ name = "Shield Testlevel"
+ description = "A simple Level with one shielded drone to shoot at"
+ tags = "test"
+/>
+
+<?lua
+ include("HUDTemplates3.oxo")
+ include("stats.oxo")
+ include("templates/spaceshipImmTest.oxt")
+ include("templates/lodInformation.oxt")
+?>
+
+<Level
+ name = "shieldTL"
+ description = "LEVEL-DESCRIPTION"
+>
+
+<templates>
+ <Template link=lodtemplate_default />
+</templates>
+
+<Scene
+ ambientlight = "0.8, 0.5, 0.5"
+ skybox = "Orxonox/Starbox"
+>
+
+
+
+
+<Drone name="meineDrohne"
+ primarythrust= "80"
+ auxilarythrust= "10"
+ rotationthrust= "10"
+ mass= "50"
+ linearDamping= "0.9"
+ angularDamping= "0.7"
+
+ health= 100
+ maxhealth= 150
+ inithealth= 200
+
+ shieldhealth= 100
+ initialshieldhealth= 200
+ maxshieldhealth= 250
+
+ shieldabsorption= 1
+
+ reloadrate= "10"
+ reloadwaittime= 1
+
+>
+ <attached>
+ <Model scale="4" mesh="drone.mesh"/>
+ </attached>
+ <collisionShapes>
+ <BoxCollisionShape position="0,0,0" halfExtents="10, 10, 10" />
+ </collisionShapes>
+</Drone>
+
+<Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
+
+
+ <?lua
+ for i = 1, 10, 1 do
+ ?>
+ <SpawnPoint position="<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipimmtest />
+ <?lua end ?>
+
+ <GlobalShader compositor="Bloom" visible=false>
+ <events>
+ <visibility>
+ <DistanceTrigger position="0,0,0" distance=30 target="Spectator" switch=true />
+ </visibility>
+ </events>
+ </GlobalShader>
+ <Model position="0,0,0" scale=8 mesh="ast1.mesh" />
+ <StaticEntity position="0,0,0" collisionType=static>
+ <collisionShapes>
+ <SphereCollisionShape radius="20" />
+ </collisionShapes>
+ </StaticEntity>
+
+ </Scene>
+</Level>
Modified: code/branches/gameimmersion/data/levels/templates/spaceshipAssff.oxt
===================================================================
--- code/branches/gameimmersion/data/levels/templates/spaceshipAssff.oxt 2011-05-25 17:03:45 UTC (rev 8576)
+++ code/branches/gameimmersion/data/levels/templates/spaceshipAssff.oxt 2011-05-25 19:07:17 UTC (rev 8577)
@@ -11,10 +11,25 @@
maxhealth = 200
initialhealth = 100
- primaryThrust = 100;
- auxilaryThrust = 30;
- rotationThrust = 25;
+ shieldhealth = 30
+ initialshieldhealth = 30
+ maxshieldhealth = 50
+ shieldabsorption = 0.8
+ reloadrate = 1
+ reloadwaittime = 1
+ primaryThrust = 100
+ auxilaryThrust = 30
+ rotationThrust = 25
+
+ boostPower = 15
+ boostPowerRate = 1
+ boostRate = 5
+ boostCooldownDuration = 10
+
+ shakeFrequency = 15
+ shakeAmplitude = 7
+
collisionType = "dynamic"
mass = 100
linearDamping = 0.7
Deleted: code/branches/gameimmersion/data/levels/test-immersion-shield-01.oxw
===================================================================
--- code/branches/gameimmersion/data/levels/test-immersion-shield-01.oxw 2011-05-25 17:03:45 UTC (rev 8576)
+++ code/branches/gameimmersion/data/levels/test-immersion-shield-01.oxw 2011-05-25 19:07:17 UTC (rev 8577)
@@ -1,84 +0,0 @@
-<LevelInfo
- name = "shield-test-level"
- description = "A simple Level with one shielded drone to shoot at"
-/>
-
-<?lua
- include("HUDTemplates3.oxo")
- include("stats.oxo")
- include("templates/spaceshipImmTest.oxt")
- include("templates/lodInformation.oxt")
-?>
-
-<Level
- name = "shieldTL"
- description = "LEVEL-DESCRIPTION"
->
-
-<templates>
- <Template link=lodtemplate_default />
-</templates>
-
-<Scene
- ambientlight = "0.8, 0.5, 0.5"
- skybox = "Orxonox/Starbox"
->
-
-
-
-
-<Drone name="meineDrohne"
- primarythrust= "80"
- auxilarythrust= "10"
- rotationthrust= "10"
- mass= "50"
- linearDamping= "0.9"
- angularDamping= "0.7"
-
- health= 100
- maxhealth= 150
- inithealth= 200
-
- shieldhealth= 100
- initialshieldhealth= 200
- maxshieldhealth= 250
-
- shieldabsorption= 1
-
- reloadrate= "10"
- reloadwaittime= 1
-
->
- <attached>
- <Model scale="4" mesh="drone.mesh"/>
- </attached>
- <collisionShapes>
- <BoxCollisionShape position="0,0,0" halfExtents="10, 10, 10" />
- </collisionShapes>
-</Drone>
-
-<Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
-
-
- <?lua
- for i = 1, 10, 1 do
- ?>
- <SpawnPoint position="<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipimmtest />
- <?lua end ?>
-
- <GlobalShader compositor="Bloom" visible=false>
- <events>
- <visibility>
- <DistanceTrigger position="0,0,0" distance=30 target="Spectator" switch=true />
- </visibility>
- </events>
- </GlobalShader>
- <Model position="0,0,0" scale=8 mesh="ast1.mesh" />
- <StaticEntity position="0,0,0" collisionType=static>
- <collisionShapes>
- <SphereCollisionShape radius="20" />
- </collisionShapes>
- </StaticEntity>
-
- </Scene>
-</Level>
Modified: code/branches/gameimmersion/src/orxonox/graphics/Camera.cc
===================================================================
--- code/branches/gameimmersion/src/orxonox/graphics/Camera.cc 2011-05-25 17:03:45 UTC (rev 8576)
+++ code/branches/gameimmersion/src/orxonox/graphics/Camera.cc 2011-05-25 19:07:17 UTC (rev 8577)
@@ -47,7 +47,6 @@
{
CreateFactory(Camera);
- //Camera::Camera(BaseObject* creator) : StaticEntity(creator)
Camera::Camera(BaseObject* creator) : MovableEntity(creator)
{
RegisterObject(Camera);
Modified: code/branches/gameimmersion/src/orxonox/graphics/Camera.h
===================================================================
--- code/branches/gameimmersion/src/orxonox/graphics/Camera.h 2011-05-25 17:03:45 UTC (rev 8576)
+++ code/branches/gameimmersion/src/orxonox/graphics/Camera.h 2011-05-25 19:07:17 UTC (rev 8577)
@@ -35,12 +35,11 @@
#include "core/WindowEventListener.h"
#include "tools/interfaces/Tickable.h"
#include "tools/interfaces/TimeFactorListener.h"
-//#include "worldentities/StaticEntity.h"
#include "worldentities/MovableEntity.h"
namespace orxonox
{
- //class _OrxonoxExport Camera : public StaticEntity, public Tickable, public TimeFactorListener, public WindowEventListener
+
class _OrxonoxExport Camera : public MovableEntity, public TimeFactorListener, public WindowEventListener
{
friend class CameraManager;
Modified: code/branches/gameimmersion/src/orxonox/weaponsystem/WeaponMode.cc
===================================================================
--- code/branches/gameimmersion/src/orxonox/weaponsystem/WeaponMode.cc 2011-05-25 17:03:45 UTC (rev 8576)
+++ code/branches/gameimmersion/src/orxonox/weaponsystem/WeaponMode.cc 2011-05-25 19:07:17 UTC (rev 8577)
@@ -65,10 +65,9 @@
this->reloadTimer_.stopTimer();
this->damage_ = 0;
-///////////////////me
this->healthdamage_ = 0;
this->shielddamage_ = 0;
-///////////////////end me
+
this->muzzleOffset_ = Vector3::ZERO;
this->muzzlePosition_ = Vector3::ZERO;
this->muzzleOrientation_ = Quaternion::IDENTITY;
@@ -108,10 +107,8 @@
XMLPortParam(WeaponMode, "parallelreload", setParallelReload, getParallelReload, xmlelement, mode).description("If true, the weapon reloads in parallel to the magazine reloading");
XMLPortParam(WeaponMode, "damage", setDamage, getDamage, xmlelement, mode);
-//////////me
XMLPortParam(WeaponMode, "healthdamage", setHealthDamage, getHealthDamage, xmlelement, mode);
XMLPortParam(WeaponMode, "shielddamage", setShieldDamage, getShieldDamage, xmlelement, mode);
-/////////end me
XMLPortParam(WeaponMode, "muzzleoffset", setMuzzleOffset, getMuzzleOffset, xmlelement, mode);
}
Modified: code/branches/gameimmersion/src/orxonox/weaponsystem/WeaponMode.h
===================================================================
--- code/branches/gameimmersion/src/orxonox/weaponsystem/WeaponMode.h 2011-05-25 17:03:45 UTC (rev 8576)
+++ code/branches/gameimmersion/src/orxonox/weaponsystem/WeaponMode.h 2011-05-25 19:07:17 UTC (rev 8577)
@@ -106,8 +106,6 @@
{ this->damage_ = damage;}
inline float getDamage() const
{ return this->damage_; }
-////////////////////me, copied to projectile.cc
-
inline void setHealthDamage(float healthdamage)
{ this->healthdamage_ = healthdamage; }
inline float getHealthDamage() const
@@ -118,7 +116,6 @@
inline float getShieldDamage() const
{ return this->shielddamage_; }
-///////////////////end me
inline void setMuzzleOffset(const Vector3& offset)
{ this->muzzleOffset_ = offset; }
inline const Vector3& getMuzzleOffset() const
Modified: code/branches/gameimmersion/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- code/branches/gameimmersion/src/orxonox/worldentities/pawns/Pawn.cc 2011-05-25 17:03:45 UTC (rev 8576)
+++ code/branches/gameimmersion/src/orxonox/worldentities/pawns/Pawn.cc 2011-05-25 19:07:17 UTC (rev 8577)
@@ -129,8 +129,6 @@
XMLPortParam(Pawn, "reloadrate", setReloadRate, getReloadRate, xmlelement, mode).defaultValues(0);
XMLPortParam(Pawn, "reloadwaittime", setReloadWaitTime, getReloadWaitTime, xmlelement, mode).defaultValues(1.0f);
-
- //TODO: DEFINES fuer defaultwerte (hier und weiter oben dieselben)
}
void Pawn::registerVariables()
@@ -226,40 +224,6 @@
this->reloadWaitCountdown_ -= dt;
}
- /* Old damage function.
- * For effects causing only damage not specifically to shield or health
- */
- void Pawn::damage(float damage, Pawn* originator)
- {
- if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator))
- {
- //share the dealt damage to the shield and the Pawn.
- float shielddamage = damage*this->shieldAbsorption_;
- float healthdamage = damage*(1-this->shieldAbsorption_);
-
- // In case the shield can not take all the shield damage.
- if (shielddamage > this->getShieldHealth())
- {
- healthdamage += shielddamage-this->getShieldHealth();
- this->setShieldHealth(0);
- }
-
- this->setHealth(this->health_ - healthdamage);
-
- if (this->getShieldHealth() > 0)
- {
- this->setShieldHealth(this->shieldHealth_ - shielddamage);
- }
-
- this->lastHitOriginator_ = originator;
-
- // play damage effect
- }
- }
-
- /* Does damage to the pawn, splits it up to shield and health.
- * Sets lastHitOriginator.
- */
void Pawn::damage(float damage, float healthdamage, float shielddamage, Pawn* originator)
{
if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator))
@@ -283,60 +247,25 @@
}
this->lastHitOriginator_ = originator;
-
- // play damage effect
}
}
-
+// TODO: Still valid?
/* HIT-Funktionen
Die hit-Funktionen muessen auch in src/orxonox/controllers/Controller.h angepasst werden! (Visuelle Effekte)
*/
- /* Old hit function, calls the old damage function and changes velocity vector
- */
- void Pawn::hit(Pawn* originator, const Vector3& force, float damage)
- {
- if (this->getGametype() && this->getGametype()->allowPawnHit(this, originator) && (!this->getController() || !this->getController()->getGodMode()) )
- {
- this->damage(damage, originator);
- this->setVelocity(this->getVelocity() + force);
-
- // play hit effect
- }
- }
-
- /* calls the damage function and adds the force that hit the pawn to the velocity vector
- */
void Pawn::hit(Pawn* originator, const Vector3& force, float damage, float healthdamage, float shielddamage)
{
if (this->getGametype() && this->getGametype()->allowPawnHit(this, originator) && (!this->getController() || !this->getController()->getGodMode()) )
{
this->damage(damage, healthdamage, shielddamage, originator);
this->setVelocity(this->getVelocity() + force);
-
- // play hit effect
}
}
- /* Old hit (2) function, calls the old damage function and hits controller
- */
- void Pawn::hit(Pawn* originator, btManifoldPoint& contactpoint, float damage)
- {
- if (this->getGametype() && this->getGametype()->allowPawnHit(this, originator) && (!this->getController() || !this->getController()->getGodMode()) )
- {
- this->damage(damage, originator);
- if ( this->getController() )
- this->getController()->hit(originator, contactpoint, damage);
-
- // play hit effect
- }
- }
-
- /* Hit (2) function, calls the damage function and hits controller
- */
void Pawn::hit(Pawn* originator, btManifoldPoint& contactpoint, float damage, float healthdamage, float shielddamage)
{
if (this->getGametype() && this->getGametype()->allowPawnHit(this, originator) && (!this->getController() || !this->getController()->getGodMode()) )
@@ -345,8 +274,6 @@
if ( this->getController() )
this->getController()->hit(originator, contactpoint, damage); // changed to damage, why shielddamage?
-
- // play hit effect
}
}
Modified: code/branches/gameimmersion/src/orxonox/worldentities/pawns/Pawn.h
===================================================================
--- code/branches/gameimmersion/src/orxonox/worldentities/pawns/Pawn.h 2011-05-25 17:03:45 UTC (rev 8576)
+++ code/branches/gameimmersion/src/orxonox/worldentities/pawns/Pawn.h 2011-05-25 19:07:17 UTC (rev 8577)
@@ -53,46 +53,6 @@
inline bool isAlive() const
{ return this->bAlive_; }
-///////////////////////////////// me
- virtual void setReloadRate(float reloadrate);
- inline float getReloadRate() const
- { return this->reloadRate_; }
-
- inline void addShieldHealth(float amount)
- { this->setShieldHealth(this->shieldHealth_ + amount); }
-
- inline bool hasShield()
- { return (this->getShieldHealth() > 0); }
-
- virtual void setReloadWaitTime(float reloadwaittime);
- inline float getReloadWaitTime() const
- { return this->reloadWaitTime_; }
-
- inline void resetReloadCountdown()
- { this->reloadWaitCountdown_ = 0; }
-
- inline void startReloadCountdown()
- { this->reloadWaitCountdown_ = this->getReloadWaitTime(); } //in projectile.cc einbauen!!!!!!1111!!111!
-
- virtual void decreaseReloadCountdownTime(float dt);
-
- virtual void setMaxShieldHealth(float maxshieldhealth);
- inline float getMaxShieldHealth() const
- { return this->maxShieldHealth_; }
-
- inline void setInitialShieldHealth(float initialshieldhealth)
- { this->initialShieldHealth_ = initialshieldhealth; this->setShieldHealth(initialshieldhealth); }
- inline float getInitialShieldHealth() const
- { return this->initialShieldHealth_; }
-
- inline void restoreInitialShieldHealth()
- { this->setShieldHealth(this->initialShieldHealth_); }
- inline void restoreMaxShieldHealth()
- { this->setShieldHealth(this->maxShieldHealth_); }
-
-
-///////////////////////////////// end me
-
virtual void setHealth(float health);
inline void addHealth(float health)
{ this->setHealth(this->health_ + health); }
@@ -116,20 +76,56 @@
inline float getShieldHealth()
{ return this->shieldHealth_; }
+ inline void addShieldHealth(float amount)
+ { this->setShieldHealth(this->shieldHealth_ + amount); }
+
+ inline bool hasShield()
+ { return (this->getShieldHealth() > 0); }
+
+ virtual void setMaxShieldHealth(float maxshieldhealth);
+ inline float getMaxShieldHealth() const
+ { return this->maxShieldHealth_; }
+
+ inline void setInitialShieldHealth(float initialshieldhealth)
+ { this->initialShieldHealth_ = initialshieldhealth; this->setShieldHealth(initialshieldhealth); }
+ inline float getInitialShieldHealth() const
+ { return this->initialShieldHealth_; }
+
+ inline void restoreInitialShieldHealth()
+ { this->setShieldHealth(this->initialShieldHealth_); }
+ inline void restoreMaxShieldHealth()
+ { this->setShieldHealth(this->maxShieldHealth_); }
+
inline void setShieldAbsorption(float shieldAbsorption)
{ this->shieldAbsorption_ = shieldAbsorption; }
inline float getShieldAbsorption()
{ return this->shieldAbsorption_; }
+ // TODO: Rename to shieldRechargeRate
+ virtual void setReloadRate(float reloadrate);
+ inline float getReloadRate() const
+ { return this->reloadRate_; }
+
+ virtual void setReloadWaitTime(float reloadwaittime);
+ inline float getReloadWaitTime() const
+ { return this->reloadWaitTime_; }
+
+ inline void resetReloadCountdown()
+ { this->reloadWaitCountdown_ = 0; }
+
+ inline void startReloadCountdown()
+ { this->reloadWaitCountdown_ = this->getReloadWaitTime(); } // TODO: Implement in Projectile.cc
+
+ virtual void decreaseReloadCountdownTime(float dt);
+
inline ControllableEntity* getLastHitOriginator() const
{ return this->lastHitOriginator_; }
- virtual void hit(Pawn* originator, const Vector3& force, float damage);
- virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage);
-/////////me
- virtual void hit(Pawn* originator, const Vector3& force, float damage, float healthdamage, float shielddamage);
- virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage, float healthdamage, float shielddamage);
-////////end me
+ //virtual void hit(Pawn* originator, const Vector3& force, float damage);
+ //virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage);
+ virtual void hit(Pawn* originator, const Vector3& force, float damage, float healthdamage = 0.0f, float shielddamage = 0.0f);
+ virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage, float healthdamage = 0.0f, float shielddamage = 0.0f);
+
virtual void kill();
virtual void fired(unsigned int firemode);
@@ -185,10 +181,8 @@
virtual void deatheffect();
virtual void spawneffect();
- virtual void damage(float damage, Pawn* originator = 0);
-//////////me
- virtual void damage(float damage, float healthdamage, float shielddamage, Pawn* originator);
-/////////end me
+ //virtual void damage(float damage, Pawn* originator = 0);
+ virtual void damage(float damage, float healthdamage = 0.0f, float shielddamage = 0.0f, Pawn* originator = NULL);
bool bAlive_;
@@ -197,21 +191,17 @@
virtual PickupCarrier* getCarrierParent(void) const
{ return NULL; }
-/////////////////////////// me
- float reloadRate_;
- float reloadWaitTime_;
- float reloadWaitCountdown_;
-
- float maxShieldHealth_;
- float initialShieldHealth_;
-
-////////////////////////// end me
-
float health_;
float maxHealth_;
float initialHealth_;
+
float shieldHealth_;
+ float maxShieldHealth_;
+ float initialShieldHealth_;
float shieldAbsorption_; // Has to be between 0 and 1
+ float reloadRate_;
+ float reloadWaitTime_;
+ float reloadWaitCountdown_;
WeakPtr<Pawn> lastHitOriginator_;
Modified: code/branches/gameimmersion/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/branches/gameimmersion/src/orxonox/worldentities/pawns/SpaceShip.cc 2011-05-25 17:03:45 UTC (rev 8576)
+++ code/branches/gameimmersion/src/orxonox/worldentities/pawns/SpaceShip.cc 2011-05-25 19:07:17 UTC (rev 8577)
@@ -106,6 +106,7 @@
XMLPortParamVariable(SpaceShip, "boostRate", boostRate_, xmlelement, mode);
XMLPortParamVariable(SpaceShip, "boostCooldownDuration", boostCooldownDuration_, xmlelement, mode);
XMLPortParamVariable(SpaceShip, "shakeFrequency", shakeFrequency_, xmlelement, mode);
+ XMLPortParamVariable(SpaceShip, "shakeAmplitude", shakeAmplitude_, xmlelement, mode);
}
void SpaceShip::registerVariables()
@@ -113,11 +114,13 @@
registerVariable(this->primaryThrust_, VariableDirection::ToClient);
registerVariable(this->auxilaryThrust_, VariableDirection::ToClient);
registerVariable(this->rotationThrust_, VariableDirection::ToClient);
+ // TODO: Synchronization of boost needed?
registerVariable(this->boostPower_, VariableDirection::ToClient);
registerVariable(this->boostPowerRate_, VariableDirection::ToClient);
registerVariable(this->boostRate_, VariableDirection::ToClient);
registerVariable(this->boostCooldownDuration_, VariableDirection::ToClient);
registerVariable(this->shakeFrequency_, VariableDirection::ToClient);
+ registerVariable(this->shakeAmplitude_, VariableDirection::ToClient);
}
void SpaceShip::setConfigValues()
More information about the Orxonox-commit
mailing list