Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6626 in orxonox.OLD


Ignore:
Timestamp:
Jan 20, 2006, 1:57:57 AM (18 years ago)
Author:
bensch
Message:

trunk: segfault prevention

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/particles/particle_system.cc

    r6625 r6626  
    3333
    3434using namespace std;
    35 
    3635/**
    3736 *  standard constructor
  • trunk/src/lib/particles/spark_particles.cc

    r6623 r6626  
    2828
    2929
    30 CREATE_FACTORY(SparkParticles, CL_SPARK_PARTICLES);
    3130
    3231using namespace std;
     32
     33CREATE_FACTORY(SparkParticles, CL_SPARK_PARTICLES);
    3334
    3435/**
     
    106107void SparkParticles::draw() const
    107108{
     109  exit(-1);
    108110  glPushAttrib(GL_ENABLE_BIT);
    109111
     
    115117  glEnable(GL_LINE_SMOOTH);
    116118  glEnable(GL_BLEND);
     119  glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA);
    117120
    118121  glBegin(GL_LINES);
  • trunk/src/lib/particles/sprite_particles.cc

    r6623 r6626  
    8686  this->setClassID(CL_SPRITE_PARTICLES, "SpriteParticles");
    8787
    88   this->material = NULL;
     88  this->material.setDiffuseMap("maps/radial-trans-noise.png");
    8989}
    9090
     
    101101}
    102102
    103 // setting properties
    104103/**
    105  * @brief sets the material to an external material
    106  * @param material: the material to set this material to.
    107  *
    108  * !! important if the extern material gets deleted it MUST be unregistered here or segfault !!
    109 */
    110 void SpriteParticles::setMaterial(Material* material)
    111 {
    112   this->material = *material;
    113 }
    114 
     104 * @brief sets the Texutre that is placed onto the particles
     105 * @param textureFile the Texture to load onto these SpriteParticles
     106 */
    115107void SpriteParticles::setMaterialTexture(const char* textureFile)
    116108{
  • trunk/src/lib/particles/sprite_particles.h

    r6623 r6626  
    2121  virtual void loadParams(const TiXmlElement* root);
    2222
    23   void setMaterial(Material* material);
    2423  void setMaterialTexture(const char* textureFile);
    2524
  • trunk/src/story_entities/game_world_data.cc

    r6619 r6626  
    246246
    247247  // erease everything that is left.
    248   delete PNode::getNullParent();
     248  // delete PNode::getNullParent(); // not needed as this is also done in the next step (and also much cleaner)
    249249
    250250  //secondary cleanup of PNodes;
Note: See TracChangeset for help on using the changeset viewer.