Changeset 1711 for code/branches/network/src/network/packet/Gamestate.cc
- Timestamp:
- Sep 5, 2008, 11:32:42 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/network/packet/Gamestate.cc
r1710 r1711 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 /* 20 * ORXONOX - the hottest 3D action shooter ever to exist 21 * > www.orxonox.net < 22 * 23 * 24 * License notice: 25 * 26 * This program is free software; you can redistribute it and/or 27 * modify it under the terms of the GNU General Public License 28 * as published by the Free Software Foundation; either version 2 29 * of the License, or (at your option) any later version. 30 * 31 * This program is distributed in the hope that it will be useful, 32 * but WITHOUT ANY WARRANTY; without even the implied warranty of 33 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 * GNU General Public License for more details. 35 * 36 * You should have received a copy of the GNU General Public License 37 * along with this program; if not, write to the Free Software 38 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 39 * 40 * Author: 41 * Oliver Scheuss, (C) 2008 42 * Co-authors: 43 * ... 44 * 45 */ 46 1 47 #include "Gamestate.h" 2 48 #include "network/ClientInformation.h" … … 22 68 23 69 Gamestate::Gamestate(unsigned char *data, bool compressed, int clientID): 24 Packet Content(data, clientID)70 Packet(data, clientID) 25 71 { 26 72 compressed_ = compressed; 27 //GAMESTATE_HEADER = (GamestateHeader *)data;28 //if(!compressed)29 //bs_ = new Bytestream(data+sizeof(GamestateHeader), GAMESTATE_HEADER->compsize);30 73 } 31 74 … … 138 181 } 139 182 140 unsigned char *Gamestate::getData()141 {142 assert(data_!=0);143 return data_;144 }145 146 183 unsigned int Gamestate::getSize() const 147 184 { 185 assert(data_); 148 186 if(compressed_) 149 187 return HEADER->compsize+sizeof(GamestateHeader);
Note: See TracChangeset
for help on using the changeset viewer.