[Orxonox-commit 3961] r8635 - in code/branches/presentation: data/particle src/modules/weapons/projectiles

landauf at orxonox.net landauf at orxonox.net
Sat May 28 16:15:12 CEST 2011


Author: landauf
Date: 2011-05-28 16:15:12 +0200 (Sat, 28 May 2011)
New Revision: 8635

Modified:
   code/branches/presentation/data/particle/Shield.particle
   code/branches/presentation/src/modules/weapons/projectiles/BasicProjectile.cc
Log:
the shield effect is now attached to the ship

Modified: code/branches/presentation/data/particle/Shield.particle
===================================================================
--- code/branches/presentation/data/particle/Shield.particle	2011-05-28 09:19:02 UTC (rev 8634)
+++ code/branches/presentation/data/particle/Shield.particle	2011-05-28 14:15:12 UTC (rev 8635)
@@ -8,7 +8,7 @@
 	cull_each	false
 	renderer	billboard
 	sorted	false
-	local_space	false
+	local_space	true
 	iteration_interval	0
 	nonvisible_update_timeout	0
 	billboard_type	point

Modified: code/branches/presentation/src/modules/weapons/projectiles/BasicProjectile.cc
===================================================================
--- code/branches/presentation/src/modules/weapons/projectiles/BasicProjectile.cc	2011-05-28 09:19:02 UTC (rev 8634)
+++ code/branches/presentation/src/modules/weapons/projectiles/BasicProjectile.cc	2011-05-28 14:15:12 UTC (rev 8635)
@@ -117,11 +117,10 @@
                 if (victim && victim->hasShield() && (this_->getDamage() > 0 || this_->getShieldDamage() > 0) && victim->getHealth() > 0)
                 {
                     ParticleSpawner* effect = new ParticleSpawner(owner->getCreator());
-                    effect->setPosition(entity->getPosition());
-                    effect->setOrientation(entity->getOrientation());
                     effect->setDestroyAfterLife(true);
                     effect->setSource("Orxonox/Shield");
-                    effect->setLifetime(0.5f);
+                    effect->setLifetime(0.5f);
+                    victim->attach(effect);
                 }
             }
 




More information about the Orxonox-commit mailing list