Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4324 in orxonox.OLD for orxonox/trunk/src/util/object_manager.cc


Ignore:
Timestamp:
May 27, 2005, 2:13:19 AM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: added a debug level at the end to be able to experiment a little with new load modules and game ideas

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/object_manager.cc

    r4322 r4324  
    1919#include "list.h"
    2020
    21 #include "projectile.h"
    2221
    2322using namespace std;
     
    7271    this->managedObjectList[index]->add(object);
    7372  else
    74     PRINTF(0)(" Error: unable to add object to the list nr. %i: no list initialized - ignoring\n", index);
     73    PRINTF(0)(" Critical: unable to add object to the list nr. %i: no list initialized - ignoring\n", index);
    7574}
    7675
     
    8281      BaseObject* obj = this->managedObjectList[index]->firstElement();
    8382      this->managedObjectList[index]->remove(obj);
     83      if( unlikely(obj == NULL))
     84        {
     85          PRINTF(0)("Critical: there was no object anymore in the dead list! This could result in Segfaults\n");
     86        }
    8487      return obj;
    8588    }
    8689  else
    87     PRINTF(0)(" Error: unable to get object from the list nr. %i: no elements initialized - ignoring\n", index);
     90    PRINTF(0)(" Critical: unable to get object from the list nr. %i: no elements initialized - ignoring\n", index);
     91  return NULL;
    8892}
    8993
Note: See TracChangeset for help on using the changeset viewer.