Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 7, 2008, 10:57:09 PM (15 years ago)
Author:
scheusso
Message:

some changes. still not working yet, but will correct theese problems after merge with network64

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/network/TrafficControl.h

    r2348 r2351  
    3737#include "NetworkPrereqs.h"
    3838#include "Synchronisable.h"
     39#include "ClientInformation.h"
    3940#include "util/Integers.h"
    4041
     
    4849  uint32_t objID;
    4950  uint32_t objCreatorID;
    50   int32_t objCurGS;//current GameState ID
    51   int32_t objDiffGS;//difference between current and latest GameState
     51  uint32_t objCurGS;//current GameState ID
     52  uint32_t objDiffGS;//difference between current and latest GameState
    5253  uint32_t objSize;
    5354  unsigned int objValuePerm;
     
    5556  objInfo(uint32_t ID, uint32_t creatorID, int32_t curGsID, int32_t diffGsID, uint32_t size, unsigned int prioperm, unsigned int priosched)
    5657    { objID = ID; objCreatorID = creatorID; objCurGS = curGsID; objDiffGS = diffGsID; objSize = size; objValuePerm = prioperm; objValueSched = priosched; }
     58  objInfo()
     59    { objID = OBJECTID_UNKNOWN; objCreatorID = OBJECTID_UNKNOWN; objCurGS = GAMESTATEID_INITIAL; objDiffGS = objCurGS; objSize = 0; objValuePerm = 0; objValueSched = 0; }
    5760};
    5861
     
    6265struct obj
    6366{
    64   unsigned int objID;
    65   unsigned int objCreatorID;
    66   unsigned int objSize;
     67  uint32_t objID;
     68  uint32_t objCreatorID;
     69  uint32_t objSize;
     70  uint32_t objDataOffset;
     71  obj()
     72    { objID = OBJECTID_UNKNOWN; objCreatorID = OBJECTID_UNKNOWN; objSize = 0; objDataOffset = 0; }
     73  obj( uint32_t ID, uint32_t creatorID, uint32_t size, uint32_t offset )
     74  { objID = ID; objCreatorID = creatorID; objSize = size; objDataOffset = offset; }
    6775};
    6876
     77
     78const unsigned int SCHED_PRIORITY_OFFSET = -5;
    6979
    7080
     
    8898    *creates list (typ map) that contains objids, struct with info concerning object(objid)
    8999    */
    90     std::map<unsigned int, objInfo> listToProcess_;//copy of argument, when traffic control tool is being called, the original of this must be returned later on, eg the vector given by GS
     100//     std::map<unsigned int, objInfo> listToProcess_;//copy of argument, when traffic control tool is being called, the original of this must be returned later on, eg the vector given by GS
    91101    /**
    92102    *permanent client list: contains client ids, object ids and objectInfos (in this order)
     
    118128    *copiedVector is a copy of the given Vector by the GSmanager, on this vector all manipulations are performed
    119129    */
    120     std::vector<obj> copiedVector;
     130//     std::vector<obj> copiedVector;
    121131
    122132//     void updateReferenceList(std::map<unsigned int, objInfo> *list);//done
     
    132142    *evaluates Data given (vector) and produces result(->Data to be updated)
    133143    */
    134     void evaluateList(unsigned int clientID, std::vector<obj> *list);//done
     144    void evaluateList(unsigned int clientID, std::vector<obj> *list);//done   
    135145
    136146  protected:
     
    146156    *Elements of struct i are therefore: *list[i].objID
    147157    */
    148     std::vector<obj>* processObjectList(unsigned int clientID, unsigned int gamestateID, std::vector<obj>* list); //gets a pointer to the vector (containing objectIDs) and sorts it
     158    void processObjectList(unsigned int clientID, unsigned int gamestateID, std::vector<obj>* list); //gets a pointer to the vector (containing objectIDs) and sorts it
    149159    //done
    150160    void processAck(unsigned int clientID, unsigned int gamestateID);   // this function gets called when the server receives an ack from the client
Note: See TracChangeset for help on using the changeset viewer.