Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 19, 2007, 12:04:49 AM (17 years ago)
Author:
scheusso
Message:

made Model and WorldEntity synchronisable

Location:
code/branches/FICN/src/network
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/network/GameStateManager.cc

    r624 r630  
    114114    // allocate additional space
    115115    if(totalsize+tempsize>memsize){
    116       retval->data = (unsigned char *)realloc((void *)retval->data, totalsize+1000);
    117       memsize+=1000;
     116      if(tempsize<1000){
     117        retval->data = (unsigned char *)realloc((void *)retval->data, totalsize+1000);
     118        memsize+=1000;
     119      } else {
     120        retval->data = (unsigned char *)realloc((void *)retval->data, totalsize+1000);
     121        memsize+=tempsize+1000;
     122      }
    118123    }
    119124
  • code/branches/FICN/src/network/Synchronisable.cc

    r599 r630  
    2626  datasize=0;
    2727  objectID=idCounter++;
    28 //   registerAllVariables();
     28  //registerAllVariables();
    2929}
    3030
  • code/branches/FICN/src/network/Synchronisable.h

    r571 r630  
    5858  int getSize();
    5959  bool updateData(syncData vars);
    60   virtual void registerAllVariables()=0;
    61   virtual bool create(){return true;}
     60  void registerAllVariables();
     61  virtual bool create()=0;
    6262protected:
    6363  Synchronisable();
Note: See TracChangeset for help on using the changeset viewer.