Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6959 in orxonox.OLD for trunk


Ignore:
Timestamp:
Feb 1, 2006, 4:40:34 PM (19 years ago)
Author:
patrick
Message:

trunk: merged network branche into trunk

Location:
trunk/src
Files:
15 edited

Legend:

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

    r6873 r6959  
    12531253  SYNCHELP_WRITE_BEGIN();
    12541254
    1255   if ( this->getHostID()!=this->getOwner() )
     1255  if ( this->getHostID()!=0 && this->getHostID()!=this->getOwner() )
    12561256  {
    12571257    return SYNCHELP_WRITE_N;
     
    12591259
    12601260  byte flags = 0;
    1261   if ( fabs( coorx - relCoordinate.x ) > __OFFSET_POS ||
    1262        fabs( coory - relCoordinate.y ) > __OFFSET_POS ||
    1263        fabs( coorz - relCoordinate.z ) > __OFFSET_POS )
     1261  if ( fabs( coorx - relCoordinate.x ) > __OFFSET_POS*0.05*this->velocity.len() ||
     1262       fabs( coory - relCoordinate.y ) > __OFFSET_POS*0.05*this->velocity.len() ||
     1263       fabs( coorz - relCoordinate.z ) > __OFFSET_POS*0.05*this->velocity.len() )
    12641264    flags |= __FLAG_COOR;
    12651265
     
    12721272
    12731273  SYNCHELP_WRITE_BYTE( flags, NWT_PN_FLAGS );
    1274   //PRINTF(0)("FLAGS = %d\n", flags);
     1274  PRINTF(0)("FLAGS = %d\n", flags);
    12751275
    12761276  if ( flags & __FLAG_COOR )
    12771277  {
    12781278
    1279     //PRINTF(0)("SEND COOR: %f %f %f\n", this->relCoordinate.x, this->relCoordinate.y, this->relCoordinate.z);
     1279    PRINTF(0)("SEND COOR: %f %f %f\n", this->relCoordinate.x, this->relCoordinate.y, this->relCoordinate.z);
    12801280
    12811281    SYNCHELP_WRITE_FLOAT( this->relCoordinate.x, NWT_PN_SCOORX );
     
    12911291  {
    12921292
    1293     //PRINTF(0)("SEND QUAT: %f %f %f %f\n", this->absDirection.w, this->absDirection.v.x, this->absDirection.v.y, this->absDirection.v.z);
     1293    PRINTF(0)("SEND QUAT: %f %f %f %f\n", this->absDirection.w, this->absDirection.v.x, this->absDirection.v.y, this->absDirection.v.z);
    12941294
    12951295    SYNCHELP_WRITE_FLOAT( this->absDirection.w, NWT_PN_SROTV );
     
    13091309bool PNode::needsReadSync( )
    13101310{
    1311   if ( fabs( coorx - relCoordinate.x ) > __OFFSET_POS ||
    1312        fabs( coory - relCoordinate.y ) > __OFFSET_POS ||
    1313        fabs( coorz - relCoordinate.z ) > __OFFSET_POS )
     1311  if ( fabs( coorx - relCoordinate.x ) > __OFFSET_POS*0.05*this->velocity.len() ||
     1312       fabs( coory - relCoordinate.y ) > __OFFSET_POS*0.05*this->velocity.len() ||
     1313       fabs( coorz - relCoordinate.z ) > __OFFSET_POS*0.05*this->velocity.len() )
    13141314    return true;
    13151315
  • trunk/src/lib/network/converter.cc

    r6753 r6959  
    9090 * @return: The number of written bytes
    9191 */
    92 int Converter::intToByteArray(int x, byte* a, int length)
     92int Converter::_intToByteArray(int x, byte* a, int length)
    9393{
    9494  if (length < INTSIZE)
     
    127127 * @return: The number of read bytes
    128128 */
    129 int Converter::byteArrayToInt(const byte* a, int* x)
     129int Converter::_byteArrayToInt(const byte* a, int* x)
    130130{
    131131  int mult = 1;
     
    146146    *x += a[INTSIZE - 1] * mult;
    147147
     148  return INTSIZE;
     149}
     150
     151int Converter::byteArrayToInt(const byte* a, int* x)
     152{
     153  memcpy( x, a, INTSIZE );
     154  return INTSIZE;
     155}
     156
     157int Converter::intToByteArray(int x, byte* a, int length)
     158{
     159  if ( length< INTSIZE )
     160  {
     161    PRINTF(1)("Byte Array to small\n");
     162    return 0;
     163  }
     164  memcpy(a, &x, INTSIZE);
    148165  return INTSIZE;
    149166}
  • trunk/src/lib/network/converter.h

    r6753 r6959  
    3030    static int intToByteArray(int x, byte* a, int length);
    3131    static int byteArrayToInt(const byte* a, int* x);
     32   
     33    static int _intToByteArray(int x, byte* a, int length);
     34    static int _byteArrayToInt(const byte* a, int* x);
    3235
    3336    static int stringToByteArray(const char* s, byte* a, int length, int maxLength);
  • trunk/src/lib/network/network_game_manager.cc

    r6868 r6959  
    2929#include "world_entity.h"
    3030#include "playable.h"
     31#include "space_ships/space_ship.h"
    3132#include "player.h"
    32 #include "network_manager.h"
     33#include "shared_network_data.h"
    3334
    3435#include "class_list.h"
     
    541542    if ( b->isA(CL_WORLD_ENTITY) && !b->isA(CL_PLAYABLE) )
    542543    {
    543       if ( NetworkManager::getInstance()->getHostID()!=0 )
     544      if ( SharedNetworkData::getInstance()->getHostID()!=0 )
    544545      {
    545546        static Vector pos = Vector(1000.0, 1000.0, 1000.0);
     
    550551      }
    551552    }
     553    ///HACK this is only for network multiplayer games.
     554    if( b->isA(CL_SPACE_SHIP))
     555    {
     556      SpaceShip* ss = dynamic_cast<SpaceShip*>(b);
     557      if( owner%2 == 0)
     558      {
     559
     560        ss->loadModel("models/ships/reap_#.obj");
     561        ss->toList(OM_GROUP_00);
     562      }
     563      else
     564      {
     565        ss->loadModel( "models/ships/fighter.obj" );
     566        ss->toList(OM_GROUP_01);
     567      }
     568    }
    552569
    553570    return b;
     
    576593    {
    577594      assert((*it)->isA(CL_WORLD_ENTITY));
     595      dynamic_cast<WorldEntity*>(*it)->leaveWorld();
    578596      dynamic_cast<WorldEntity*>(*it)->toList(OM_DEAD);
    579597      break;
     
    895913  i += Converter::byteArrayToInt( &data[i], &uniqueID );
    896914
     915  PRINTF(0)("handleRequestSync %d %d\n", uniqueID, sender);
    897916  doRequestSync( uniqueID, sender );
    898917
     
    980999void NetworkGameManager::executeRequestSync( int uniqueID, int user )
    9811000{
     1001  PRINTF(0)("executeRequestSync %d %d\n", uniqueID, user);
    9821002  if ( user >= outBuffer.size() )
    9831003    resizeBufferVector( user );
  • trunk/src/lib/network/network_socket.cc

    r6695 r6959  
    172172
    173173  if (!tcpSocket || data==NULL || nbytes<=0)
    174     return 0;
     174  {
     175    assert(_OUTGOING_BUFFER_SIZE - outgoingBufferLength > 0);
     176    return 0;
     177  }
    175178
    176179  SDL_mutexP(outgoingBufferMutex);
     
    324327
    325328
     329#ifdef DONTEXITTHREADS
     330  while ( true )
     331  {
     332    SDL_Delay(1000);
     333  }
     334#endif
     335 
    326336  PRINTF(0)("QUIT READ THREAD\n");
     337 
    327338  return 0;
    328339}
     
    392403  }
    393404
     405#ifdef DONTEXITTHREADS
     406  while ( true )
     407  {
     408  SDL_Delay(1000);
     409  }
     410#endif
    394411
    395412  PRINTF(0)("QUIT WRITE THREAD\n");
     413
    396414  return 0;
     415 
    397416}
    398417
     
    426445  {
    427446    PRINTF(1)("Buffersize is too small (%d) for packet (%d)\n", maxLength, blen);
     447    assert(false);
    428448    return 0;
    429449  }
  • trunk/src/lib/network/network_socket.h

    r6695 r6959  
    88#define _NETWORK_SOCKET
    99
     10//HACK else gdb will not work on server
     11#define DONTEXITTHREADS
     12
    1013//if you want to use outgoing buffer define _USE_OUTGOING_BUFFER
    1114#define _USE_OUTGOING_BUFFER
    1215
    13 #define _INCOMING_BUFFER_SIZE 10240
     16#define _INCOMING_BUFFER_SIZE 2024000
    1417#define _OUTGOING_BUFFER_SIZE 2024000
    1518#define _LOCAL_BUFFER_SIZE 1024
  • trunk/src/lib/network/network_stream.cc

    r6868 r6959  
    2626#include "connection_monitor.h"
    2727#include "synchronizeable.h"
    28 #include "network_manager.h"
    2928#include "network_game_manager.h"
     29#include "shared_network_data.h"
    3030
    3131#include "debug.h"
     
    195195          {
    196196            SharedNetworkData::getInstance()->setHostID( handshakes[i]->getHostId() );
    197             myHostId = NetworkManager::getInstance()->getHostID();
     197            myHostId = SharedNetworkData::getInstance()->getHostID();
    198198
    199199            this->networkGameManager = NetworkGameManager::getInstance();
     
    231231  int reciever;
    232232  Header header;
     233  int counter;
     234
    233235  for (SynchronizeableList::iterator it = synchronizeables.begin(); it!=synchronizeables.end(); it++)
    234236  {
     237    counter = 0;
     238
    235239    if ( (*it)!=NULL && (*it)->beSynchronized() /*&& (*it)->getOwner() == myHostId*/ )
    236240    {
    237241      do {
     242        counter++;
     243
     244        //check for endless loop
     245        if ( counter > 50 )
     246        {
     247          PRINTF(1)("there seems to be an error in readBytes of %s\n", (*it)->getClassName());
     248          assert(false);
     249        }
     250
    238251        reciever = 0;
    239252        dataLength = (*it)->readBytes(downBuffer, DATA_STREAM_BUFFER_SIZE, &reciever);
    240 
    241253
    242254        if ( dataLength<=0 ){
     
    267279            for ( int i = 0; i<networkSockets.size(); i++)
    268280            {
    269               if ( i!=-reciever && networkSockets[i] != NULL )
     281              if ( i!=abs(reciever) && networkSockets[i] != NULL )
    270282              {
    271                 PRINTF(5)("write %d bytes to socket %d\n", dataLength, i);
     283                PRINTF(0)("write %d bytes to socket %d uniqueid %d reciever %d\n", dataLength, i, (*it)->getUniqueID(), reciever);
    272284                networkSockets[i]->writePacket(downBuffer, dataLength);
    273285              }
  • trunk/src/lib/network/synchronizeable.h

    r6868 r6959  
    3434  NWT_SS_VELZ,
    3535  NWT_SS_PL_SYNC,
    36  
     36  NWT_SS_CO_N,
     37  NWT_SS_CO_CLID,
     38
    3739  NWT_HS_HOST_ID,
    3840  NWT_HS_NGM_ID,
    39  
     41
     42  NWT_PL_B,
    4043  NWT_PL_FLAGS,
    41  
     44  NWT_PL_SCORE,
     45
    4246  NWT_PN_BO_WRITESTATE,
    4347  NWT_PN_PARENTMODE,
     
    4953  NWT_PN_ROTZ,
    5054  NWT_PN_ROTV,
    51  
     55
    5256  NWT_PN_FLAGS,
    5357  NWT_PN_SCOORX,
     
    5862  NWT_PN_SROTZ,
    5963  NWT_PN_SROTV,
    60  
     64
    6165  NWT_BO_NAME,
    62  
     66
    6367  NWT_WE_PN_WRITESTATE,
    6468  NWT_WE_PN_MODELFILENAME,
    6569  NWT_WE_PN_SCALING,
    66  
     70
    6771  NWT_GT_WE_STATE,
    68  
     72
    6973  NWT_SB_WE_STATE,
    7074  NWT_SB_SIZE,
    7175  NWT_SB_TEXTURENAME,
    72  
     76
    7377  NWT_TER_WE_STATE,
    74  
     78
    7579  NWT_PU_WE_STATE,
    76  
     80
    7781  NWT_TPU_WE_STATE,
    78  
     82
    7983  NWT_LPU_WE_STATE,
    80  
     84
    8185  NWT_WPU_WE_STATE,
    82  
     86
    8387  NWT_PPU_WE_STATE,
    8488  NWT_PPU_TYPE,
     
    133137 *  delete[] textureName;
    134138 *  textureName = NULL;
    135  *  SYNCHELP_READ_STRINGM( texturename );      //this will call new char[strlen()+1] 
     139 *  SYNCHELP_READ_STRINGM( texturename );      //this will call new char[strlen()+1]
    136140 *
    137141 * Example 2:
     
    142146 *
    143147 */
    144  
     148
    145149#define SYNCHELP_WRITE_DEBUG(n) {\
    146150  __synchelp_write_n = Converter::intToByteArray( n, data+__synchelp_write_i, maxLength-__synchelp_write_i ); \
  • trunk/src/world_entities/planet.h

    r6634 r6959  
    2222  virtual ~Planet();
    2323
    24   void loadParams(const TiXmlElement* root);
     24  virtual void loadParams(const TiXmlElement* root);
    2525
    2626  void setSize(float size);
  • trunk/src/world_entities/playable.cc

    r6871 r6959  
    2828
    2929
     30#include "dot_emitter.h"
     31#include "sprite_particles.h"
     32
     33
    3034Playable::Playable()
    3135{
     
    4347
    4448  this->setSynchronized(true);
     49
     50  this->score = 0;
     51  this->oldScore = 0;
     52
     53
     54  this->emitter = new DotEmitter(100, 5, M_2_PI);
     55  this->emitter->setParent(this);
     56  this->emitter->setSpread(M_PI, M_PI);
     57  this->emitter->setEmissionRate(300.0);
     58  this->emitter->setEmissionVelocity(50.0);
     59
     60  this->explosionParticles = new SpriteParticles(1000);
     61  this->explosionParticles->setName("LaserExplosionParticles");
     62  this->explosionParticles->setLifeSpan(.5, .3);
     63  this->explosionParticles->setRadius(0.0, 10.0);
     64  this->explosionParticles->setRadius(.5, 6.0);
     65  this->explosionParticles->setRadius(1.0, 3.0);
     66  this->explosionParticles->setColor(0.0, 1,1,0,.9);
     67  this->explosionParticles->setColor(0.5, .8,.8,0,.5);
     68  this->explosionParticles->setColor(1.0, .8,.8,.7,.0);
    4569}
    4670
     
    101125void Playable::collidesWith(WorldEntity* entity, const Vector& location)
    102126{
    103   if (entity->isA(CL_PROJECTILE))
     127  if (entity->isA(CL_PROJECTILE) && !State::isOnline() )
    104128    this->decreaseHealth(entity->getHealth());
    105129
    106130  // EXTREME HACK
    107131  if (this->getHealth() == 0.0f)
    108     this->deactivateNode();
     132  {
     133    //this->deactivateNode();
     134    this->emitter->setSystem(explosionParticles);
     135    this->setAbsCoor(0, 0, 0);
     136    //this->setAbsDir(Vector(1,0,0), 0);
     137    this->emitter->setSystem(NULL);
     138  }
    109139}
    110140
     
    248278}
    249279
     280#define DATA_FLAGS    1
     281#define DATA_SCORE    2
     282
    250283#define FLAGS_bFire   1
    251284
     
    281314bool Playable::needsReadSync( )
    282315{
     316  //if ( score != oldScore )
     317  //  return true;
     318
    283319  byte flags = 0;
    284320
  • trunk/src/world_entities/playable.h

    r6871 r6959  
    1515
    1616class Weapon;
    17 
     17class DotEmitter;
    1818class Player;
     19class SpriteParticles;
    1920
    2021//! Basic controllable WorldEntity
     
    5859    int       readSync(byte* data, int maxLength );
    5960    bool      needsReadSync();
     61   
     62    inline void setScore( int score ) { this->score = score; }
     63    inline int  getScore() { return this->score; }
    6064
    6165  protected:
     
    7377    bool                  bFire;              //!< If the Ship is firing.
    7478    int                   oldFlags;           //!< Used for synchronisation
     79   
     80    int                   score;
     81    int                   oldScore;
    7582
     83    //HACK: explosion emitter
     84    DotEmitter*           emitter;
     85    SpriteParticles*      explosionParticles;
    7686};
    7787
  • trunk/src/world_entities/space_ships/space_ship.cc

    r6947 r6959  
    9696  {
    9797    //this->loadModel("models/ships/reap_#.obj");
    98     this->loadModel( "models/ships/fighter.obj" );
     98    ///HACK this is only for network multiplayer games.
     99    if( this->getOwner()%2 == 0)
     100    {
     101      this->loadModel("models/ships/reap_#.obj");
     102      this->toList(OM_GROUP_00);
     103    }
     104    else
     105    {
     106      this->loadModel( "models/ships/fighter.obj" );
     107      this->toList(OM_GROUP_01);
     108    }
    99109  }
    100110
     
    275285{
    276286  Playable::collidesWith(entity, location);
     287
     288
    277289  if (entity->isA(CL_TURRET_POWER_UP) && entity != ref)
    278290  {
    279291    this->ADDWEAPON();
    280292    ref = entity;
    281     }
     293  }
     294
     295  if( entity->isA(CL_PROJECTILE) && entity != ref)
     296  {
     297    if ( isServer() )
     298    {
     299      networkCollisionList.push_back( entity->getHealth() );
     300      doCollideNetwork( entity->getHealth() );
     301    }
     302  }
    282303//  PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getClassName(), entity->getClassName(), location.x, location.y, location.z);
    283304}
     
    320341
    321342  // spaceship controlled movement
    322   this->calculateVelocity(time);
     343  if (this->getOwner() == this->getHostID())
     344    this->calculateVelocity(time);
     345
    323346
    324347  Vector move = velocity*time;
     
    450473  }
    451474
    452   velocity += accel;
     475  velocity += accel*time*10;
    453476  //rot.normalize();
    454477  //this->setRelDirSoft(Quaternion(rotVal, rot), 5);
     
    526549#define DATA_velocity    5
    527550#define DATA_playables   6
     551#define DATA_collision   7
    528552
    529553int SpaceShip::writeBytes( const byte * data, int length, int sender )
     
    561585        bRollL = (flags & MASK_bRollL) != 0;
    562586        bRollR = (flags & MASK_bRollR) != 0;
    563        
     587
    564588      }
    565589      else
     
    603627        SYNCHELP_READ_FLOAT( velocity.y, NWT_SS_VELY );
    604628        SYNCHELP_READ_FLOAT( velocity.z, NWT_SS_VELZ );
    605       }     
     629      }
    606630      else
    607631        assert(false);
    608      
     632
    609633      continue;
    610634    }
    611    
     635
    612636    if ( b == DATA_playables )
    613637    {
     
    619643        assert(false);
    620644    }
     645
     646    if ( b == DATA_collision )
     647    {
     648      int n;
     649      float energy;
     650      SYNCHELP_READ_INT( n, NWT_SS_CO_N );
     651
     652      for ( int i = 0; i<n; i++ )
     653      {
     654        SYNCHELP_READ_FLOAT( energy, NWT_SS_CO_CLID );
     655        doCollideNetwork( energy );
     656      }
     657    }
    621658  }
    622659
     
    651688  }
    652689
    653   *reciever = -this->getOwner();
     690  *reciever = 0 - this->getOwner();
     691  //TODO: implement with SYNCHELP_WRITE_SENT()
    654692  bool sentSomething = false;
    655693
    656   if ( ( this->getHostID()==0 || this->getOwner() == this->getHostID() ) && PNode::needsReadSync() )
    657   {
     694  if ( PNode::needsReadSync() && ( this->getHostID()==0 || this->getOwner() == this->getHostID() ) )
     695  {
     696    PRINTF(0)("sending PNode::readSync\n");
    658697    SYNCHELP_WRITE_BYTE( DATA_sync, NWT_SS_B );
    659698    SYNCHELP_WRITE_FKT( PNode::readSync, NWT_SS_PN_SYNC );
     699    sentSomething = true;
    660700  }
    661701
     
    683723    {
    684724      oldMask = mask;
     725      PRINTF(0)("sending mask\n");
    685726      sentSomething = true;
    686727      SYNCHELP_WRITE_BYTE( DATA_flags, NWT_SS_B );
     
    705746    }
    706747#define __OFFSET_VEL 0.05
    707     if ( fabs( oldVelocity.x - velocity.x ) > __OFFSET_VEL*velocity.x ||
    708          fabs( oldVelocity.y - velocity.y ) > __OFFSET_VEL*velocity.y ||
    709          fabs( oldVelocity.z - velocity.z ) > __OFFSET_VEL*velocity.z )
    710     {
    711       oldVelocity = velocity;
    712       //PRINTF(0)("SENDING velocity\n");
    713       //SYNCHELP_WRITE_BYTE( DATA_velocity, NWT_SS_B );
    714       //SYNCHELP_WRITE_FLOAT( velocity.x, NWT_SS_VELX );
    715       //SYNCHELP_WRITE_FLOAT( velocity.y, NWT_SS_VELY );
    716       //SYNCHELP_WRITE_FLOAT( velocity.z, NWT_SS_VELZ );
    717     }
    718    
     748    if ( fabs( oldVelocity.x - velocity.x ) > __OFFSET_VEL*fabs(oldVelocity.x)+0.1 ||
     749         fabs( oldVelocity.y - velocity.y ) > __OFFSET_VEL*fabs(oldVelocity.y)+0.1 ||
     750         fabs( oldVelocity.z - velocity.z ) > __OFFSET_VEL*fabs(oldVelocity.z)+0.1 )
     751    {
     752      oldVelocity.x = velocity.x;
     753      oldVelocity.y = velocity.y;
     754      oldVelocity.z = velocity.z;
     755      PRINTF(0)("SENDING velocity\n");
     756      sentSomething = true;
     757      SYNCHELP_WRITE_BYTE( DATA_velocity, NWT_SS_B );
     758      SYNCHELP_WRITE_FLOAT( velocity.x, NWT_SS_VELX );
     759      SYNCHELP_WRITE_FLOAT( velocity.y, NWT_SS_VELY );
     760      SYNCHELP_WRITE_FLOAT( velocity.z, NWT_SS_VELZ );
     761    }
     762
    719763    if ( Playable::needsReadSync() )
    720764    {
    721765      sentSomething = true;
     766      PRINTF(0)("SYNCHELP_WRITE_FKT( Playable::readSync, NWT_SS_PL_SYNC )\n");
    722767      SYNCHELP_WRITE_BYTE( DATA_playables, NWT_SS_B );
    723768      SYNCHELP_WRITE_FKT( Playable::readSync, NWT_SS_PL_SYNC );
     
    725770
    726771  }
    727  
     772
    728773  if ( !sentSomething )
    729     reciever = 0;
     774  {
     775    *reciever = 0;
     776
     777    if ( networkCollisionList.size()>0 )
     778    {
     779      SYNCHELP_WRITE_BYTE( DATA_collision, NWT_SS_B );
     780
     781      SYNCHELP_WRITE_INT( networkCollisionList.size(), NWT_SS_CO_N );
     782
     783      for ( std::list<float>::iterator it = networkCollisionList.begin(); it!=networkCollisionList.end(); it++ )
     784      {
     785        SYNCHELP_WRITE_FLOAT( *it, NWT_SS_CO_CLID );
     786      }
     787
     788      networkCollisionList.clear();
     789    }
     790  }
    730791
    731792  return SYNCHELP_WRITE_N;
    732793}
    733794
    734 
     795void SpaceShip::doCollideNetwork( float energy )
     796{
     797  this->decreaseHealth( energy );
     798}
     799
     800
     801
  • trunk/src/world_entities/space_ships/space_ship.h

    r6868 r6959  
    4747    void calculateVelocity(float time);
    4848
     49    void doCollideNetwork( float energy );
     50
    4951    // !! temporary !!
    5052    void ADDWEAPON();
     
    8486    ParticleEmitter*      burstEmitter;
    8587    ParticleSystem*       burstSystem;
     88
     89    std::list<float>        networkCollisionList;
    8690};
    8791
  • trunk/src/world_entities/world_entity.cc

    r6815 r6959  
    280280
    281281/**
    282  *  this method is called by the world if the WorldEntity leaves valid gamespace
    283  *
    284  * For free entities this means it left the Track boundaries. With bound entities it means its Location adresses a
    285  * place that is not in the world anymore. In both cases you might have to take extreme measures (a.k.a. call destroy).
    286  *
    287  * NOT YET IMPLEMENTED
    288  */
    289 void WorldEntity::leftWorld ()
     282 *  this method is called by the world if the WorldEntity leaves the game
     283 */
     284void WorldEntity::leaveWorld ()
    290285{}
    291286
  • trunk/src/world_entities/world_entity.h

    r6700 r6959  
    5454
    5555  virtual void postSpawn ();
    56   virtual void leftWorld ();
     56  virtual void leaveWorld ();
    5757
    5858  virtual void tick (float time);
Note: See TracChangeset for help on using the changeset viewer.