Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7567 in orxonox.OLD for branches/network/src/lib


Ignore:
Timestamp:
May 10, 2006, 1:44:33 PM (19 years ago)
Author:
rennerc
Message:

removed some output of heightMap. commented out old code in networkGameManager

Location:
branches/network/src/lib
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/graphics/importer/height_map.cc

    r7221 r7567  
    595595 float c = normalVectorField [(xInt)][yInt].y;
    596596
    597  PRINTF(0)("a: %f \n" ,a);
    598   PRINTF(0)("b: %f \n" ,b);
    599    PRINTF(0)("c: %f \n" ,c);
     597// PRINTF(0)("a: %f \n" ,a);
     598//  PRINTF(0)("b: %f \n" ,b);
     599//   PRINTF(0)("c: %f \n" ,c);
    600600
    601601 height -= ( (a/c)*(x) + (b/c)*(y));
    602602
    603  PRINTF(0)("height: %f \n" ,height );
     603// PRINTF(0)("height: %f \n" ,height );
    604604 return (height + offsetZ);
    605605}
  • branches/network/src/lib/network/network_game_manager.cc

    r7444 r7567  
    6161NetworkGameManager::~NetworkGameManager()
    6262{
     63#if 0
    6364  for ( int i = 0; i<outBuffer.size(); i++)
    6465  {
     
    6667      delete outBuffer[i].buffer;
    6768  }
    68 
    69 }
    70 
    71 
     69#endif
     70
     71}
     72
     73#if 0
    7274int NetworkGameManager::writeBytes(const byte* data, int length, int sender)
    7375{
     
    154156  return i;
    155157}
    156 
     158#endif
     159
     160#if 0
    157161int NetworkGameManager::readBytes(byte* data, int maxLength, int * reciever)
    158162{
     
    186190  return 0;
    187191}
    188 
     192#endif
     193
     194#if 0
    189195void NetworkGameManager::writeDebug() const
    190196{
     
    194200{
    195201}
     202#endif
    196203
    197204
     
    214221  else
    215222  {
     223#if 0
    216224    this->requestCreateEntity( classID );
     225#endif
    217226    return -1;
    218227  }
     
    282291  else
    283292  {
     293#if 0
    284294    this->requestRemoveEntity( uniqueID );
    285   }
    286 }
    287 
    288 
    289 
     295#endif
     296  }
     297}
     298
     299
     300#if 0
    290301/*!
    291302 * Creates the needed entity on the server if possible
     
    305316  }
    306317}
    307 
     318#endif
     319
     320#if 0
    308321/*!
    309322 * Removes the specified entity on the server
     
    323336  }
    324337}
     338#endif
    325339
    326340/*!
     
    331345int NetworkGameManager::executeCreateEntity(ClassID classID, int uniqueID, int owner)
    332346{
     347#if 0
    333348  for ( int i = 0; i<outBuffer.size(); i++)
    334349  {
     
    345360      return -1;
    346361  }
    347 
     362#endif
    348363  PRINTF(0)("ExecuteCreateEntity: server side: classID: %x, uniqueID: %i, owner: %i\n", classID, uniqueID, owner);
    349364  doCreateEntity( classID, uniqueID, owner );
     
    359374void NetworkGameManager::executeRemoveEntity(int uniqueID)
    360375{
     376#if 0
    361377  for ( int i = 0; i<outBuffer.size(); i++)
    362378  {
     
    369385      return;
    370386  }
     387#endif
    371388
    372389  doRemoveEntity(uniqueID);
     
    382399}
    383400
     401#if 0
    384402/*!
    385403 * Sends the Entities to the new connected client
     
    437455  signalNewPlayer( userID );
    438456}
     457#endif
    439458
    440459
     
    442461bool NetworkGameManager::signalNewPlayer(int userId)
    443462{
     463#if 0
    444464  if ( userId >= outBuffer.size() )
    445465    resizeBufferVector( userId );
     
    450470  PRINTF(0)("Request for creation: userid: %i, uniqueid: %i\n", userId, uniqueId);
    451471  this->sendYouAre(uniqueId, userId);
    452 
     472#endif
    453473}
    454474
     
    472492}
    473493
    474 
     494#if 0
    475495/**
    476496 * Creates a buffer for user n
     
    492512  }
    493513}
     514#endif
    494515
    495516/**
     
    594615}
    595616
    596 
     617#if 0
    597618/**
    598619 * Copies length bytes to the clientBuffer with error checking
     
    613634  return true;
    614635}
    615 
     636#endif
     637
     638#if 0
    616639/**
    617640 * Reads data from clientBuffer with error checking
     
    632655  return true;
    633656}
     657#endif
    634658
    635659/**
     
    685709  if ( !isServer() )
    686710    return;
    687 
     711#if 0
    688712  if ( userID != 0 )
    689713  {
     
    696720  else
    697721  {
     722#endif
    698723    doYouAre(uniqueID);
    699   }
     724#if 0
     725  }
     726#endif
     727
    700728}
    701729
     
    911939}
    912940
    913 
     941#if 0
    914942bool NetworkGameManager::writeToClientBuffer( clientBuffer & cb, byte b )
    915943{
     
    924952  return true;
    925953}
     954
    926955
    927956bool NetworkGameManager::writeToClientBuffer( clientBuffer & cb, int i )
     
    938967  return true;
    939968}
    940 
    941 
     969#endif
     970
     971
  • branches/network/src/lib/network/network_game_manager.h

    r7444 r7567  
    7676    { if (!NetworkGameManager::singletonRef) NetworkGameManager::singletonRef = new NetworkGameManager(); return NetworkGameManager::singletonRef; }
    7777
     78#if 0
    7879    virtual int writeBytes(const byte* data, int length, int sender);
    7980    virtual int readBytes(byte* data, int maxLength, int * reciever);
    8081    virtual void writeDebug() const;
    8182    virtual void readDebug() const;
     83#endif
    8284
    8385    int createEntity( ClassID classID, int owner = 0 );
     
    8688    void sendYouAre( int uniqueID, int userID );
    8789
     90#if 0
    8891    void sendEntityList(int userID);
     92#endif
    8993
    9094    bool signalNewPlayer(int userId);
     
    109113
    110114    /* some network handlers helper functions */
    111     void requestCreateEntity(ClassID classID);
     115//    void requestCreateEntity(ClassID classID);
    112116    int executeCreateEntity(ClassID classID, int uniqueID = 0, int owner = 0);
    113117    BaseObject* doCreateEntity(ClassID classID, int uniqueID, int owner);
    114118
    115     void requestRemoveEntity(int uniqueID);
     119//    void requestRemoveEntity(int uniqueID);
    116120    void executeRemoveEntity(int uniqueID);
    117121    void doRemoveEntity(int uniqueID);
     
    119123    void doYouAre( int uniqueID );
    120124
    121     void requestPNodePath(const PNode* node1, const PNode* node2);
     125//    void requestPNodePath(const PNode* node1, const PNode* node2);
    122126    void executeRequestPNodePath(const PNode* node2, const PNode* node2);
    123127    void doRequestPNodePath(const PNode* node1, const PNode* node2);
    124128
    125129    bool canCreateEntity(ClassID classID);
     130#if 0
     131    void resizeBufferVector(int n);
    126132
    127     void resizeBufferVector(int n);
    128133
    129134    bool writeToClientBuffer( clientBuffer &cb, byte*data, int length );
     
    131136    bool writeToClientBuffer( clientBuffer &cb, int i );
    132137    bool readFromClientBuffer( clientBuffer &cb, byte*data, int length );
    133 
     138#endif
    134139
    135140  private:
     141#if 0
    136142    std::vector<clientBuffer>     outBuffer;
    137143    //clientBuffer                  allOutBuffer;
     144#endif
    138145    static NetworkGameManager*    singletonRef;
    139146    bool                          hasRequestedWorld;
Note: See TracChangeset for help on using the changeset viewer.