[Orxonox-commit 5966] r10625 - code/trunk/src/modules/invader
zifloria at orxonox.net
zifloria at orxonox.net
Mon Oct 5 15:28:40 CEST 2015
Author: zifloria
Date: 2015-10-05 15:28:39 +0200 (Mon, 05 Oct 2015)
New Revision: 10625
Modified:
code/trunk/src/modules/invader/InvaderEnemy.cc
code/trunk/src/modules/invader/InvaderEnemy.h
Log:
Fixed OrxonoxArcade. Points are awarded again. The problem was that I thought I was overriding a method, when in fact I created a new one because the method signature changed. This could have been prevented with the new c++11 override specifier
Modified: code/trunk/src/modules/invader/InvaderEnemy.cc
===================================================================
--- code/trunk/src/modules/invader/InvaderEnemy.cc 2015-10-04 19:12:21 UTC (rev 10624)
+++ code/trunk/src/modules/invader/InvaderEnemy.cc 2015-10-05 13:28:39 UTC (rev 10625)
@@ -78,9 +78,9 @@
return game;
}
- void InvaderEnemy::damage(float damage, float healthdamage, float shielddamage, Pawn* originator)
+ void InvaderEnemy::damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs)
{
- Pawn::damage(damage, healthdamage, shielddamage, originator);
+ Pawn::damage(damage, healthdamage, shielddamage, originator, cs);
if (getGame() && orxonox_cast<InvaderShip*>(originator) != NULL && getHealth() <= 0)
getGame()->addPoints(42);
}
Modified: code/trunk/src/modules/invader/InvaderEnemy.h
===================================================================
--- code/trunk/src/modules/invader/InvaderEnemy.h 2015-10-04 19:12:21 UTC (rev 10624)
+++ code/trunk/src/modules/invader/InvaderEnemy.h 2015-10-05 13:28:39 UTC (rev 10625)
@@ -47,7 +47,7 @@
virtual void tick(float dt);
virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
- virtual void damage(float damage, float healthdamage, float shielddamage, Pawn* originator);
+ virtual void damage(float damage, float healthdamage, float shielddamage, Pawn* originator, const btCollisionShape* cs);
virtual void setPlayer(InvaderShip* player){this->player = player;}
int level;
More information about the Orxonox-commit
mailing list