Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 1, 2015, 5:52:53 PM (8 years ago)
Author:
fvultier
Message:
 
Location:
code/branches/particleEffectsHS15/src/modules/weapons/projectiles
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/particleEffectsHS15/src/modules/weapons/projectiles/IceGunProjectile.cc

    r10836 r10911  
    4848    RegisterClass(IceGunProjectile);
    4949
     50    const float IceGunProjectile::particleDestructionDelay_ = 15.0f;
     51
    5052    IceGunProjectile::IceGunProjectile(Context* context) : Projectile(context)
    5153    {
     
    6769        this->attach(emitter_);
    6870        emitter_->setOrientation(this->getOrientation());
    69         emitter_->setSource("Orxonox/ice");       
     71        emitter_->setSource("Orxonox/ice");   
     72        emitter_->setDeleteWithParent(false);     
    7073    }
    7174
     
    8386
    8487            const ExecutorPtr& executor = createExecutor(createFunctor(&ParticleEmitter::destroy, emitter_));
    85             new Timer(15, false, executor, true);
     88            new Timer(particleDestructionDelay_, false, executor, true);
    8689        }
    8790    }
  • code/branches/particleEffectsHS15/src/modules/weapons/projectiles/IceGunProjectile.h

    r10836 r10911  
    6363        protected:
    6464            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* cs, btManifoldPoint& contactPoint);
     65            static const float particleDestructionDelay_;
    6566        private:
    6667            ParticleEmitter* emitter_;
  • code/branches/particleEffectsHS15/src/modules/weapons/projectiles/MineProjectile.cc

    r10908 r10911  
    117117        {
    118118            this->setMass(10.0f);
    119             this->setFriction(100.0f);
     119            this->setLinearDamping(0.5f);
     120            this->setAngularDamping(0.1f);
    120121            this->enableCollisionCallback();
    121             this->setCollisionResponse(false);
     122            this->setCollisionResponse(true);
    122123            this->setCollisionType(Dynamic);
    123124
     
    150151            modelRing4_->destroy();
    151152
    152             distanceTrigger_->destroy();
    153 
     153            if (distanceTrigger_)
     154            {
     155                distanceTrigger_->destroy();
     156            }
    154157            if (emitter_)
    155158            {
Note: See TracChangeset for help on using the changeset viewer.