Skip to content

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

Open
@ArranTuna

Description

@ArranTuna

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsync

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions