Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 29, 2006, 1:40:35 PM (19 years ago)
Author:
bottac
Message:

bugfix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/single_player_map/src/world_entities/bsp_entity.cc

    r8490 r8904  
    11/*
    22   orxonox - the future of 3D-vertical-scrollers
    3 
     3 
    44   Copyright (C) 2004 orx
    5 
     5 
    66   This program is free software; you can redistribute it and/or modify
    77   it under the terms of the GNU General Public License as published by
    88   the Free Software Foundation; either version 2, or (at your option)
    99   any later version.
    10 
     10 
    1111   ### File Specific:
    1212   main-programmer: Claudio Botta
     
    1515
    1616#include "bsp_entity.h"
     17#include "util/loading/resource_manager.h"
    1718#include "util/loading/resource_manager.h"
    1819
     
    4344
    4445
     46
    4547/**
    4648 * initializes the BspEntity
     
    5052{
    5153  this->setClassID(CL_BSP_ENTITY, "BspEntity");
    52 
    53   this->bspManager = new BspManager(this);
    54   this->toList(OM_ENVIRON);
    55 
     54  this->bspManager = NULL;
    5655  /**
    5756   * @todo: Write CL_BSP_ENTITY INTO THE src/defs/class_id.h (your own definition)
     
    6463  PRINTF(0)("+++++++++++ LOADING NAME %s\n", name.c_str());
    6564
    66   this->bspManager->load(name.c_str(), 0.1f);
     65  // Check wether file exists....
     66  if ( File(ResourceManager::getFullName(name)).exists()  ){
     67    // War das Laden erfolgreich?
     68    this->bspManager = new BspManager(this);
     69    if(this->bspManager->load(name.c_str(), 0.1f) == -1 ) {
     70      this->bspManager = NULL;
     71      // Dont do anything
     72    } else {
     73
     74     
     75      this->toList(OM_ENVIRON); // Success!!!
     76    }
     77  } else {
     78    this->toList(OM_DEAD);
     79  }
    6780}
    6881
     
    7689{
    7790  // all the clases this Entity is directly derived from must be called in this way, to load all settings.
    78  // WorldEntity::loadParam(root);
     91  // WorldEntity::loadParam(root);
    7992
    8093  LoadParam(root, "Name", this, BspEntity, setName)
    81       .describe("Sets the of the BSP file.");
     94  .describe("Sets the of the BSP file.");
    8295
    83 /*  LoadParam(root, "Scale", this, BSpEntity, setScale)
    84       .describe("Sets the scale factore of the bsp level.");
    85 */
     96  /*  LoadParam(root, "Scale", this, BSpEntity, setScale)
     97        .describe("Sets the scale factore of the bsp level.");
     98  */
    8699
    87100  /**
     
    115128 */
    116129void BspEntity::collidesWith (WorldEntity* entity, const Vector& location)
    117 {
    118 
    119 }
     130{}
Note: See TracChangeset for help on using the changeset viewer.