Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vehicle.trainPosition is only synced when it has an occupant #396

Open
ArranTuna opened this issue Sep 4, 2018 · 2 comments
Open

vehicle.trainPosition is only synced when it has an occupant #396

ArranTuna opened this issue Sep 4, 2018 · 2 comments
Labels
bug Something isn't working sync
Milestone

Comments

@ArranTuna
Copy link
Collaborator

ArranTuna commented Sep 4, 2018

Describe the bug

@qaisjp said:

This only affects the server.

There isn't any desync with the actual vehicle.position. This also has the added affect of the trainPosition being 0 (default position) until it has been entered.

Entering the train will update the train position server side. If you leave the vehicle the trainPosition will no longer be updated

To reproduce

run v = Vehicle(449, getRandomPlayer().position)
run v.id = "test"
run v.trainPosition -- will return 0
crun Element.getByID("test").trainPosition -- will return non-zero value

Additional context
From https://bugs.mtasa.com/view.php?id=9305

@ArranTuna ArranTuna added the bug Something isn't working label Sep 4, 2018
@qaisjp qaisjp added this to the Backlog milestone Sep 6, 2018
@qaisjp qaisjp added this to Backlog in Custom train tracks via automation Sep 6, 2018
@Cazomino05
Copy link
Contributor

most likely just some missing sync for trainPosition. I can't imagine this is difficult to fix if the vehicle is in range of someone to sync it, when I left off train sync I did consider that this is VERY easily calculated since it's just time/distance calculations and there is really no reason why a very simple "emulator" couldn't be implemented here in the server.

@ModafinilCPP
Copy link

any solution for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sync
Projects
Development

No branches or pull requests

5 participants