Changeset 514 for code/branches/FICN/src/network/GameStateClient.cc
- Timestamp:
- Dec 13, 2007, 6:02:07 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/network/GameStateClient.cc
r505 r514 1 /* 2 * ORXONOX - the hottest 3D action shooter ever to exist 3 * 4 * 5 * License notice: 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 * Author: 22 * ... 23 * Co-authors: 24 * ... 25 * 26 */ 27 1 28 #include "GameStateClient.h" 2 29 … … 52 79 sync.data = data; 53 80 data+=sync.length; 54 81 55 82 if(it->objectID!=sync.objectID){ 56 83 // bad luck ;) … … 73 100 ++it; 74 101 } 75 102 76 103 return true; 77 104 } … … 117 144 uLongf length=normsize; 118 145 retval = uncompress( dest, &length, a.data, (uLong)compsize ); 119 146 120 147 switch ( retval ) { 121 148 case Z_OK: std::cout << "successfully compressed" << std::endl; break; … … 124 151 case Z_DATA_ERROR: std::cout << "data corrupted" << std::endl; break; 125 152 } 126 153 127 154 GameState gamestate; 128 155 gamestate.id = a.id; … … 130 157 gamestate.data = dest; 131 158 gamestate.diffed = a.diffed; 132 159 133 160 return gamestate; 134 161 }
Note: See TracChangeset
for help on using the changeset viewer.