Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 4, 2017, 2:45:06 PM (7 years ago)
Author:
varxth
Message:

improvment

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/SOBv2_HS17/src/modules/superorxobros/SOBFireball.cc

    r11601 r11625  
    3939#include "SOBFigure.h"
    4040#include "SOBGumba.h"
     41#include "SOBGumbaBoss.h"   
    4142#include "SOB.h"   
    4243#include "util/Output.h"
     
    106107        collDisZ_ = getPosition().z - contactPoint.getPositionWorldOnB().getZ();
    107108
    108         SOBGumba* gumba = orxonox_cast<SOBGumba*>(otherObject);
    109 
    110 
    111         if(gumba!=nullptr && !(gumba->hasCollided_)) //if other object is a Gumba, kill the Gumba and add score and destroy the fireball
     109        SOBGumba*       gumba       = orxonox_cast<SOBGumba*>       (otherObject);
     110        SOBGumbaBoss*   gumbaBoss   = orxonox_cast<SOBGumbaBoss*>   (otherObject);
     111
     112        if(gumbaBoss != nullptr && !(gumba->hasCollided_))
     113        {
     114            this->destroyLater();
     115            this->hasCollided_ = true;
     116        }
     117
     118
     119        if(gumba!=nullptr && gumbaBoss == nullptr && !(gumba->hasCollided_)) //if other object is a Gumba, kill the Gumba and add score and destroy the fireball
    112120        {
    113121            gumba->destroyLater();
Note: See TracChangeset for help on using the changeset viewer.