Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6902


Ignore:
Timestamp:
May 15, 2010, 11:36:04 AM (14 years ago)
Author:
gnadler
Message:

no rocket is controlled by controller. accidentally deleted tick function once :S

Location:
code/branches/rocket/src/modules/weapons
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/rocket/src/modules/weapons/RocketController.cc

    r6900 r6902  
    6464
    6565        SimpleRocket *rocket = static_cast<SimpleRocket*>(this->getControllableEntity());
    66                 rocket->moveRightLeft(5);
     66                rocket->rotatePitch(0.005);
     67                rocket->setVelocity(rocket->getVelocity()*1.02);
    6768       
    6869        }
  • code/branches/rocket/src/modules/weapons/projectiles/SimpleRocket.cc

    r6900 r6902  
    9393    {
    9494        SUPER(SimpleRocket, tick, dt);
     95
     96            this->setAngularVelocity(this->getOrientation() * this->localAngularVelocity_);
     97            this->setVelocity( this->getOrientation()*WorldEntity::FRONT*this->getVelocity().length() );
     98
     99            if( this->bDestroy_ )
     100                this->destroy();
     101       
    95102        }
    96103
Note: See TracChangeset for help on using the changeset viewer.