Jump to content

Time between vehicle/player sync


Bonsai

Recommended Posts

Hey,

I need to get the positions of vehicles that are occupied by players clientside.

But as soon as they are far away, those positions are not accurate anymore.

Actually, they just don't change for about 1500 ms before they are updated again.

I changed the "lightweight_sync_interval" in the server config file to 200 ms, but that didn't help.

So, is there a solution to get the actual values, or does only the server have them at any time?

 

Bonsai

Link to comment

I'm assuming MTA uses prediction and/or interpolation for vehicles to minimize network load, probably in co-junction with whether they're streamed in or not.

Tried getting the position via the server(the server should know where they are at any given time) and then passing it on to clients, alternatively maybe using element data? Not the most efficient way of doing things, but works for testing purposes.

Is this something you need to do every frame?

Edited by Dealman
  • Like 1
Link to comment

On radars, at least custom ones, not sure about the default one, you can see how the blips stop moving smooth when players have a certain distance.

I tried getting positions serverside just for testing, which is completely impossible due to timers being way off. I was using 50ms but it took usually around 80ms for a function to be executed. Not sure if thats normal, the server was pretty idle, so I guess it is normal. But I was only doing that to check the positions anyway.

It seems to be impossible to get accurate positions of non streamed in vehicles.

It might somehow work for vehicles in SA, but on maps the positions probably cant be right, since the objects are streamed out aswell, so the vehicles dont actually move on them, but fly around.

Link to comment

Then I'm not quite sure, I don't really have the ability to reliably test this on my end at the moment. Best bet is if one of the higher-ups shed some light on this subject, such as @ccw. :)

What exactly is it you need this for? Might help to come up with a solution/workaround. One thing is always predicting where they're going using the position, velocity and rotation I suppose - but prediction is a pain to try and get half-decent.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...