I’m currently working on seeing where the problem is, it LOOKS LIKE IT, that we don’t have issues when we test it locally (on a LAN hosted server), not even with multiple people.
BUT now we have tested it with a 100% remote hosted server (one at my company) and we all played while remotely connected to that server, and then it WILL de-sync and even ‘de-spawn’? the trains.
The drivers however WILL remain, they will be ‘left in the open’ ON the track (I assume at the position where their train previously was).
I guess it has something to do with the game handling the trains and NOT fully
recognizing them as mission objects/entity’s.
I will try as soon as possible if it’s in some way possible to ‘remove them from the
respawn buffer/list’ (or however GTA V Rage handles it) or if there is a way how I
can mark them as a ‘crucial item’ for the game. (which should do the same).
Alternatively I can try to look for alternatives to ‘alternate’ between ‘hosts’ for the
train (since AI and such is ‘hosted’ by the clients nearby). But all these will be
quite difficult to keep managed since all of these options would have to be with
Natives I assume.
Will see if i can find anyway to solve it.
For now people CAN test the trains by using /XNLforcetrains command.
BEWARE THOUGH!: That command is NOT limited to admins or so!
I have updated the repositroy (on my github) with a new(er) client.lua which
decreased the risk of the train (freight) being on the wrong track.
However i will look into the other problem asap.
WARNING: When using the XNLforcetrains command, it will NOT cleanup the
previous trains, even though I call DeleteAllTrains, i suspect this is since they are
mission trains. The other ‘downside’ to this is that if i would ‘start hosting them’,
and create the trains for the session, and i would then leave… then my buddy whom
would still be in the server CAN NOT delete the mission trains since I’m the one
whom created them with the refrence. So he has no pointer at all to delete them.
And as far as i know: We can’t stream vehicles via the server (yet) like we could
do in SA-MP for example.