[Orxonox-commit 1663] r6381 - in code/branches/presentation2/src: modules/weapons/projectiles orxonox orxonox/items orxonox/weaponsystem

rgrieder at orxonox.net rgrieder at orxonox.net
Sat Dec 19 00:07:33 CET 2009


Author: rgrieder
Date: 2009-12-19 00:07:32 +0100 (Sat, 19 Dec 2009)
New Revision: 6381

Modified:
   code/branches/presentation2/src/modules/weapons/projectiles/Rocket.cc
   code/branches/presentation2/src/orxonox/Scene.cc
   code/branches/presentation2/src/orxonox/items/MultiStateEngine.cc
   code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.cc
Log:
Copy&paste for dummies in Scene.cc (caused fire sound to be very quiet).
And replaced a few sound deletes with destroy().

Modified: code/branches/presentation2/src/modules/weapons/projectiles/Rocket.cc
===================================================================
--- code/branches/presentation2/src/modules/weapons/projectiles/Rocket.cc	2009-12-18 14:20:25 UTC (rev 6380)
+++ code/branches/presentation2/src/modules/weapons/projectiles/Rocket.cc	2009-12-18 23:07:32 UTC (rev 6381)
@@ -121,13 +121,13 @@
             {
                 if ( this->defSndWpnEngine_->isPlaying() )
                     this->defSndWpnEngine_->stop();
-                delete this->defSndWpnEngine_;
+                this->defSndWpnEngine_->destroy();
             }
             if ( this->defSndWpnLaunch_ )
             {
                 if ( this->defSndWpnLaunch_->isPlaying())
                     this->defSndWpnLaunch_->stop();
-                delete this->defSndWpnLaunch_;
+                this->defSndWpnLaunch_->destroy();
             }
         }
     }

Modified: code/branches/presentation2/src/orxonox/Scene.cc
===================================================================
--- code/branches/presentation2/src/orxonox/Scene.cc	2009-12-18 14:20:25 UTC (rev 6380)
+++ code/branches/presentation2/src/orxonox/Scene.cc	2009-12-18 23:07:32 UTC (rev 6381)
@@ -113,7 +113,7 @@
         XMLPortParam(Scene, "skybox", setSkybox, getSkybox, xmlelement, mode);
         XMLPortParam(Scene, "ambientlight", setAmbientLight, getAmbientLight, xmlelement, mode).defaultValues(ColourValue(0.2f, 0.2f, 0.2f, 1.0f));
         XMLPortParam(Scene, "shadow", setShadow, getShadow, xmlelement, mode).defaultValues(true);
-        XMLPortParam(Scene, "soundReferenceDistance", setSoundReferenceDistance, getSoundReferenceDistance, xmlelement, mode).defaultValues(true);
+        XMLPortParam(Scene, "soundReferenceDistance", setSoundReferenceDistance, getSoundReferenceDistance, xmlelement, mode);
 
         XMLPortParam(Scene, "gravity", setGravity, getGravity, xmlelement, mode);
         XMLPortParam(Scene, "negativeWorldRange", setNegativeWorldRange, getNegativeWorldRange, xmlelement, mode);

Modified: code/branches/presentation2/src/orxonox/items/MultiStateEngine.cc
===================================================================
--- code/branches/presentation2/src/orxonox/items/MultiStateEngine.cc	2009-12-18 14:20:25 UTC (rev 6380)
+++ code/branches/presentation2/src/orxonox/items/MultiStateEngine.cc	2009-12-18 23:07:32 UTC (rev 6381)
@@ -87,9 +87,9 @@
                     for (std::vector<WorldEntity*>::const_iterator it2 = (*it)->getEffectsBegin(); it2 != (*it)->getEffectsBegin(); ++it2)
                         (*it2)->destroy();
                 if (this->defEngineSndNormal_)
-                    delete this->defEngineSndNormal_;
+                    this->defEngineSndNormal_->destroy();
                 if (this->defEngineSndBoost_)
-                    delete this->defEngineSndBoost_;
+                    this->defEngineSndBoost_->destroy();
             }
             if (this->lua_)
                 delete this->lua_;

Modified: code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.cc
===================================================================
--- code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.cc	2009-12-18 14:20:25 UTC (rev 6380)
+++ code/branches/presentation2/src/orxonox/weaponsystem/WeaponMode.cc	2009-12-18 23:07:32 UTC (rev 6381)
@@ -83,10 +83,10 @@
 
     WeaponMode::~WeaponMode()
     {
-        if(this->isInitialized())
+        if (this->isInitialized())
         {
-            if( this->defSndWpnFire_ )
-                delete this->defSndWpnFire_;
+            if (this->defSndWpnFire_)
+                this->defSndWpnFire_->destroy();
         }
     }
 




More information about the Orxonox-commit mailing list