Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9625 in orxonox.OLD for branches/proxy/src/world_entities


Ignore:
Timestamp:
Jul 30, 2006, 11:19:24 PM (18 years ago)
Author:
patrick
Message:

yet another weekend commit, quite much work done:

  • introduced a new PERMISSION layer: PERMISSION_SERVER: the nearest server hast authority
  • tightening up permissions: brand new implementation to prevent sending unused variables in the network (less smog in the net:D_
  • removed some compiler warnings from some central modules
  • networkmonitor interface changed to work with networknodes mainly
  • better debug output for the network monitor
  • networnode inteface standardisation
  • force reconnection commands integration
Location:
branches/proxy/src/world_entities
Files:
9 edited

Legend:

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

    r9406 r9625  
    5454  this->bspManager = NULL;
    5555
    56   this->name_handle = registerVarId( new SynchronizeableString( &this->name, &this->name_write, "name" ) );
     56  this->name_handle = registerVarId( new SynchronizeableString( &this->name, &this->name_write, "name", PERMISSION_MASTER_SERVER ) );
    5757
    5858  this->setSynchronized( true );
  • branches/proxy/src/world_entities/environments/water.cc

    r9406 r9625  
    5959  // To test the Wave equation
    6060  //this->wave(5.0,4.0, 1, 10);
    61  
    62   height_handle = registerVarId( new SynchronizeableFloat( &height, &height, "height" ) );
    63   resX_handle = registerVarId( new SynchronizeableUInt( &resX, &resX, "resX" ) );
    64   resY_handle = registerVarId( new SynchronizeableUInt( &resY, &resY, "resY" ) );
    65   sizeX_handle = registerVarId( new SynchronizeableFloat( &sizeX, &sizeX, "sizeX" ) );
    66   sizeY_handle = registerVarId( new SynchronizeableFloat( &sizeY, &sizeY, "sizeY" ) );
     61
     62  height_handle = registerVarId( new SynchronizeableFloat( &height, &height, "height", PERMISSION_MASTER_SERVER ) );
     63  resX_handle = registerVarId( new SynchronizeableUInt( &resX, &resX, "resX", PERMISSION_MASTER_SERVER ) );
     64  resY_handle = registerVarId( new SynchronizeableUInt( &resY, &resY, "resY", PERMISSION_MASTER_SERVER ) );
     65  sizeX_handle = registerVarId( new SynchronizeableFloat( &sizeX, &sizeX, "sizeX", PERMISSION_MASTER_SERVER ) );
     66  sizeY_handle = registerVarId( new SynchronizeableFloat( &sizeY, &sizeY, "sizeY", PERMISSION_MASTER_SERVER ) );
    6767}
    6868
     
    313313    this->rebuildGrid();
    314314  }
    315  
     315
    316316  WorldEntity::varChangeHandler( id );
    317317}
  • branches/proxy/src/world_entities/npcs/network_turret.cc

    r9619 r9625  
    8484  this->targetGroup = OM_GROUP_01;
    8585  this->targetGroup_write = OM_GROUP_01;
    86   this->targetGroup_handle = this->registerVarId( new SynchronizeableInt ( &targetGroup, &targetGroup_write, "targetgroup" ) );
     86  this->targetGroup_handle = this->registerVarId( new SynchronizeableInt ( &targetGroup, &targetGroup_write, "targetgroup", PERMISSION_MASTER_SERVER ) );
    8787
    8888  this->setSynchronized( true );
  • branches/proxy/src/world_entities/npcs/space_turret.cc

    r9602 r9625  
    7575  this->weaponHolder[1].setParent(this);
    7676
    77   this->wLeftHandle = registerVarId( new SynchronizeableString( &this->wLeft, &this->wLeft, "weapon-left" ) );
    78   this->wRightHandle = registerVarId( new SynchronizeableString( &this->wRight, &this->wRight, "weapon-right" ) );
     77  this->wLeftHandle = registerVarId( new SynchronizeableString( &this->wLeft, &this->wLeft, "weapon-left", PERMISSION_MASTER_SERVER ) );
     78  this->wRightHandle = registerVarId( new SynchronizeableString( &this->wRight, &this->wRight, "weapon-right", PERMISSION_MASTER_SERVER ) );
    7979
    8080}
  • branches/proxy/src/world_entities/playable.cc

    r9507 r9625  
    6868
    6969
    70   this->teamChangeHandler = registerVarId( new SynchronizeableInt( &this->teamId, &this->teamId, "team-id" ) );
    71   registerVar( new SynchronizeableInt( &score, &score, "score" ) );
     70  this->teamChangeHandler = registerVarId( new SynchronizeableInt( &this->teamId, &this->teamId, "team-id", PERMISSION_MASTER_SERVER ) );
     71  registerVar( new SynchronizeableInt( &score, &score, "score", PERMISSION_MASTER_SERVER ) );
    7272  registerVar( new SynchronizeableBool( &bFire, &bFire, "bFire", PERMISSION_OWNER));
    7373}
  • branches/proxy/src/world_entities/power_ups/param_power_up.cc

    r9406 r9625  
    4343  if( root != NULL)
    4444    this->loadParams(root);
    45  
    46   registerVar( new SynchronizeableInt( (int*)&type, (int*)&type, "type" ) );
    47   registerVar( new SynchronizeableFloat( &value, &value, "value" ) );
    48   registerVar( new SynchronizeableFloat( &max_value, &max_value, "max_value" ) );
    49   registerVar( new SynchronizeableFloat( &min_value, &min_value, "min_value" ) );
     45
     46  registerVar( new SynchronizeableInt( (int*)&type, (int*)&type, "type", PERMISSION_MASTER_SERVER ) );
     47  registerVar( new SynchronizeableFloat( &value, &value, "value", PERMISSION_MASTER_SERVER ) );
     48  registerVar( new SynchronizeableFloat( &max_value, &max_value, "max_value", PERMISSION_MASTER_SERVER ) );
     49  registerVar( new SynchronizeableFloat( &min_value, &min_value, "min_value", PERMISSION_MASTER_SERVER ) );
    5050}
    5151
  • branches/proxy/src/world_entities/skybox.cc

    r9406 r9625  
    9696{
    9797  this->rebuild();
    98  
    99   textureName_handle = registerVarId( new SynchronizeableString( &textureName, &textureName, "textureName") );
    100   size_handle = registerVarId( new SynchronizeableFloat( &size, &size, "size" ) );
     98
     99  textureName_handle = registerVarId( new SynchronizeableString( &textureName, &textureName, "textureName", PERMISSION_MASTER_SERVER) );
     100  size_handle = registerVarId( new SynchronizeableFloat( &size, &size, "size", PERMISSION_MASTER_SERVER ) );
    101101}
    102102
     
    297297{
    298298  bool somethinChanged = false;
    299  
     299
    300300  if ( std::find( id.begin(), id.end(), textureName_handle ) != id.end() )
    301301  {
     
    303303    setTexture( textureName );
    304304  }
    305  
     305
    306306  if ( std::find( id.begin(), id.end(), size_handle ) != id.end() )
    307307  {
    308308    somethinChanged = true;
    309309  }
    310  
     310
    311311  rebuild();
    312  
     312
    313313  WorldEntity::varChangeHandler( id );
    314314}
  • branches/proxy/src/world_entities/space_ships/space_ship.cc

    r9494 r9625  
    234234  this->burstSystem->setColor(1.0, .8,.8,.8,.0);
    235235
    236   registerVar( new SynchronizeableVector( &velocity, &velocity, "velocity" ) );
     236  registerVar( new SynchronizeableVector( &velocity, &velocity, "velocity", PERMISSION_MASTER_SERVER ) );
    237237  registerVar( new SynchronizeableQuaternion( &mouseDir, &mouseDir, "mousedir", PERMISSION_OWNER ) );
    238238
  • branches/proxy/src/world_entities/world_entity.cc

    r9516 r9625  
    8585  this->toList(OM_NULL);
    8686
    87   registerVar( new SynchronizeableString( &this->md2TextureFileName, &this->md2TextureFileName, "md2TextureFileName" ) );
    88   modelFileName_handle = registerVarId( new SynchronizeableString( &modelFileName, &modelFileName, "modelFileName" ) );
    89   scaling_handle = registerVarId( new SynchronizeableFloat( &scaling, &scaling, "scaling" ) );
    90   list_handle = registerVarId( new SynchronizeableInt( (int*)&objectListNumber, &list_write, "list" ) );
    91 
    92   health_handle = registerVarId( new SynchronizeableFloat( &this->health, &this->health_write, "health" ) );
    93   healthMax_handle = registerVarId( new SynchronizeableFloat( &this->healthMax, &this->healthMax_write, "maxHealth" ) );
     87  registerVar( new SynchronizeableString( &this->md2TextureFileName, &this->md2TextureFileName, "md2TextureFileName", PERMISSION_MASTER_SERVER ) );
     88  modelFileName_handle = registerVarId( new SynchronizeableString( &modelFileName, &modelFileName, "modelFileName", PERMISSION_MASTER_SERVER ) );
     89  scaling_handle = registerVarId( new SynchronizeableFloat( &scaling, &scaling, "scaling", PERMISSION_MASTER_SERVER ) );
     90  list_handle = registerVarId( new SynchronizeableInt( (int*)&objectListNumber, &list_write, "list", PERMISSION_MASTER_SERVER ) );
     91
     92  health_handle = registerVarId( new SynchronizeableFloat( &this->health, &this->health_write, "health", PERMISSION_MASTER_SERVER ) );
     93  healthMax_handle = registerVarId( new SynchronizeableFloat( &this->healthMax, &this->healthMax_write, "maxHealth", PERMISSION_MASTER_SERVER ) );
    9494}
    9595
Note: See TracChangeset for help on using the changeset viewer.