[Orxonox-commit 6254] r10911 - in code/branches/particleEffectsHS15: data/levels/includes src/modules/weapons/projectiles src/modules/weapons/weaponmodes
fvultier at orxonox.net
fvultier at orxonox.net
Tue Dec 1 17:52:54 CET 2015
Author: fvultier
Date: 2015-12-01 17:52:53 +0100 (Tue, 01 Dec 2015)
New Revision: 10911
Modified:
code/branches/particleEffectsHS15/data/levels/includes/weaponSettingsEscort.oxi
code/branches/particleEffectsHS15/src/modules/weapons/projectiles/IceGunProjectile.cc
code/branches/particleEffectsHS15/src/modules/weapons/projectiles/IceGunProjectile.h
code/branches/particleEffectsHS15/src/modules/weapons/projectiles/MineProjectile.cc
code/branches/particleEffectsHS15/src/modules/weapons/weaponmodes/MineGun.cc
Log:
Modified: code/branches/particleEffectsHS15/data/levels/includes/weaponSettingsEscort.oxi
===================================================================
--- code/branches/particleEffectsHS15/data/levels/includes/weaponSettingsEscort.oxi 2015-12-01 15:33:46 UTC (rev 10910)
+++ code/branches/particleEffectsHS15/data/levels/includes/weaponSettingsEscort.oxi 2015-12-01 16:52:53 UTC (rev 10911)
@@ -13,7 +13,7 @@
<DefaultWeaponmodeLink firemode=1 weaponmode=1 />
</links>
<Weapon>
- <MineGun mode=0 munitionpershot=0 delay=0.125 damage=50 shielddamage=15 healthdamage=10 muzzleoffset=" 0.1, 1.4,-3" maxtimeuntilexplosion=25 timeuntilactivation=2.5/>
+ <MineGun mode=0 munitionpershot=0 delay=0.125 damage=50 shielddamage=15 healthdamage=10 muzzleoffset=" 0.1, 1.4,-10" maxtimeuntilexplosion=25 timeuntilactivation=2.5/>
</Weapon>
<Weapon>
<IceGun mode=0 munitionpershot=0 delay=0.125 damage=9.3 muzzleoffset=" 0.1, 1.4,-3" freezefactor=0.5 freezetime=2.0 />
Modified: code/branches/particleEffectsHS15/src/modules/weapons/projectiles/IceGunProjectile.cc
===================================================================
--- code/branches/particleEffectsHS15/src/modules/weapons/projectiles/IceGunProjectile.cc 2015-12-01 15:33:46 UTC (rev 10910)
+++ code/branches/particleEffectsHS15/src/modules/weapons/projectiles/IceGunProjectile.cc 2015-12-01 16:52:53 UTC (rev 10911)
@@ -47,6 +47,8 @@
{
RegisterClass(IceGunProjectile);
+ const float IceGunProjectile::particleDestructionDelay_ = 15.0f;
+
IceGunProjectile::IceGunProjectile(Context* context) : Projectile(context)
{
RegisterObject(IceGunProjectile);
@@ -66,7 +68,8 @@
emitter_ = new ParticleEmitter(this->getContext());
this->attach(emitter_);
emitter_->setOrientation(this->getOrientation());
- emitter_->setSource("Orxonox/ice");
+ emitter_->setSource("Orxonox/ice");
+ emitter_->setDeleteWithParent(false);
}
IceGunProjectile::~IceGunProjectile()
@@ -82,7 +85,7 @@
this->getScene()->getRootSceneNode()->addChild(const_cast<Ogre::SceneNode*>(emitter_->getNode()));
const ExecutorPtr& executor = createExecutor(createFunctor(&ParticleEmitter::destroy, emitter_));
- new Timer(15, false, executor, true);
+ new Timer(particleDestructionDelay_, false, executor, true);
}
}
Modified: code/branches/particleEffectsHS15/src/modules/weapons/projectiles/IceGunProjectile.h
===================================================================
--- code/branches/particleEffectsHS15/src/modules/weapons/projectiles/IceGunProjectile.h 2015-12-01 15:33:46 UTC (rev 10910)
+++ code/branches/particleEffectsHS15/src/modules/weapons/projectiles/IceGunProjectile.h 2015-12-01 16:52:53 UTC (rev 10911)
@@ -62,6 +62,7 @@
protected:
virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
+ static const float particleDestructionDelay_;
private:
ParticleEmitter* emitter_;
float freezeTime_; //The duration of the freezing effect on a target
Modified: code/branches/particleEffectsHS15/src/modules/weapons/projectiles/MineProjectile.cc
===================================================================
--- code/branches/particleEffectsHS15/src/modules/weapons/projectiles/MineProjectile.cc 2015-12-01 15:33:46 UTC (rev 10910)
+++ code/branches/particleEffectsHS15/src/modules/weapons/projectiles/MineProjectile.cc 2015-12-01 16:52:53 UTC (rev 10911)
@@ -116,9 +116,10 @@
if (GameMode::isMaster())
{
this->setMass(10.0f);
- this->setFriction(100.0f);
+ this->setLinearDamping(0.5f);
+ this->setAngularDamping(0.1f);
this->enableCollisionCallback();
- this->setCollisionResponse(false);
+ this->setCollisionResponse(true);
this->setCollisionType(Dynamic);
// Create a sphere collision shape and attach it to the projectile.
@@ -149,8 +150,10 @@
modelRing3_->destroy();
modelRing4_->destroy();
- distanceTrigger_->destroy();
-
+ if (distanceTrigger_)
+ {
+ distanceTrigger_->destroy();
+ }
if (emitter_)
{
emitter_->destroy();
Modified: code/branches/particleEffectsHS15/src/modules/weapons/weaponmodes/MineGun.cc
===================================================================
--- code/branches/particleEffectsHS15/src/modules/weapons/weaponmodes/MineGun.cc 2015-12-01 15:33:46 UTC (rev 10910)
+++ code/branches/particleEffectsHS15/src/modules/weapons/weaponmodes/MineGun.cc 2015-12-01 16:52:53 UTC (rev 10911)
@@ -50,7 +50,7 @@
{
RegisterObject(MineGun);
- this->speed_ = 0.0f;
+ this->speed_ = 1000.0f;
this->reloadTime_ = 1.0f;
this->damage_ = 0.0f;
this->maxTimeUntilExplosion_ = 0.0f;
More information about the Orxonox-commit
mailing list