Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8244 in orxonox.OLD


Ignore:
Timestamp:
Jun 8, 2006, 2:18:54 PM (18 years ago)
Author:
rennerc
Message:

fixed bug with synchronizeable vars after vars with non const length

Location:
branches/network/src/lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/network/network_stream.cc

    r8228 r8244  
    538538      //PRINTF(0)("GGGGGOOOOOOOOOOTTTTTTTT: %d\n", compLength);
    539539      packetLength = Zip::getInstance()->unZip( compBuf, compLength, buf, UDP_PACKET_SIZE );
    540      
     540
    541541      if ( packetLength < 4*INTSIZE )
    542542      {
  • branches/network/src/lib/network/player_stats.cc

    r8238 r8244  
    2727
    2828CREATE_FACTORY(PlayerStats, CL_PLAYER_STATS);
    29 SHELL_COMMAND(nick, PlayerStats, shellNick);
     29
    3030
    3131/**
     
    219219void PlayerStats::shellNick( const std::string& newNick )
    220220{
    221   //if ( getStats( SharedNetworkData::getInstance()->getHostID() ) )
    222   //  getStats( SharedNetworkData::getInstance()->getHostID() )->setNickName( newNick );
    223 }
    224 
    225 
     221  if ( getStats( SharedNetworkData::getInstance()->getHostID() ) )
     222    getStats( SharedNetworkData::getInstance()->getHostID() )->setNickName( newNick );
     223}
     224
     225
  • branches/network/src/lib/network/synchronizeable.cc

    r8228 r8244  
    175175 
    176176  bool hasPermission;
     177  bool sizeChanged = false;
    177178
    178179  // now do the actual synchronization: kick all variables to write into a common buffer
     
    185186            (*it)->checkPermission( PERMISSION_ALL )
    186187                    );
    187    
    188     if ( ( sizeIter != stateFrom->sizeList.end() && *sizeIter != (*it)->getSize() ) || ( hasPermission && (*it)->getPriority() >= priorityTH ) || sizeIter == stateFrom->sizeList.end() )
     188    if ( sizeIter != stateFrom->sizeList.end() || *sizeIter != (*it)->getSize() )
     189      sizeChanged = true;
     190   
     191    if ( ( hasPermission && (*it)->getPriority() >= priorityTH ) || sizeChanged )
    189192    {
    190193      n = (*it)->writeToBuf( stateTo->data+i, stateTo->dataLength - i );
  • branches/network/src/lib/shell/some_shell_commands.cc

    r7725 r8244  
    2828using namespace OrxShell;
    2929
    30 
     30#include "player_stats.h"
     31  SHELL_COMMAND(nick, PlayerStats, shellNick)->setAlias("nick");
    3132
    3233#include "class_list.h"
Note: See TracChangeset for help on using the changeset viewer.