[Orxonox-commit 569] r3105 - trunk/src/orxonox/objects/weaponsystem/projectiles

landauf at orxonox.net landauf at orxonox.net
Thu May 28 07:15:03 CEST 2009


Author: landauf
Date: 2009-05-28 07:15:03 +0200 (Thu, 28 May 2009)
New Revision: 3105

Modified:
   trunk/src/orxonox/objects/weaponsystem/projectiles/Projectile.cc
Log:
fixed self-collision with projectiles

Modified: trunk/src/orxonox/objects/weaponsystem/projectiles/Projectile.cc
===================================================================
--- trunk/src/orxonox/objects/weaponsystem/projectiles/Projectile.cc	2009-05-28 03:37:34 UTC (rev 3104)
+++ trunk/src/orxonox/objects/weaponsystem/projectiles/Projectile.cc	2009-05-28 05:15:03 UTC (rev 3105)
@@ -45,7 +45,7 @@
 namespace orxonox
 {
     CreateFactory(Projectile);
-  
+
     Projectile::Projectile(BaseObject* creator) : MovableEntity(creator)
     {
         RegisterObject(Projectile);
@@ -59,11 +59,11 @@
         if (GameMode::isMaster())
         {
             this->enableCollisionCallback();
-
+            this->setCollisionResponse(false);
             this->setCollisionType(Kinematic);
 
             SphereCollisionShape* shape = new SphereCollisionShape(this);
-            shape->setRadius(10);
+            shape->setRadius(20);
             this->attachCollisionShape(shape);
 
             this->destroyTimer_.setTimer(this->lifetime_, false, this, createExecutor(createFunctor(&Projectile::destroyObject)));
@@ -103,7 +103,7 @@
         if (!this->bDestroy_ && GameMode::isMaster())
         {
             if (otherObject == this->owner_)
-                return true;
+                return false;
 
             this->bDestroy_ = true;
 




More information about the Orxonox-commit mailing list