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/space_ships/turbine_hover.cc

    r9494 r9656  
    9191
    9292  this->loadModel("models/ships/hoverglider_mainbody.obj");
     93
    9394}
    9495
     
    222223  registerVar( new SynchronizeableFloat( &cameraLook, &cameraLook, "cameraLook", PERMISSION_OWNER ) );
    223224  registerVar( new SynchronizeableFloat( &rotation, &rotation, "rotation", PERMISSION_OWNER ) );
     225
     226  if( State::isOnline())
     227    toList( OM_PLAYERS );
    224228}
    225229
     
    231235{
    232236  Playable::loadParams(root);
     237}
     238
     239
     240void TurbineHover::setBoostColor(const Color& color)
     241{
     242  this->burstSystem->setColor(0.0, color);
     243  this->burstSystem->setColor(0.2, color * 0.6);
     244  this->burstSystem->setColor(0.5, color * .3 + Color(0.5, 0.5, 0.8, 0.3));
     245  this->burstSystem->setColor(1.0, 0.8, 0.8, 0.8, 0.0);
     246
     247  printf(":::::::::::::::::::::::\n");
     248  this->burstSystem->debug();
    233249}
    234250
     
    256272
    257273}
     274
     275void TurbineHover::setTeam(int teamID)
     276{
     277  printf("::::::::::::::::: TEAM ::: %d\n", teamID);
     278  if (teamID == 0)
     279  {
     280    this->setBoostColor(Color::blue);
     281  }
     282  else if (teamID == 1)
     283  {
     284    this->setBoostColor(Color::red);
     285  }
     286
     287  ///HACK this is very much hard coded.set the owner of the weapons
     288  this->getWeaponManager().getWeapon(0)->setOwner(this->getOwner());
     289  this->getWeaponManager().getWeapon(1)->setOwner(this->getOwner());
     290
     291  //choose collision list
     292  if( State::isOnline())
     293  {
     294    if( teamID == 0)
     295      toList( OM_GROUP_00 );
     296    else if(teamID == 1)
     297      toList( OM_GROUP_01);
     298  }
     299
     300
     301  // set the local team id, very important
     302  this->setTeamId(teamID);
     303}
     304
    258305
    259306
     
    527574  }
    528575}
     576
     577
     578/**
     579 *  respawning function called by the GameRules
     580 */
     581void TurbineHover::respawn( )
     582{
     583
     584  Playable::respawn();
     585}
Note: See TracChangeset for help on using the changeset viewer.