Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9656 in orxonox.OLD for trunk/src/world_entities/space_ships


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

Location:
trunk/src/world_entities/space_ships
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/space_ships/hover.cc

    r9235 r9656  
    330330  this->shiftCoor (this->velocity * dt);
    331331
    332     // limit the maximum rotation speed.
     332  // limit the maximum rotation speed.
    333333  if (this->rotation != 0.0f)
    334334  {
  • trunk/src/world_entities/space_ships/space_ship.cc

    r9494 r9656  
    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
  • 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}
  • trunk/src/world_entities/space_ships/turbine_hover.h

    r8490 r9656  
    99
    1010#include "playable.h"
     11
     12#include "color.h"
    1113
    1214// Forward Declaration
     
    2123    virtual ~TurbineHover();
    2224
     25    void setBoostColor(const Color& color);
     26
    2327    virtual void loadParams(const TiXmlElement* root);
    2428    virtual void setPlayDirection(const Quaternion& rot, float speed = 0.0f);
     
    2630    virtual void leave();
    2731
     32    virtual void setTeam(int teamID);
     33
    2834    virtual void postSpawn();
    2935    virtual void leftWorld();
     36    virtual void respawn();
    3037
    3138    virtual void collidesWith(WorldEntity* entity, const Vector& location);
Note: See TracChangeset for help on using the changeset viewer.