Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 5, 2008, 11:32:42 PM (16 years ago)
Author:
scheusso
Message:

we use enetcallback for destroying packets now (unfortunately there are still some problems)

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
    147#include "Gamestate.h"
    248#include "network/ClientInformation.h"
     
    2268
    2369Gamestate::Gamestate(unsigned char *data, bool compressed, int clientID):
    24     PacketContent(data, clientID)
     70    Packet(data, clientID)
    2571{
    2672  compressed_ = compressed;
    27   //GAMESTATE_HEADER = (GamestateHeader *)data;
    28   //if(!compressed)
    29     //bs_ = new Bytestream(data+sizeof(GamestateHeader), GAMESTATE_HEADER->compsize);
    3073}
    3174
     
    138181}
    139182
    140 unsigned char *Gamestate::getData()
    141 {
    142   assert(data_!=0);
    143   return data_;
    144 }
    145 
    146183unsigned int Gamestate::getSize() const
    147184{
     185  assert(data_);
    148186  if(compressed_)
    149187    return HEADER->compsize+sizeof(GamestateHeader);
Note: See TracChangeset for help on using the changeset viewer.