Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 10, 2016, 1:54:11 PM (9 years ago)
Author:
landauf
Message:

merged branch cpp11_v2 into cpp11_v3

Location:
code/branches/cpp11_v3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v3

  • code/branches/cpp11_v3/src/modules/invader/InvaderEnemy.cc

    r10625 r11054  
    3232*/
    3333
    34 #include "invader/InvaderPrereqs.h"
    3534#include "InvaderEnemy.h"
     35
     36#include "core/CoreIncludes.h"
     37#include "Invader.h"
    3638#include "InvaderShip.h"
    3739
     
    5456            removeHealth(2000);
    5557
    56         if (player != NULL)
     58        if (player != nullptr)
    5759        {
    5860            float newZ = 2/(pow(abs(getPosition().x - player->getPosition().x) * 0.01f, 2) + 1) * (player->getPosition().z - getPosition().z);
     
    6264    }
    6365
    64     inline bool InvaderEnemy::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
     66    inline bool InvaderEnemy::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
    6567    {
    6668        if(orxonox_cast<InvaderShip*>(otherObject))
     
    7173    Invader* InvaderEnemy::getGame()
    7274    {
    73         if (game == NULL)
     75        if (game == nullptr)
    7476        {
    75             for (ObjectList<Invader>::iterator it = ObjectList<Invader>::begin(); it != ObjectList<Invader>::end(); ++it)
    76                 game = *it;
     77            for (Invader* invader : ObjectList<Invader>())
     78                game = invader;
    7779        }
    7880        return game;
     
    8284    {
    8385        Pawn::damage(damage, healthdamage, shielddamage, originator, cs);
    84         if (getGame() && orxonox_cast<InvaderShip*>(originator) != NULL && getHealth() <= 0)
     86        if (getGame() && orxonox_cast<InvaderShip*>(originator) != nullptr && getHealth() <= 0)
    8587            getGame()->addPoints(42);
    8688    }
Note: See TracChangeset for help on using the changeset viewer.