When is UpdateScoring supposed to run?

Discussion in 'Plugins' started by Uff, Feb 2, 2016.

  1. Uff

    Uff Registered

    Joined:
    Oct 5, 2010
    Messages:
    278
    Likes Received:
    51
    I'm doing my first experiments with rF2 plugins: I managed to create a socket to send data via UDP to my server and, when I call sendto() from UpdateTelemetry, the sim constantly sends the data I want.

    When I put the sendto() inside of UpdateScoring, instead, the server socket always reach its timeout and never gets the package that I'm sending from rF2.
    Is there anything I'm missing? From what I read in the Example.cpp file, UpdateScoring now runs twice a second, while my timeout is set to trigger if the server does not receive anything for more than 3 seconds.
     
  2. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    7,379
    Likes Received:
    3,084
    UpdateScoring is called 5 times per second (in rF1 it was originally once, then twice, while in rF2 it's now 5 times - honestly not sure when that happened). I take it you're returning true from WantsScoringUpdates() ?
     
  3. Uff

    Uff Registered

    Joined:
    Oct 5, 2010
    Messages:
    278
    Likes Received:
    51
    I think that is the problem: I didn't check carefully enough Example.hpp, as such I thought every function in Example.cpp was running (except for the one returning false).
    I'll do some tests tomorrow, but I think you nailed it, thank you. :D
     
  4. mika09

    mika09 Registered

    Joined:
    Feb 22, 2016
    Messages:
    3
    Likes Received:
    1
    Do you know how I can improve this number for rf1 ? for example 5 or more time per second for rf1
     
  5. Uff

    Uff Registered

    Joined:
    Oct 5, 2010
    Messages:
    278
    Likes Received:
    51
    As far as I know this is not possible.
     

Share This Page