Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 7, 2017, 6:25:56 PM (7 years ago)
Author:
vyang
Message:

Problem, dass Leben mehrmals durch einen Asteroiden abgezogen wird, wurde behoben

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DShip.cc

    r11637 r11643  
    9797    inline bool Asteroids2DShip::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
    9898    {
    99         removeHealth(100);
    100         getGame()->addPoints(10);
     99
     100        orxout() << "touched" << endl;
     101        Asteroids2DStone* stone = orxonox_cast<Asteroids2DStone*>(otherObject);       
     102        if(stone != nullptr && (stone != lastStone || lastStone == nullptr))
     103        {
     104            removeHealth(100);
     105            lastStone = stone;
     106         
     107        }
    101108        return false;
    102109    }
Note: See TracChangeset for help on using the changeset viewer.