[Orxonox-commit 5333] r9996 - in code/branches/modularships: data/levels src/orxonox src/orxonox/worldentities/pawns
noep at orxonox.net
noep at orxonox.net
Sun Mar 9 22:34:09 CET 2014
Author: noep
Date: 2014-03-09 22:34:08 +0100 (Sun, 09 Mar 2014)
New Revision: 9996
Modified:
code/branches/modularships/data/levels/emptyLevel.oxw
code/branches/modularships/src/orxonox/Scene.cc
code/branches/modularships/src/orxonox/worldentities/pawns/Pawn.cc
Log:
Fixed the method outputting the projectile's CollisionBox instead of the one of the Pawn it collides into.
Modified: code/branches/modularships/data/levels/emptyLevel.oxw
===================================================================
--- code/branches/modularships/data/levels/emptyLevel.oxw 2014-03-09 20:01:44 UTC (rev 9995)
+++ code/branches/modularships/data/levels/emptyLevel.oxw 2014-03-09 21:34:08 UTC (rev 9996)
@@ -48,12 +48,13 @@
</collisionShapes>
</MovableEntity>
- <Pawn health=30 position="0,-50,0" direction="0,-1,0" collisionType=dynamic mass=1000 name=box radarname = "Box 4" >
+ <Pawn health=30 position="0,-100,0" direction="0,0,0" collisionType=dynamic mass=1000 name=box radarname = "Box 4" >
<attached>
<Model position="0,0,0" mesh="crate.mesh" scale3D="3,3,3" />
</attached>
<collisionShapes>
<BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
+ <BoxCollisionShape position="0,-15,0" halfExtents="15,15,15" />
</collisionShapes>
</Pawn>
Modified: code/branches/modularships/src/orxonox/Scene.cc
===================================================================
--- code/branches/modularships/src/orxonox/Scene.cc 2014-03-09 20:01:44 UTC (rev 9995)
+++ code/branches/modularships/src/orxonox/Scene.cc 2014-03-09 21:34:08 UTC (rev 9996)
@@ -372,9 +372,9 @@
// false means that bullet will assume we didn't modify the contact
bool modified = false;
if (object0->isCollisionCallbackActive())
- modified |= object0->customCollidesAgainst(object1, cs0, cp);
+ modified |= object0->customCollidesAgainst(object1, cs1, cp);
if (object1->isCollisionCallbackActive())
- modified |= object1->customCollidesAgainst(object0, cs1, cp);
+ modified |= object1->customCollidesAgainst(object0, cs0, cp);
return modified;
}
Modified: code/branches/modularships/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- code/branches/modularships/src/orxonox/worldentities/pawns/Pawn.cc 2014-03-09 20:01:44 UTC (rev 9995)
+++ code/branches/modularships/src/orxonox/worldentities/pawns/Pawn.cc 2014-03-09 21:34:08 UTC (rev 9996)
@@ -279,7 +279,7 @@
if (originator)
damage *= originator->getDamageMultiplier();
- orxout() << "damage(): Custom collision detected on CS: " << cs << endl;
+ orxout() << "damage(): Custom collision detected on " << this->getRadarName() << ", CS: " << cs << endl;
if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator))
{
More information about the Orxonox-commit
mailing list