Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 19, 2014, 4:00:53 PM (9 years ago)
Author:
sriedel
Message:

Should work so far

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/surfaceraceHS14/src/modules/dodgerace2/DodgeRaceShip.cc

    r10127 r10128  
    8989        // shoot!
    9090        if (isFireing)
    91             ControllableEntity::fire(0);
     91        {
     92                //pos += Vector3(900, 0, 0) * dt;
     93            //ControllableEntity::fire(0);
     94        }
     95
    9296
    9397        // Camera
     
    103107        // bring back on track!
    104108        if(pos.y != 0)
    105             pos.y = 0;
     109        {
     110                pos.y = 0;
     111        }
    106112
    107113        setPosition(pos);
     
    135141    {
    136142        lastTimeLeft = 0;
    137         desiredVelocity.x = -value.x * speed;
     143        desiredVelocity.x = value.x * speed;
    138144    }
    139145    void DodgeRaceShip::boost(bool bBoost)
     
    141147        isFireing = bBoost;
    142148    }
    143     /*
     149
    144150    inline bool DodgeRaceShip::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
    145151    {
    146         // orxout() << "touch!!! " << endl; //<< otherObject << " at " << contactPoint;
    147         WeakPtr<DodgeRaceEnemy> enemy = orxonox_cast<DodgeRaceEnemy*>(otherObject);
    148         WeakPtr<Projectile> shot = orxonox_cast<Projectile*>(otherObject);
    149         // ensure that this gets only called once per enemy.
    150         if (enemy != NULL && lastEnemy != enemy)
     152        if (otherObject != NULL && lastEntity != otherObject)
    151153        {
    152             lastEnemy = enemy;
     154                lastEntity = otherObject;
     155                removeHealth(20);
     156            //this->death();
     157        }
    153158
    154             removeHealth(20);
    155             if (getGame())
    156             {
    157                 getGame()->multiplier = 1;
    158             }
    159         }
    160         // was shot, decrease multiplier
    161         else if (shot != NULL  && lastShot != shot)
    162         {
    163             if (getGame() && orxonox_cast<DodgeRaceEnemy*>(shot->getShooter()) != NULL)
    164             {
    165                 if (getGame()->multiplier > 1)
    166                 {
    167                     lastShot = shot;
    168                     getGame()->multiplier -= 1;
    169                 }
    170             }
    171         }
    172159        return false;
    173         // SUPER(DodgeRaceShip, collidesAgainst, otherObject, contactPoint);
    174160    }
    175 */
     161
    176162    WeakPtr<DodgeRace> DodgeRaceShip::getGame()
    177163    {
Note: See TracChangeset for help on using the changeset viewer.