Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 4, 2006, 11:01:28 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the proxy bache back with no conflicts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/npcs/space_turret.cc

    r9235 r9656  
    7474  this->weaponHolder[0].setParent(this);
    7575  this->weaponHolder[1].setParent(this);
     76
     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 ) );
     79
    7680}
    7781
     
    98102  if (this->left)
    99103  {
     104    this->wLeft = element->Value();
     105
    100106    this->left->setParent(this);
    101107    this->left->toList(this->getOMListNumber());
     
    110116  if (this->right)
    111117  {
     118    this->wRight = element->Value();
     119
    112120    this->right->setParent(this);
    113121    this->right->toList(this->getOMListNumber());
     
    117125  }
    118126}
     127
     128
     129/**
     130 * sets the left weapon called from net sync
     131 * @param wLeft the left weapon string
     132 */
     133void SpaceTurret::setWeaponLeft(const std::string& wLeft)
     134{
     135
     136}
     137
     138/**
     139 * sets the left weapon called from net sync
     140 * @param wRught the right weapon string
     141 */
     142void SpaceTurret::setWeaponRight(const std::string& wRight)
     143{}
    119144
    120145/**
     
    198223
    199224}
     225
     226
     227
     228/**
     229 * handler for changes on registred vars
     230 * @param id id's which changed
     231 */
     232void SpaceTurret::varChangeHandler( std::list< int > & id )
     233{
     234  if ( std::find( id.begin(), id.end(), this->wLeftHandle ) != id.end())
     235  {
     236    this->setWeaponLeft(this->wLeft);
     237  }
     238
     239  if ( std::find( id.begin(), id.end(), this->wRightHandle ) != id.end() )
     240  {
     241    this->setWeaponRight(this->wRight);
     242  }
     243
     244
     245  WorldEntity::varChangeHandler( id );
     246}
     247
Note: See TracChangeset for help on using the changeset viewer.