Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9228 in orxonox.OLD for branches/presentation/src


Ignore:
Timestamp:
Jul 5, 2006, 2:04:30 PM (18 years ago)
Author:
rennerc
Message:

check for entity to exist before respawn

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/world_entities/spawning_point.cc

    r9133 r9228  
    104104void SpawningPoint::spawn(Playable* entity)
    105105{
     106  const std::list<BaseObject*> * list = ClassList::getList( CL_PLAYABLE );
     107 
     108  bool found = false;
     109 
     110  if ( !list )
     111    return;
     112   
     113  for ( std::list<BaseObject*>::const_iterator it = list->begin(); it != list->end(); it++ )
     114  {
     115    if ( *it == entity )
     116    {
     117      found = true;
     118      break;
     119    }
     120  }
     121 
     122  if ( !found )
     123    return;
     124
    106125  PRINTF(0)("Spawningpoint spawns Entity (%s)\n", entity->getClassName());
    107126
Note: See TracChangeset for help on using the changeset viewer.