Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 13, 2008, 2:55:13 PM (15 years ago)
Author:
landauf
Message:
  • deatheffect (explosion) of Pawns works on client and server (creator of the effects can't be the Pawn itself because it will be destroyed on the client before synchronizing the effects)
  • fixed a small initialization error in Shader
  • fixed a bug in the resynchronization of already deleted MovableEntities
  • ExplosionChunk only recalculates it's velocity on the Master
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy2/src/orxonox/objects/worldentities/pawns/Pawn.cc

    r2414 r2422  
    3030#include "Pawn.h"
    3131
     32#include "core/Core.h"
    3233#include "core/CoreIncludes.h"
    3334#include "core/XMLPort.h"
     
    145146        if (this->spawnparticlesource_ != "")
    146147        {
    147             ParticleSpawner* effect = new ParticleSpawner(this);
     148            ParticleSpawner* effect = new ParticleSpawner(this->getCreator());
    148149            effect->setPosition(this->getPosition());
    149150            effect->setOrientation(this->getOrientation());
     
    167168            this->getPlayer()->stopControl(this);
    168169
    169         this->deatheffect();
     170        if (Core::isMaster())
     171            this->deatheffect();
    170172    }
    171173
     
    174176        // play death effect
    175177        {
    176             ParticleSpawner* effect = new ParticleSpawner(this);
     178            ParticleSpawner* effect = new ParticleSpawner(this->getCreator());
    177179            effect->setPosition(this->getPosition());
    178180            effect->setOrientation(this->getOrientation());
     
    182184        }
    183185        {
    184             ParticleSpawner* effect = new ParticleSpawner(this);
     186            ParticleSpawner* effect = new ParticleSpawner(this->getCreator());
    185187            effect->setPosition(this->getPosition());
    186188            effect->setOrientation(this->getOrientation());
     
    190192        }
    191193        {
    192             ParticleSpawner* effect = new ParticleSpawner(this);
     194            ParticleSpawner* effect = new ParticleSpawner(this->getCreator());
    193195            effect->setPosition(this->getPosition());
    194196            effect->setOrientation(this->getOrientation());
     
    199201        for (unsigned int i = 0; i < this->numexplosionchunks_; ++i)
    200202        {
    201             ExplosionChunk* chunk = new ExplosionChunk(this);
     203            ExplosionChunk* chunk = new ExplosionChunk(this->getCreator());
    202204            chunk->setPosition(this->getPosition());
    203205
     
    214216    {
    215217        this->setHealth(this->initialHealth_);
    216         this->spawneffect();
     218        if (Core::isMaster())
     219            this->spawneffect();
    217220    }
    218221
Note: See TracChangeset for help on using the changeset viewer.