Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

network: switching coding

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