[Orxonox-commit 3155] r7848 - code/trunk/src/modules/weapons/projectiles
landauf at orxonox.net
landauf at orxonox.net
Thu Feb 10 18:05:08 CET 2011
Author: landauf
Date: 2011-02-10 18:05:08 +0100 (Thu, 10 Feb 2011)
New Revision: 7848
Modified:
code/trunk/src/modules/weapons/projectiles/Rocket.cc
Log:
fixed "sound volume out of range" warning when firing a rocked. max volume is 1.0f.
Modified: code/trunk/src/modules/weapons/projectiles/Rocket.cc
===================================================================
--- code/trunk/src/modules/weapons/projectiles/Rocket.cc 2011-02-10 16:42:29 UTC (rev 7847)
+++ code/trunk/src/modules/weapons/projectiles/Rocket.cc 2011-02-10 17:05:08 UTC (rev 7848)
@@ -87,13 +87,13 @@
this->defSndWpnEngine_ = new WorldSound(this);
this->defSndWpnEngine_->setLooping(true);
this->defSndWpnEngine_->setSource("sounds/Rocket_engine.ogg");
- this->defSndWpnEngine_->setVolume(100);
+ this->defSndWpnEngine_->setVolume(1.0f);
this->attach(defSndWpnEngine_);
this->defSndWpnLaunch_ = new WorldSound(this);
this->defSndWpnLaunch_->setLooping(false);
this->defSndWpnLaunch_->setSource("sounds/Rocket_launch.ogg");
- this->defSndWpnLaunch_->setVolume(100);
+ this->defSndWpnLaunch_->setVolume(1.0f);
this->attach(defSndWpnLaunch_);
}
else
@@ -237,7 +237,7 @@
this->destroy();
// }
}
-
+
void Rocket::destructionEffect()
{
ParticleSpawner *effect1, *effect2;
@@ -251,13 +251,13 @@
effect1 = new ParticleSpawner(static_cast<BaseObject*>(this->getScene().get()));
effect2 = new ParticleSpawner(static_cast<BaseObject*>(this->getScene().get()));
}
-
+
effect1->setPosition(this->getPosition());
effect1->setOrientation(this->getOrientation());
effect1->setDestroyAfterLife(true);
effect1->setSource("Orxonox/explosion4");
effect1->setLifetime(2.0f);
-
+
effect2->setPosition(this->getPosition());
effect2->setOrientation(this->getOrientation());
effect2->setDestroyAfterLife(true);
More information about the Orxonox-commit
mailing list