Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9085 in orxonox.OLD for branches/presentation/src


Ignore:
Timestamp:
Jul 4, 2006, 1:49:55 AM (18 years ago)
Author:
rennerc
Message:

updated fpsplayer syncvars

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/world_entities/creatures/fps_player.cc

    r9069 r9085  
    3232#include "debug.h"
    3333
     34#include "shared_network_data.h"
    3435
    3536
     
    141142  registerVar( new SynchronizeableBool( &bForward, &bForward, "bForward", PERMISSION_OWNER ) );
    142143  registerVar( new SynchronizeableBool( &bBackward, &bBackward, "bBackward", PERMISSION_OWNER ) );
    143 //  registerVar( new SynchronizeableQuaternion( &mouseDir, &mouseDir, "mouseDir", PERMISSION_OWNER ) );
     144  registerVar( new SynchronizeableFloat( &heading, &heading, "heading", PERMISSION_OWNER ) );
     145  registerVar( new SynchronizeableFloat( &attitude, &attitude, "attitude", PERMISSION_OWNER ) );
    144146
    145147
     
    216218  Playable::tick( time );
    217219
    218   if( ( xMouse != 0 || yMouse != 0 ) /*&& this->getOwner() == this->getHostID() */)
     220  if( ( xMouse != 0 || yMouse != 0 ) && (this->getOwner() == SharedNetworkData::getInstance()->getHostID() || !State::isOnline() ) )
    219221  {
    220222    xMouse *= time ;
     
    230232      attitude = -1.15;
    231233
    232     this->setAbsDir(Quaternion(heading, Vector(0,1,0)));
    233     this->cameraNode.setRelDir(Quaternion( attitude, Vector( 0, 0, 1 ) ));
    234 
    235234    xMouse = yMouse = 0;
    236235  }
    237236
    238  // this->setAbsDir( this->mouseDir );
     237  this->setAbsDir(Quaternion(heading, Vector(0,1,0)));
     238  this->cameraNode.setRelDir(Quaternion( attitude, Vector( 0, 0, 1 ) ));
    239239
    240240  Vector velocity;
Note: See TracChangeset for help on using the changeset viewer.