Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/network/src/world_entities/space_ships/space_ship.cc @ 6597

Last change on this file since 6597 was 6597, checked in by patrick, 18 years ago

network: booleans now included

File size: 17.3 KB
RevLine 
[5907]1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11### File Specific:
12   main-programmer: Benjamin Knecht
[6034]13   co-programmer: Silvan Nellen
[5907]14
15*/
16
17#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY
18
19#include "executor/executor.h"
20#include "space_ship.h"
21
[6034]22#include "objModel.h"
[5907]23#include "resource_manager.h"
24
25#include "weapons/weapon_manager.h"
26#include "weapons/test_gun.h"
27#include "weapons/turret.h"
28#include "weapons/cannon.h"
29
30#include "factory.h"
31#include "key_mapper.h"
[5978]32#include "event_handler.h"
[5907]33
[6424]34#include "network_game_manager.h"
35
[6243]36#include "power_ups/weapon_power_up.h"
37#include "power_ups/param_power_up.h"
38
[5978]39#include "graphics_engine.h"
40
[6287]41
[6560]42#include "state.h"
43#include "player.h"
[6287]44
[6560]45
[6306]46// #include "lib/gui/gl_gui/glgui_bar.h"
47// #include "lib/gui/gl_gui/glgui_pushbutton.h"
[6287]48
49
[5907]50using namespace std;
51
52CREATE_FACTORY(SpaceShip, CL_SPACE_SHIP);
53
54/**
55 *  creates the controlable Spaceship
56 */
57SpaceShip::SpaceShip()
58{
59  this->init();
60}
61
62/**
63 *  destructs the spaceship, deletes alocated memory
64 */
65SpaceShip::~SpaceShip ()
66{
67}
68
69/**
70 * loads a Spaceships information from a specified file.
71 * @param fileName the name of the File to load the spaceship from (absolute path)
72 */
73SpaceShip::SpaceShip(const char* fileName)
74{
75  this->init();
76  TiXmlDocument doc(fileName);
77
78  if(!doc.LoadFile())
79  {
80    PRINTF(2)("Loading file %s failed for spaceship.\n", fileName);
81    return;
82  }
83
84  this->loadParams(doc.RootElement());
85}
86
87/**
88 *  creates a new Spaceship from Xml Data
89 * @param root the xml element containing spaceship data
90
91   @todo add more parameters to load
92*/
93SpaceShip::SpaceShip(const TiXmlElement* root)
94{
95  this->init();
96  if (root != NULL)
97    this->loadParams(root);
98
99  //weapons:
100  Weapon* wpRight = new TestGun(0);
101  wpRight->setName("testGun Right");
102  Weapon* wpLeft = new TestGun(1);
103  wpLeft->setName("testGun Left");
[5982]104  Weapon* cannon = dynamic_cast<Weapon*>(Factory::fabricate(CL_CANNON));
[5907]105
106  cannon->setName("BFG");
107
[6443]108  this->addWeapon(wpLeft, 1, 0);
109  this->addWeapon(wpRight,1 ,1);
110  this->addWeapon(cannon, 0, 6);
[5907]111
[6443]112  //this->addWeapon(turret, 3, 0);
[5907]113
114  this->getWeaponManager()->changeWeaponConfig(1);
115}
116
117
118/**
119 * initializes a Spaceship
120 */
121void SpaceShip::init()
122{
123//  this->setRelDir(Quaternion(M_PI, Vector(1,0,0)));
124  this->setClassID(CL_SPACE_SHIP, "SpaceShip");
125
126  PRINTF(4)("SPACESHIP INIT\n");
127
[6595]128  EventHandler::getInstance()->grabEvents(true);
[5907]129
[5978]130  bUp = bDown = bLeft = bRight = bAscend = bDescend = bRollL = bRollR = false;
[5907]131  bFire = false;
[5978]132  xMouse = yMouse = 0;
133  mouseSensitivity = 0.001;
[6034]134  airViscosity = 1.0;
[5978]135  cycle = 0.0;
[5907]136
[6430]137  this->setMaxEnergy(100);
138  this->setEnergy(80);
[5982]139
[5907]140  travelSpeed = 15.0;
141  this->velocity = Vector(0.0,0.0,0.0);
[6162]142  this->mouseDir = this->getAbsDir();
[5907]143
[6306]144//   GLGuiButton* button = new GLGuiPushButton();
145//    button->show();
146//    button->setLabel("orxonox");
147//    button->setBindNode(this);
148//     GLGuiBar* bar = new GLGuiBar();
149//     bar->show();
150//     bar->setValue(7.0);
151//     bar->setMaximum(10);
152//     bar->setSize2D( 20, 100);
153//     bar->setAbsCoor2D( 10, 200);
[6300]154
[5907]155  //add events to the eventlist
[5978]156  registerEvent(SDLK_w);
157  registerEvent(SDLK_s);
158  registerEvent(SDLK_a);
159  registerEvent(SDLK_d);
160  registerEvent(SDLK_q);
161  registerEvent(SDLK_e);
[5907]162  registerEvent(KeyMapper::PEV_FIRE1);
163  registerEvent(KeyMapper::PEV_NEXT_WEAPON);
164  registerEvent(KeyMapper::PEV_PREVIOUS_WEAPON);
165  registerEvent(SDLK_PAGEUP);
166  registerEvent(SDLK_PAGEDOWN);
[5978]167  registerEvent(EV_MOUSE_MOTION);
[5907]168
169  this->getWeaponManager()->setSlotCount(7);
170
171  this->getWeaponManager()->setSlotPosition(0, Vector(-2.6, .1, -3.0));
172  this->getWeaponManager()->setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
173
174  this->getWeaponManager()->setSlotPosition(1, Vector(-2.6, .1, 3.0));
175  this->getWeaponManager()->setSlotCapability(1, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
176
177  this->getWeaponManager()->setSlotPosition(2, Vector(-1.5, .5, -.5));
178  this->getWeaponManager()->setSlotDirection(2, Quaternion(-M_PI_4*.5, Vector(1,0,0)));
179
180  this->getWeaponManager()->setSlotPosition(3, Vector(-1.5, .5, .5));
181  this->getWeaponManager()->setSlotDirection(3, Quaternion(M_PI_4*.5, Vector(1,0,0)));
182
183  this->getWeaponManager()->setSlotPosition(4, Vector(-1.5, -.5, .5));
184  this->getWeaponManager()->setSlotDirection(4, Quaternion(-M_PI_4*.5+M_PI, Vector(1,0,0)));
185
186  this->getWeaponManager()->setSlotPosition(5, Vector(-1.5, -.5, -.5));
187  this->getWeaponManager()->setSlotDirection(5, Quaternion(+M_PI_4*.5-M_PI, Vector(1,0,0)));
188//
189   this->getWeaponManager()->setSlotPosition(6, Vector(-1, 0.0, 0));
190   this->getWeaponManager()->setSlotCapability(6, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL);
191   //
192//   this->getWeaponManager()->setSlotPosition(8, Vector(-2.5, -0.3, -2.0));
193//   this->getWeaponManager()->setSlotDirection(8, Quaternion(-M_PI, Vector(1,0,0)));
194//
195//   this->getWeaponManager()->setSlotPosition(9, Vector(-2.5, -0.3, 2.0));
196//   this->getWeaponManager()->setSlotDirection(9, Quaternion(+M_PI, Vector(1,0,0)));:
197
[6162]198  this->getWeaponManager()->getFixedTarget()->setParent(this);
199  this->getWeaponManager()->getFixedTarget()->setRelCoor(100000,0,0);
200
[6222]201  dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( false);
[5907]202}
203
204/**
205 * loads the Settings of a SpaceShip from an XML-element.
206 * @param root the XML-element to load the Spaceship's properties from
207 */
208void SpaceShip::loadParams(const TiXmlElement* root)
209{
210  static_cast<WorldEntity*>(this)->loadParams(root);
211}
212
213
[6222]214void SpaceShip::enter()
215{
216  dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( true);
[6241]217  this->attachCamera();
[6222]218}
219
220void SpaceShip::leave()
221{
222  dynamic_cast<Element2D*>(this->getWeaponManager()->getFixedTarget())->setVisibility( false);
[6241]223  this->detachCamera();
[6222]224}
225
[5907]226
227/**
228 *  effect that occurs after the SpaceShip is spawned
229*/
230void SpaceShip::postSpawn ()
231{
232  //setCollision(new CollisionCluster(1.0, Vector(0,0,0)));
233}
234
235/**
236 *  the action occuring if the spaceship left the game
237*/
238void SpaceShip::leftWorld ()
239{}
240
241WorldEntity* ref = NULL;
242/**
243 *  this function is called, when two entities collide
244 * @param entity: the world entity with whom it collides
245 *
246 * Implement behaviour like damage application or other miscellaneous collision stuff in this function
247 */
248void SpaceShip::collidesWith(WorldEntity* entity, const Vector& location)
249{
[6436]250  Playable::collidesWith(entity, location);
[5907]251  if (entity->isA(CL_TURRET_POWER_UP) && entity != ref)
252  {
253    this->ADDWEAPON();
254    ref = entity;
255    }
256//  PRINTF(3)("collision %s vs %s @ (%f,%f,%f)\n", this->getClassName(), entity->getClassName(), location.x, location.y, location.z);
257}
258
259/**
260 *  draws the spaceship after transforming it.
261*/
262void SpaceShip::draw () const
263{
[6281]264  WorldEntity::draw();
[5907]265  this->getWeaponManager()->draw();
266
267  //this->debug(0);
268}
269
270/**
271 *  the function called for each passing timeSnap
272 * @param time The timespan passed since last update
273*/
274void SpaceShip::tick (float time)
275{
[6563]276  this->getWeaponManager()->tick(time);
277  // weapon system manipulation
278  this->weaponAction();
279
[6597]280//   if( this != State::getPlayer()->getControllable())
281//     return;
[6563]282
[5907]283  // spaceship controlled movement
284  this->calculateVelocity(time);
285
286  Vector move = (velocity)*time;
287
[6034]288  //orient the velocity in the direction of the spaceship.
289  travelSpeed = velocity.len();
290  velocity += ((this->getAbsDirX())*travelSpeed-velocity)*airViscosity;
291  velocity = (velocity.getNormalized())*travelSpeed;
[6222]292
[6162]293  //orient the spaceship in direction of the mouse
[6241]294   rotQuat = Quaternion::quatSlerp( this->getAbsDir(), mouseDir, fabsf(time)*3.0);
295   if (this->getAbsDir().distance(rotQuat) > 0.00000000000001)
[6162]296    this->setAbsDir( rotQuat);
297   //this->setAbsDirSoft(mouseDir,5);
[6222]298
[5978]299  // this is the air friction (necessary for a smooth control)
300  if(velocity.len() != 0) velocity -= velocity*0.01;
[5982]301
[6034]302  //hoover effect
[6526]303  //cycle += time;
304  //this->shiftCoor(Vector(0,1,0)*cos(this->cycle*2.0)*0.02);
[5982]305
[6034]306  //readjust
[6430]307
[6426]308  /*
309    In the game "Yager" the spaceship gets readjusted when the player moves the mouse.
310    I (bknecht) go and check it out how they do it, we could probably use this also in Orxonox.
311  */
[6430]312  //if (xMouse != 0 && yMouse != 0)
313
[6426]314  //if (this->getAbsDirZ().y > 0.1) this->shiftDir(Quaternion(time*0.3, Vector(1,0,0)));
[6034]315  //else if (this->getAbsDirZ().y < -0.1) this->shiftDir(Quaternion(-time*0.3, Vector(1,0,0)));
316
[5978]317  //SDL_WarpMouse(GraphicsEngine::getInstance()->getResolutionX()/2, GraphicsEngine::getInstance()->getResolutionY()/2);
[5907]318
319  this->shiftCoor (move);
320
[6563]321
[5907]322}
323
324/**
325 *  calculate the velocity
326 * @param time the timeslice since the last frame
327*/
328void SpaceShip::calculateVelocity (float time)
329{
330  Vector accel(0.0, 0.0, 0.0);
[6162]331  /*
332  Vector rot(0.0, 0.0, 0.0); // wird benötigt für Helicopter
333  */
[5907]334  //float rotVal = 0.0;
[5912]335  /* FIXME: calculating the direction and orthDirection every timeSlice is redundant! save it somewhere */
[5907]336  /* calculate the direction in which the craft is heading  */
337
[6222]338  Plane plane(Vector(0,1,0), Vector(0,0,0));
339
[5907]340  if( this->bUp )
341   {
[5978]342     //this->shiftCoor(this->getAbsDirX());
343      accel += (this->getAbsDirX())*2;
[6222]344
[6162]345      /* Heli-Steuerung
346         accel += (this->getAbsDirX()*2;
347         if(
348      */
[5907]349   }
350
351  if( this->bDown )
[5908]352   {
[5978]353     //this->shiftCoor((this->getAbsDirX())*-1);
354     accel -= (this->getAbsDirX())*2;
[5907]355   }
356
[6034]357  if( this->bLeft/* > -this->getRelCoor().z*2*/)
[5907]358  {
[5912]359    this->shiftDir(Quaternion(time, Vector(0,1,0)));
360//    accel -= rightDirection;
[5908]361    //velocityDir.normalize();
[5907]362    //rot +=Vector(1,0,0);
363    //rotVal -= .4;
364  }
365  if( this->bRight /* > this->getRelCoor().z*2*/)
366  {
[5912]367    this->shiftDir(Quaternion(-time, Vector(0,1,0)));
368
369    //    accel += rightDirection;
[5908]370    //velocityDir.normalize();
[5907]371    //rot += Vector(1,0,0);
372    //rotVal += .4;
373  }
[5982]374
[6034]375
[5978]376  if( this->bRollL /* > -this->getRelCoor().z*2*/)
377  {
[6162]378    mouseDir *= Quaternion(-time, Vector(1,0,0));
[5978]379//    accel -= rightDirection;
380    //velocityDir.normalize();
381    //rot +=Vector(1,0,0);
382    //rotVal -= .4;
383  }
384  if( this->bRollR /* > this->getRelCoor().z*2*/)
385  {
[6162]386    mouseDir *= Quaternion(time, Vector(1,0,0));
[5978]387
388    //    accel += rightDirection;
389    //velocityDir.normalize();
390    //rot += Vector(1,0,0);
391    //rotVal += .4;
392  }
[5907]393  if (this->bAscend )
394  {
[5912]395    this->shiftDir(Quaternion(time, Vector(0,0,1)));
396
397//    accel += upDirection;
[5908]398    //velocityDir.normalize();
[5907]399    //rot += Vector(0,0,1);
400    //rotVal += .4;
401  }
402  if (this->bDescend )
403  {
[5912]404    this->shiftDir(Quaternion(-time, Vector(0,0,1)));
405
406    //    accel -= upDirection;
[5908]407    //velocityDir.normalize();
[5907]408    //rot += Vector(0,0,1);
409    //rotVal -= .4;
410  }
411
[5978]412  velocity += accel;
[5907]413  //rot.normalize();
414  //this->setRelDirSoft(Quaternion(rotVal, rot), 5);
415}
416
417/**
418 * weapon manipulation by the player
419*/
420void SpaceShip::weaponAction()
421{
422  if( this->bFire)
423    {
424      this->getWeaponManager()->fire();
425    }
426}
427
428/**
429 * @todo switch statement ??
430 */
431void SpaceShip::process(const Event &event)
432{
[5982]433
434
[5978]435  if( event.type == SDLK_a)
436      this->bRollL = event.bPressed;
437  else if( event.type == SDLK_d)
438      this->bRollR = event.bPressed;
[5907]439  else if( event.type == KeyMapper::PEV_FIRE1)
440      this->bFire = event.bPressed;
441  else if( event.type == KeyMapper::PEV_NEXT_WEAPON && event.bPressed)
[6443]442  {
[6444]443    this->nextWeaponConfig();//if( !event.bPressed) this->bWeaponChange = !this->bWeaponChange;
[6443]444  }
[5907]445  else if ( event.type == KeyMapper::PEV_PREVIOUS_WEAPON && event.bPressed)
[6444]446    this->previousWeaponConfig();
[5978]447  else if( event.type == SDLK_w)
448    this->bUp = event.bPressed; //this->shiftCoor(0,.1,0);
449  else if( event.type == SDLK_s)
450    this->bDown = event.bPressed; //this->shiftCoor(0,-.1,0);
451  else if( event.type == EV_MOUSE_MOTION)
452  {
453    this->xMouse = event.xRel;
454    this->yMouse = event.yRel;
[6162]455    mouseDir *= (Quaternion(-M_PI/4*xMouse*mouseSensitivity, Vector(0,1,0))*Quaternion(-M_PI/4*yMouse*mouseSensitivity, Vector(0,0,1)));
[6241]456   // if( xMouse*xMouse + yMouse*yMouse < 0.9)
457     //this->setAbsDir(mouseDir);
[5978]458  }
[5907]459}
460
[6243]461/**
462 *
463 */
464bool SpaceShip::pickup(PowerUp* powerUp)
465{
466  if(powerUp->isA(CL_WEAPON_POWER_UP)) {
467    Weapon* weapon = dynamic_cast<WeaponPowerUp*>(powerUp)->getWeapon();
468    WeaponManager* manager = this->getWeaponManager();
469    int slot = manager->getNextFreeSlot(0, weapon->getCapability());
470    if(slot >= 0) {
471      manager->addWeapon(weapon, 0, slot);
472      return true;
473    }
474  }
475  else if(powerUp->isA(CL_PARAM_POWER_UP)) {
476    ParamPowerUp* ppu = dynamic_cast<ParamPowerUp*>(powerUp);
477    switch(ppu->getType()) {
478      case PARAM_SHIELD:
479        break;
480    }
481  }
482  return false;
483}
484
[5907]485#include "weapons/aiming_turret.h"
486// FIXME THIS MIGHT BE CONSIDERED EITHER A FEATURE, OR A BUG
487void SpaceShip::ADDWEAPON()
488{
489  Weapon* turret = NULL;
490
[6306]491  if ((float)rand()/RAND_MAX < .9)
[5907]492  {
493    //if (this->getWeaponManager()->hasFreeSlot(2, WTYPE_TURRET))
494    {
495      turret = new Turret();
[6443]496      this->addWeapon(turret, 2);
[5907]497      this->getWeaponManager()->changeWeaponConfig(2);
498    }
499  }
500  else
501  {
502    //if (this->getWeaponManager()->hasFreeSlot(3))
503    {
[6426]504      turret = dynamic_cast<Weapon*>(Factory::fabricate(CL_TARGETING_TURRET));
505      if (turret != NULL)
[6443]506      this->addWeapon(turret, 3);
[5907]507
508      this->getWeaponManager()->changeWeaponConfig(3);
509    }
510  }
511
512  if(turret != NULL)
513  {
514    turret->setName("Turret");
515    turret->setStateDuration(WS_SHOOTING, (float)rand()/RAND_MAX*.5+.1);
516  }
517}
[6424]518
[6498]519#define MASK_bUp         1
520#define MASK_bDown       2
521#define MASK_bLeft       4
522#define MASK_bRight      8
523#define MASK_bAscend    16
524#define MASK_bDescend   32
525#define MASK_bFire      64
526#define MASK_bRollL    128
527#define MASK_bRollR    256
[6424]528
[6498]529#define DATA_state       1
530#define DATA_flags       2
531#define DATA_mouse       3
532
[6424]533int SpaceShip::writeBytes( const byte * data, int length, int sender )
534{
535  SYNCHELP_READ_BEGIN();
536
[6498]537  byte b;
538  SYNCHELP_READ_BYTE( b );
[6424]539
[6526]540  if ( b == DATA_state /*&& (this->getHostID()!=this->getOwner() || sender==0)*/ )
[6498]541  {
[6526]542    PRINTF(0)("GOT STATE %d\n", this->getUniqueID());
[6498]543    setRequestedSync( false );
544    setIsOutOfSync( false );
545    SYNCHELP_READ_FKT( WorldEntity::writeState );
[6526]546    //SYNCHELP_READ_FLOAT( cycle );
547
548    return SYNCHELP_READ_N;
[6498]549  }
550
[6503]551
[6526]552  if ( b == DATA_flags /*&& this->getHostID()!=this->getOwner()*/ )
[6498]553  {
[6553]554    int flags = 0;
[6596]555    SYNCHELP_READ_INT( flags );
[6498]556
[6526]557    bUp = (flags & MASK_bUp) != 0;
558    bDown = (flags & MASK_bDown) != 0;
559    bLeft = (flags & MASK_bLeft) != 0;
560    bRight = (flags & MASK_bRight) != 0;
561    bAscend = (flags & MASK_bAscend) != 0;
562    bDescend = (flags & MASK_bDescend) != 0;
563    bFire = (flags & MASK_bFire) != 0;
564    bRollL = (flags & MASK_bRollL) != 0;
565    bRollR = (flags & MASK_bRollR) != 0;
566
[6498]567  }
568
[6526]569  /*if ( b == DATA_mouse && this->getHostID()!=this->getOwner() )
[6498]570  {
571    SYNCHELP_READ_FLOAT( xMouse );
572    SYNCHELP_READ_FLOAT( yMouse );
573    SYNCHELP_READ_FLOAT( mouseSensitivity );
574    SYNCHELP_READ_FLOAT( cycle );
[6526]575}*/
[6498]576
[6538]577  if ( this->getOwner() != this->getHostID() )
578    SYNCHELP_READ_FKT( PNode::writeSync );
[6526]579
[6424]580  return SYNCHELP_READ_N;
581}
582
[6498]583
584
[6424]585int SpaceShip::readBytes( byte * data, int maxLength, int * reciever )
586{
[6498]587  SYNCHELP_WRITE_BEGIN();
588
[6526]589  if ( isOutOfSync() && !requestedSync() /*&& this->getHostID()!=this->getOwner()*/ )
[6424]590  {
591    (NetworkGameManager::getInstance())->sync( this->getUniqueID(), this->getOwner() );
592    setRequestedSync( true );
[6526]593    PRINTF(0)("REQUESTED STATE %d\n", this->getUniqueID());
[6424]594  }
595
596  int rec = this->getRequestSync();
597  if ( rec > 0 )
598  {
599    *reciever = rec;
600
[6526]601    PRINTF(0)("SEND STATE %d %d\n", this->getUniqueID(), rec);
602
[6498]603    SYNCHELP_WRITE_BYTE( (byte)DATA_state );
[6424]604
605    SYNCHELP_WRITE_FKT( WorldEntity::readState );
[6526]606    //SYNCHELP_WRITE_FLOAT( cycle );
[6424]607
608    return SYNCHELP_WRITE_N;
609  }
610
611  *reciever = 0;
[6498]612
613  if ( this->getHostID()==this->getOwner() )
614  {
615    int mask = 0;
616
617    if ( bUp )
618      mask |= MASK_bUp;
619    if ( bDown )
620      mask |= MASK_bDown;
621    if ( bLeft )
622      mask |= MASK_bLeft;
623    if ( bRight )
624      mask |= MASK_bRight;
625    if ( bAscend )
626      mask |= MASK_bAscend;
627    if ( bFire )
628      mask |= MASK_bFire;
629    if ( bRollL )
630      mask |= MASK_bRollL;
631    if ( bRollR )
632      mask |= MASK_bRollR;
633
[6552]634
[6526]635    //static float oldxMouse = xMouse + 1.0;
636    //static float oldyMouse = yMouse + 1.0;
[6498]637
638    if ( mask != oldMask )
639    {
640      oldMask = mask;
641      SYNCHELP_WRITE_BYTE( DATA_flags );
[6596]642      SYNCHELP_WRITE_INT( mask );
[6498]643    }
[6526]644    else
645    {
646      SYNCHELP_WRITE_BYTE( 0 );
647    }
[6498]648
[6526]649    /*if ( oldxMouse != xMouse || oldyMouse != yMouse )
[6498]650    {
651      oldxMouse = xMouse;
652      oldyMouse = yMouse;
653      SYNCHELP_WRITE_BYTE( DATA_mouse );
654      SYNCHELP_WRITE_FLOAT( xMouse );
655      SYNCHELP_WRITE_FLOAT( yMouse );
656      SYNCHELP_WRITE_FLOAT( mouseSensitivity );
657      SYNCHELP_WRITE_FLOAT( cycle );
[6526]658    }*/
[6498]659  }
[6526]660  else
661  {
662    SYNCHELP_WRITE_BYTE( 0 );
663  }
[6498]664
[6538]665  if ( this->getOwner() == this->getHostID() )
666    SYNCHELP_WRITE_FKT( PNode::readSync );
[6526]667
[6498]668  return SYNCHELP_WRITE_N;
[6424]669}
Note: See TracBrowser for help on using the repository browser.