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/ClassID.cc

    r1708 r1711  
     1/*
     2 *   ORXONOX - the hottest 3D action shooter ever to exist
     3 *                    > www.orxonox.net <
     4 *
     5 *
     6 *   License notice:
     7 *
     8 *   This program is free software; you can redistribute it and/or
     9 *   modify it under the terms of the GNU General Public License
     10 *   as published by the Free Software Foundation; either version 2
     11 *   of the License, or (at your option) any later version.
     12 *
     13 *   This program is distributed in the hope that it will be useful,
     14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
     15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16 *   GNU General Public License for more details.
     17 *
     18 *   You should have received a copy of the GNU General Public License
     19 *   along with this program; if not, write to the Free Software
     20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
     21 *
     22 *   Author:
     23 *      Oliver Scheuss, (C) 2008
     24 *   Co-authors:
     25 *      ...
     26 *
     27 */
     28
     29
     30
    131#include "ClassID.h"
    2 #include "Packet.h"
    332#include "core/CoreIncludes.h"
    433#include <string>
     
    1544 
    1645  ClassID::ClassID( unsigned int classID, std::string className )
    17  : PacketContent()
     46 : Packet()
    1847{
    1948  flags_ = flags_ | PACKET_FLAGS_CLASSID;
     
    2958
    3059ClassID::ClassID( unsigned char *data, int clientID )
    31   : PacketContent(data, clientID)
     60  : Packet(data, clientID)
    3261{
    3362  memcpy( (void *)&classNameLength_, &data[ _CLASSNAMELENGTH ], sizeof(classNameLength_) );
     
    3665ClassID::~ClassID()
    3766{
    38 }
    39 
    40 unsigned char *ClassID::getData(){
    41   return data_;
    4267}
    4368
     
    5176    return false;
    5277  id->setNetworkID( getClassID() );
     78  delete this;
    5379  return true;
    5480}
     
    5884}
    5985
    60 // unsigned int ClassID::getClassNameLength(){
    61 //   return *(unsigned int *)&data[ _CLASSNAMELENGTH ];
    62 // }
    63 
    6486} //namespace packet
    6587}//namespace network
Note: See TracChangeset for help on using the changeset viewer.