Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 24, 2008, 1:39:05 PM (16 years ago)
Author:
rgrieder
Message:
  • merged Felix's changes from trunk to network branch
  • added "svn:eol-style native" property to keybindings.ini
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/orxonox/objects/SpaceShip.cc

    r1398 r1406  
    7575      return NULL;
    7676    }
    77    
     77
    7878    SpaceShip::SpaceShip() :
    7979      //testvector_(0,0,0),
     
    118118        this->setConfigValues();
    119119
     120        initialDir_ = Vector3(1.0, 0.0, 0.0);
     121        currentDir_ = initialDir_;
     122        initialOrth_ = Vector3(0.0, 0.0, 1.0);
     123        currentOrth_ = initialOrth_;
    120124
    121125        this->setRotationAxis(1, 0, 0);
     
    233237        CameraHandler::getInstance()->requestFocus(cam_);
    234238
     239    }
     240
     241    Camera* SpaceShip::getCamera(){
     242        return cam_;
    235243    }
    236244
     
    318326    }
    319327
     328    Vector3 SpaceShip::getDir() {
     329        return currentDir_;
     330    }
     331
     332    Vector3 SpaceShip::getOrth(){
     333        return currentOrth_;
     334    }
     335
    320336    float SpaceShip::getMaxSpeed() { return maxSpeed_; }
    321337
    322338    void SpaceShip::tick(float dt)
    323339    {
     340        currentDir_ = getOrientation()*initialDir_;
     341                currentOrth_ = getOrientation()*initialOrth_;
     342
    324343        if (this->cam_)
    325344            this->cam_->tick(dt);
     
    341360        if (this->bLMousePressed_ && this->timeToReload_ <= 0)
    342361        {
    343          
     362
    344363            Projectile *p = new Projectile(this);
    345            
     364
    346365            p->setBacksync(true);
    347366            this->timeToReload_ = this->reloadTime_;
Note: See TracChangeset for help on using the changeset viewer.