Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1007 for code


Ignore:
Timestamp:
Apr 10, 2008, 11:53:16 AM (17 years ago)
Author:
scheusso
Message:

forgot something

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

Legend:

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

    r1005 r1007  
    5959
    6060  void GameStateManager::update(){
     61    cleanup();
    6162    reference = getSnapshot(id);
    6263    gameStateMap.insert(std::pair<int, GameState*>(id, reference));
     
    8687        gameStateMap.erase((*it).first);
    8788        gameStateUsed.erase(it++);
    88       }else
    89         it++;
     89      }else  //as soon as we got a used gamestate break here because we could use newer gamestates in future
     90        break;
    9091    }
    9192  }
  • code/branches/network/src/network/GameStateManager.h

    r1005 r1007  
    4747    //#### END TESTING PURPOSE ####
    4848    void update();
    49     void cleanup(); // "garbage handler"
    5049    GameStateCompressed *popGameState(int clientID);
    5150    void ackGameState(int clientID, int gamestateID);
    5251    int id;
    5352  private:
     53    void cleanup(); // "garbage handler"
    5454    GameState *getSnapshot(int id);
    5555    GameStateCompressed *encode(GameState *a, GameState *b);
  • code/branches/network/src/network/Server.cc

    r918 r1007  
    114114    updateGamestate();
    115115
    116     sleep(1); // TODO remove
     116    //sleep(1); // TODO remove
    117117    return;
    118118  }
Note: See TracChangeset for help on using the changeset viewer.