Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 25, 2006, 4:28:37 PM (18 years ago)
Author:
patrick
Message:

network: removing entity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/network/network_game_manager.cc

    r6706 r6715  
    3232#include "network_manager.h"
    3333
     34#include "class_list.h"
    3435
    3536/* include your own header */
     
    462463
    463464
     465
     466bool NetworkGameManager::signalLeftPlayer(int userID)
     467{
     468  const std::list<BaseObject*>* playableList = ClassList::getList(CL_PLAYABLE);
     469  std::list<BaseObject*>::const_iterator it = playableList->begin();
     470
     471  for(; it != playableList->end(); it++)
     472  {
     473    if( dynamic_cast<Synchronizeable*>(*it)->getOwner() == userID )
     474    {
     475      PRINTF(0)("remove playable from %i\n", userID);
     476      this->removeEntity(dynamic_cast<Synchronizeable*>(*it)->getUniqueID());
     477      return true;
     478    }
     479  }
     480  return false;
     481}
     482
     483
    464484/**
    465485 * Creates a buffer for user n
Note: See TracChangeset for help on using the changeset viewer.