Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 10, 2006, 12:11:43 AM (18 years ago)
Author:
patrick
Message:

network: added some comments and found some small bugs

File:
1 edited

Legend:

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

    r7512 r7559  
    8989/**
    9090 * get the diff to last acked state of userId
     91 *
     92 * each synchrinizeable defines its own stack of states received and sent over the network. The stack contains
     93 * a per user entry for the last sent/received state This function returns a delta compressed state of the
     94 * synchronizeable. This state will be transmitted over the network to the other participants
     95 *
    9196 * @param userId user to create diff for
    9297 * @param data buffer to copy diff in
    9398 * @param maxLength max bytes to copy into data
    9499 * @param stateId id of current state
     100 * @param fromStateId the reference state for the delta state
    95101 * @param priorityTH tells getStateDiff to not send element with priority \< priorityTH
    96102 * @return n bytes copied into data
     
    115121  while ( it != sentStates[userId].end() && (*it)->stateId < fromStateId )
    116122    it++;
    117 
    118   if ( it != sentStates[userId].begin() )
     123  ///FIXED: altered begin() -> end()
     124  if ( it != sentStates[userId].end() )
    119125  {
    120126    for ( StateHistory::iterator it2 = sentStates[userId].begin(); it2 != it; it2++ )
     
    160166  int n;
    161167
     168  // now do the actual synchronization: kick all variables to write into a common buffer
    162169  for ( SyncVarList::iterator it = syncVarList.begin(); it != syncVarList.end(); it++ )
    163170  {
Note: See TracChangeset for help on using the changeset viewer.