Changeset 7567 in orxonox.OLD for branches/network
- Timestamp:
- May 10, 2006, 1:44:33 PM (19 years ago)
- Location:
- branches/network/src/lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/lib/graphics/importer/height_map.cc
r7221 r7567 595 595 float c = normalVectorField [(xInt)][yInt].y; 596 596 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); 600 600 601 601 height -= ( (a/c)*(x) + (b/c)*(y)); 602 602 603 PRINTF(0)("height: %f \n" ,height );603 // PRINTF(0)("height: %f \n" ,height ); 604 604 return (height + offsetZ); 605 605 } -
branches/network/src/lib/network/network_game_manager.cc
r7444 r7567 61 61 NetworkGameManager::~NetworkGameManager() 62 62 { 63 #if 0 63 64 for ( int i = 0; i<outBuffer.size(); i++) 64 65 { … … 66 67 delete outBuffer[i].buffer; 67 68 } 68 69 } 70 71 69 #endif 70 71 } 72 73 #if 0 72 74 int NetworkGameManager::writeBytes(const byte* data, int length, int sender) 73 75 { … … 154 156 return i; 155 157 } 156 158 #endif 159 160 #if 0 157 161 int NetworkGameManager::readBytes(byte* data, int maxLength, int * reciever) 158 162 { … … 186 190 return 0; 187 191 } 188 192 #endif 193 194 #if 0 189 195 void NetworkGameManager::writeDebug() const 190 196 { … … 194 200 { 195 201 } 202 #endif 196 203 197 204 … … 214 221 else 215 222 { 223 #if 0 216 224 this->requestCreateEntity( classID ); 225 #endif 217 226 return -1; 218 227 } … … 282 291 else 283 292 { 293 #if 0 284 294 this->requestRemoveEntity( uniqueID ); 285 } 286 } 287 288 289 295 #endif 296 } 297 } 298 299 300 #if 0 290 301 /*! 291 302 * Creates the needed entity on the server if possible … … 305 316 } 306 317 } 307 318 #endif 319 320 #if 0 308 321 /*! 309 322 * Removes the specified entity on the server … … 323 336 } 324 337 } 338 #endif 325 339 326 340 /*! … … 331 345 int NetworkGameManager::executeCreateEntity(ClassID classID, int uniqueID, int owner) 332 346 { 347 #if 0 333 348 for ( int i = 0; i<outBuffer.size(); i++) 334 349 { … … 345 360 return -1; 346 361 } 347 362 #endif 348 363 PRINTF(0)("ExecuteCreateEntity: server side: classID: %x, uniqueID: %i, owner: %i\n", classID, uniqueID, owner); 349 364 doCreateEntity( classID, uniqueID, owner ); … … 359 374 void NetworkGameManager::executeRemoveEntity(int uniqueID) 360 375 { 376 #if 0 361 377 for ( int i = 0; i<outBuffer.size(); i++) 362 378 { … … 369 385 return; 370 386 } 387 #endif 371 388 372 389 doRemoveEntity(uniqueID); … … 382 399 } 383 400 401 #if 0 384 402 /*! 385 403 * Sends the Entities to the new connected client … … 437 455 signalNewPlayer( userID ); 438 456 } 457 #endif 439 458 440 459 … … 442 461 bool NetworkGameManager::signalNewPlayer(int userId) 443 462 { 463 #if 0 444 464 if ( userId >= outBuffer.size() ) 445 465 resizeBufferVector( userId ); … … 450 470 PRINTF(0)("Request for creation: userid: %i, uniqueid: %i\n", userId, uniqueId); 451 471 this->sendYouAre(uniqueId, userId); 452 472 #endif 453 473 } 454 474 … … 472 492 } 473 493 474 494 #if 0 475 495 /** 476 496 * Creates a buffer for user n … … 492 512 } 493 513 } 514 #endif 494 515 495 516 /** … … 594 615 } 595 616 596 617 #if 0 597 618 /** 598 619 * Copies length bytes to the clientBuffer with error checking … … 613 634 return true; 614 635 } 615 636 #endif 637 638 #if 0 616 639 /** 617 640 * Reads data from clientBuffer with error checking … … 632 655 return true; 633 656 } 657 #endif 634 658 635 659 /** … … 685 709 if ( !isServer() ) 686 710 return; 687 711 #if 0 688 712 if ( userID != 0 ) 689 713 { … … 696 720 else 697 721 { 722 #endif 698 723 doYouAre(uniqueID); 699 } 724 #if 0 725 } 726 #endif 727 700 728 } 701 729 … … 911 939 } 912 940 913 941 #if 0 914 942 bool NetworkGameManager::writeToClientBuffer( clientBuffer & cb, byte b ) 915 943 { … … 924 952 return true; 925 953 } 954 926 955 927 956 bool NetworkGameManager::writeToClientBuffer( clientBuffer & cb, int i ) … … 938 967 return true; 939 968 } 940 941 969 #endif 970 971 -
branches/network/src/lib/network/network_game_manager.h
r7444 r7567 76 76 { if (!NetworkGameManager::singletonRef) NetworkGameManager::singletonRef = new NetworkGameManager(); return NetworkGameManager::singletonRef; } 77 77 78 #if 0 78 79 virtual int writeBytes(const byte* data, int length, int sender); 79 80 virtual int readBytes(byte* data, int maxLength, int * reciever); 80 81 virtual void writeDebug() const; 81 82 virtual void readDebug() const; 83 #endif 82 84 83 85 int createEntity( ClassID classID, int owner = 0 ); … … 86 88 void sendYouAre( int uniqueID, int userID ); 87 89 90 #if 0 88 91 void sendEntityList(int userID); 92 #endif 89 93 90 94 bool signalNewPlayer(int userId); … … 109 113 110 114 /* some network handlers helper functions */ 111 void requestCreateEntity(ClassID classID);115 // void requestCreateEntity(ClassID classID); 112 116 int executeCreateEntity(ClassID classID, int uniqueID = 0, int owner = 0); 113 117 BaseObject* doCreateEntity(ClassID classID, int uniqueID, int owner); 114 118 115 void requestRemoveEntity(int uniqueID);119 // void requestRemoveEntity(int uniqueID); 116 120 void executeRemoveEntity(int uniqueID); 117 121 void doRemoveEntity(int uniqueID); … … 119 123 void doYouAre( int uniqueID ); 120 124 121 void requestPNodePath(const PNode* node1, const PNode* node2);125 // void requestPNodePath(const PNode* node1, const PNode* node2); 122 126 void executeRequestPNodePath(const PNode* node2, const PNode* node2); 123 127 void doRequestPNodePath(const PNode* node1, const PNode* node2); 124 128 125 129 bool canCreateEntity(ClassID classID); 130 #if 0 131 void resizeBufferVector(int n); 126 132 127 void resizeBufferVector(int n);128 133 129 134 bool writeToClientBuffer( clientBuffer &cb, byte*data, int length ); … … 131 136 bool writeToClientBuffer( clientBuffer &cb, int i ); 132 137 bool readFromClientBuffer( clientBuffer &cb, byte*data, int length ); 133 138 #endif 134 139 135 140 private: 141 #if 0 136 142 std::vector<clientBuffer> outBuffer; 137 143 //clientBuffer allOutBuffer; 144 #endif 138 145 static NetworkGameManager* singletonRef; 139 146 bool hasRequestedWorld;
Note: See TracChangeset
for help on using the changeset viewer.