CDboVirtualServer::Update QUESTION

Results 1 to 10 of 10
  1. #1
    Dbo Dev Daneos is offline
    MemberRank
    Sep 2009 Join Date
    GermanyLocation
    933Posts

    CDboVirtualServer::Update QUESTION

    Anyone have an idea WHEN the
    CDboVirtualServer::Update
    function is called?
    Every second? Or when??


  2. #2
    Apprentice ZaNa is offline
    MemberRank
    Feb 2014 Join Date
    12Posts

    Re: CDboVirtualServer::Update QUESTION

    Update mean , it is called Every frame

  3. #3
    Dbo Dev Daneos is offline
    MemberRank
    Sep 2009 Join Date
    GermanyLocation
    933Posts

    Re: CDboVirtualServer::Update QUESTION

    every frame = ? I dont understand

    so If I create now void CClientSession::Update()

    then it will be auto. called every "frame"?

  4. #4
    Apprentice ZaNa is offline
    MemberRank
    Feb 2014 Join Date
    12Posts

    Re: CDboVirtualServer::Update QUESTION

    in game contents this is common used , need check Every frame , while u playin , and since its a reference here , check what update mean in ur code

  5. #5
    Dbo Dev Daneos is offline
    MemberRank
    Sep 2009 Join Date
    GermanyLocation
    933Posts

    Re: CDboVirtualServer::Update QUESTION

    thanks thanks.

    ok I understand now a little more about the update/frame etc..

    Anyone an idea how to create a loop for the game which will run the Update function?

  6. #6
    Connoisseur of Fine Code SanGawku is offline
    ModeratorRank
    Oct 2006 Join Date
    CyberSpanksLocation
    643Posts

    Re: CDboVirtualServer::Update QUESTION

    a lot of servers/emulators use while true in the main function, but most of the functionality is in the main function as well.

  7. #7
    Dbo Dev Daneos is offline
    MemberRank
    Sep 2009 Join Date
    GermanyLocation
    933Posts

    Re: CDboVirtualServer::Update QUESTION

    Yea but
    while ( what ) ?

    I dont know how to do the while etc..

  8. #8
    Connoisseur of Fine Code SanGawku is offline
    ModeratorRank
    Oct 2006 Join Date
    CyberSpanksLocation
    643Posts

    Re: CDboVirtualServer::Update QUESTION

    No use while(true) as in an infinite loop, but most of the logic is called every iteration in the update frame.

  9. #9
    Dbo Dev Daneos is offline
    MemberRank
    Sep 2009 Join Date
    GermanyLocation
    933Posts

    Re: CDboVirtualServer::Update QUESTION

    And the loop runs every second?

    - - - Updated - - -

    I dont get this... If I run loop on the client session then I cant log in anymore after relog or with other account.

    And run loop on the main game doesnt work somehow because I need the client session..

  10. #10
    Connoisseur of Fine Code SanGawku is offline
    ModeratorRank
    Oct 2006 Join Date
    CyberSpanksLocation
    643Posts

    Re: CDboVirtualServer::Update QUESTION

    From a programming standpoint this is where threads would come into play. If you were to thread your While(true) loop all the other things would continue, but then you would have to make thread pointers i believe to access anything in those other threads. While useful and more optimized it would take a while to do this.

    You could just set a bool someplace in a function that runs every second or every frame to call update.
    Make it go through your list of functions you want to call and then break out of the loop once it reaches the end of your function calls,



Advertisement