Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7125 in orxonox.OLD


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

try fix

Location:
trunk/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/coord/p_node.cc

    r7008 r7125  
    8080PNode::~PNode ()
    8181{
     82  printf("delete PNode: %s::%s\n", this->getClassName(), this->getName());
    8283  // remove the Node, delete it's children (if required).
    8384  std::list<PNode*>::iterator tmp = this->children.begin();
     
    9394      {
    9495        if (this == PNode::nullParent && (*deleteNode)->parentMode & PNODE_REPARENT_TO_NULL)
     96        {
     97          printf("%s::%s deletes PNode: %s::%s\n",
     98                 this->getClassName(), this->getName(),
     99                 (*deleteNode)->getClassName(), (*deleteNode)->getName());
    95100          delete (*deleteNode);
     101        }
    96102        else
     103        {
     104          printf("%s::%s reparents PNode: %s::%s\n",
     105                 this->getClassName(), this->getName(),
     106                 (*deleteNode)->getClassName(), (*deleteNode)->getName());
     107
    97108          (*deleteNode)->reparent();
     109        }
    98110      }
    99111      else
     112      {
     113        printf("%s::%s deletes PNode: %s::%s\n",
     114               this->getClassName(), this->getName(),
     115               (*deleteNode)->getClassName(), (*deleteNode)->getName());
    100116        delete (*deleteNode);
     117      }
    101118    }
    102119
  • trunk/src/lib/lang/class_list.cc

    r7123 r7125  
    346346      niceString[30-strlen((*cl).className) - lenCount] = '\0';
    347347
    348       PRINT(0)("| CLASS %s:%s %d\n", (*cl).className, niceString, (*cl).objectList.size());
     348      PRINT(0)("| CLASS %s::%s %d\n", (*cl).className, niceString, (*cl).objectList.size());
    349349
    350350      if (debugLevel >=2 && (*cl).objectList.size() > 0)
     
    354354        for (bo = (*cl).objectList.begin(); bo != (*cl).objectList.end(); bo++)
    355355        {
    356           PRINT(0)("|   (class %s): NAME(%s)->%p ", (*bo)->getClassName(), (*bo)->getName(), (*bo));
     356          PRINT(0)("|   %s::%s::(0x%.8X->%p ", (*bo)->getClassName(), (*bo)->getName(), (*bo)->getClassID(), (*bo));
    357357          if (debugLevel == 3)
    358358            ClassList::whatIs(*bo);
  • trunk/src/story_entities/game_world_data.cc

    r7076 r7125  
    260260  if (nodeList != NULL)
    261261    while (!nodeList->empty())
    262       delete nodeList->front();
     262  {
     263    ClassList::debug( 3, CL_PARENT_NODE);
     264    PNode::getNullParent()->debugNode( 1);
     265
     266/*    printf("%s::%s\n", nodeList->front()->getClassName(), nodeList->front()->getName());*/
     267    delete nodeList->front();
     268    printf("OK\n");
     269  }
    263270  /* remove the player object */
    264271  if( this->localPlayer)
     
    294301  localCamera = NULL;
    295302  localPlayer = NULL;
     303  State::setCamera(NULL, NULL);
    296304  sky = NULL;
    297305  terrain = NULL;
  • 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.