Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7125 in orxonox.OLD for trunk/src/world_entities


Ignore:
Timestamp:
Feb 12, 2006, 6:06:26 PM (19 years ago)
Author:
bensch
Message:

try fix

Location:
trunk/src/world_entities
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/effects/explosion.h

    r7103 r7125  
    3333
    3434    static SpriteParticles*    explosionParticles;
    35     BoxEmitter*           emitter;
     35    BoxEmitter*                emitter;
    3636};
    3737
  • trunk/src/world_entities/environments/water.cc

    r7117 r7125  
    5555
    5656  this->rebuildGrid();
    57   this->waterMaterial = new Material();
    5857  this->waterShader = (Shader*)ResourceManager::getInstance()->load("shaders/water.vert", SHADER, RP_GAME, "shaders/water.frag");
    5958
     
    6564{
    6665  delete this->grid;
    67   delete this->waterMaterial;
    6866}
    6967
  • trunk/src/world_entities/environments/water.h

    r6981 r7125  
    1212/* INCLUDES */
    1313#include "world_entity.h"
     14#include "material.h"
     15
    1416
    1517/* FORWARD DECLARATION */
    16 class Material;
    1718class Grid;
    1819class Shader;
     
    5354    float           cohesion;        //!< Cohesion.
    5455
    55     Material*       waterMaterial;
     56    Material        waterMaterial;
    5657    Shader*         waterShader;
    5758    float           height;          //!< The hight of the Water
  • trunk/src/world_entities/skybox.cc

    r7123 r7125  
    104104{
    105105  PRINTF(5)("Deleting SkyBox\n");
    106   this->setModel(NULL); //< so that WorldEntity does not try to delete it again.
    107106  for (int i = 0; i < 6; i++)
    108107  {
  • trunk/src/world_entities/space_ships/turbine_hover.cc

    r7105 r7125  
    226226  dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( true);
    227227
    228   State::getCameraNode()->setParentSoft(&this->cameraNode);
    229   State::getCameraNode()->setRelCoorSoft(-10, 0,0);
    230   State::getCameraTargetNode()->setParentSoft(&this->cameraNode);
     228  if (State::getCameraNode != NULL)
     229  {
     230    State::getCameraNode()->setParentSoft(&this->cameraNode);
     231    State::getCameraNode()->setRelCoorSoft(-10, 0,0);
     232    State::getCameraTargetNode()->setParentSoft(&this->cameraNode);
     233  }
    231234}
    232235
  • trunk/src/world_entities/world_entity.cc

    r7123 r7125  
    7474WorldEntity::~WorldEntity ()
    7575{
     76  State::getObjectManager()->toList(this, OM_INIT);
     77
     78  // Delete the model (unregister it with the ResourceManager)
     79  for (unsigned int i = 0; i < this->models.size(); i++)
     80    this->setModel(NULL, i);
     81
    7682  // Delete the obbTree
    7783  if( this->obbTree != NULL)
     
    8187    delete this->healthWidget;
    8288
    83   // Delete the model (unregister it with the ResourceManager)
    84   for (unsigned int i = 0; i < this->models.size(); i++)
    85     this->setModel(NULL, i);
    86 
    87   State::getObjectManager()->toList(this, OM_INIT);
    8889}
    8990
Note: See TracChangeset for help on using the changeset viewer.