Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 12, 2008, 7:40:47 PM (16 years ago)
Author:
scheusso
Message:

merged network branch back to trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/Projectile.cc

    r1824 r1907  
    4141#include "ParticleSpawner.h"
    4242#include "Model.h"
     43#include "Settings.h"
    4344
    4445namespace orxonox
     
    5657        this->setStatic(false);
    5758        this->translate(Vector3(55, 0, 0), Ogre::Node::TS_LOCAL);
    58 
     59       
    5960        if (this->owner_)
    6061        {
     62            this->setOrientation(this->owner_->getOrientation());
    6163            this->setPosition(this->owner_->getPosition());
    62             this->setOrientation(this->owner_->getOrientation());
    6364            this->setVelocity(this->owner_->getInitialDir() * this->speed_);
    6465        }
    6566
    66         this->destroyTimer_.setTimer(this->lifetime_, false, this, createExecutor(createFunctor(&Projectile::destroyObject)));
     67        if(!orxonox::Settings::isClient()) //only if not on client
     68          this->destroyTimer_.setTimer(this->lifetime_, false, this, createExecutor(createFunctor(&Projectile::destroyObject)));
    6769    }
    6870
     
    122124        delete this;
    123125    }
     126   
     127    bool Projectile::create(){
     128      return WorldEntity::create();
     129    }
    124130}
Note: See TracChangeset for help on using the changeset viewer.