Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 10, 2016, 1:54:11 PM (8 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/jump/JumpFigure.cc

    r10262 r11054  
    3636#include "core/CoreIncludes.h"
    3737#include "core/XMLPort.h"
     38#include "graphics/Model.h"
     39#include "JumpRocket.h"
     40#include "JumpPropeller.h"
     41#include "JumpBoots.h"
     42#include "JumpShield.h"
    3843
    3944namespace orxonox
     
    4651
    4752        // initialize variables
    48         leftHand_ = NULL;
    49         rightHand_ = NULL;
     53        leftHand_ = nullptr;
     54        rightHand_ = nullptr;
    5055        fieldHeight_ = 0;
    5156        fieldWidth_ = 0;
     
    7075        animateHands_ = false;
    7176        turnUp_ = false;
    72         rocketActive_ = NULL;
    73         propellerActive_ = NULL;
    74         bootsActive_ = NULL;
    75         shieldActive_ = NULL;
     77        rocketActive_ = nullptr;
     78        propellerActive_ = nullptr;
     79        bootsActive_ = nullptr;
     80        shieldActive_ = nullptr;
    7681        rocketSpeed_ = 0.0;
    7782        propellerSpeed_ = 0.0;
     
    106111            // Move up/down
    107112            Vector3 velocity = getVelocity();
    108             if (rocketActive_ != NULL)
     113            if (rocketActive_ != nullptr)
    109114            {
    110115                velocity.z = rocketSpeed_;
    111116            }
    112             else if (propellerActive_ != NULL)
     117            else if (propellerActive_ != nullptr)
    113118            {
    114119                velocity.z = propellerSpeed_;
     
    139144                }
    140145
    141                 if (leftHand_ != NULL)
     146                if (leftHand_ != nullptr)
    142147                {
    143148                    leftHand_->setOrientation(Vector3(0.0, 1.0, 0.0), Degree(-handAngle_));
    144149                }
    145                 if (rightHand_ != NULL)
     150                if (rightHand_ != nullptr)
    146151                {
    147152                    rightHand_->setOrientation(Vector3(0.0, 1.0, 0.0), Degree(handAngle_));
     
    207212        {
    208213            Vector3 velocity = getVelocity();
    209             if (bootsActive_ == NULL)
     214            if (bootsActive_ == nullptr)
    210215            {
    211216                velocity.z = 1.2f*jumpSpeed_;
     
    234239    void JumpFigure::CollisionWithEnemy(JumpEnemy* enemy)
    235240    {
    236         if (rocketActive_ == NULL && propellerActive_ == NULL && shieldActive_ == NULL)
     241        if (rocketActive_ == nullptr && propellerActive_ == nullptr && shieldActive_ == nullptr)
    237242        {
    238243            dead_ = true;
     
    242247    bool JumpFigure::StartRocket(JumpRocket* rocket)
    243248    {
    244         if (rocketActive_ == NULL && propellerActive_ == NULL && bootsActive_ == NULL)
     249        if (rocketActive_ == nullptr && propellerActive_ == nullptr && bootsActive_ == nullptr)
    245250        {
    246251            attach(rocket);
     
    261266        detach(rocket);
    262267        rocket->destroy();
    263         rocketActive_ = NULL;
     268        rocketActive_ = nullptr;
    264269    }
    265270
    266271    bool JumpFigure::StartPropeller(JumpPropeller* propeller)
    267272    {
    268         if (rocketActive_ == NULL && propellerActive_ == NULL && bootsActive_ == NULL)
     273        if (rocketActive_ == nullptr && propellerActive_ == nullptr && bootsActive_ == nullptr)
    269274        {
    270275            attach(propeller);
     
    285290        detach(propeller);
    286291        propeller->destroy();
    287         propellerActive_ = NULL;
     292        propellerActive_ = nullptr;
    288293    }
    289294
    290295    bool JumpFigure::StartBoots(JumpBoots* boots)
    291296    {
    292         if (rocketActive_ == NULL && propellerActive_ == NULL && bootsActive_ == NULL)
     297        if (rocketActive_ == nullptr && propellerActive_ == nullptr && bootsActive_ == nullptr)
    293298        {
    294299            attach(boots);
     
    309314        detach(boots);
    310315        boots->destroy();
    311         bootsActive_ = NULL;
     316        bootsActive_ = nullptr;
    312317    }
    313318
    314319    bool JumpFigure::StartShield(JumpShield* shield)
    315320    {
    316         if (shieldActive_ == false)
     321        if (shieldActive_ == nullptr)
    317322        {
    318323            attach(shield);
     
    333338        detach(shield);
    334339        shield->destroy();
    335         shieldActive_ = NULL;
     340        shieldActive_ = nullptr;
    336341    }
    337342
Note: See TracChangeset for help on using the changeset viewer.