Funbit / ets2-telemetry-server

ETS2/ATS Telemetry Web Server + Mobile Dashboard
GNU General Public License v3.0
623 stars 206 forks source link

loose job data when unhook trailer #86

Open dualznz opened 8 years ago

dualznz commented 8 years ago

there seems to be a issue when unhooking the trailer it cancels the information being displayed even though i still have the job.

this shouldn't clear until cancel job or complete job

Foshitz commented 8 years ago

I have also noticed this problem for a few days now and I have also noticed that the job info returns after restarting the game. I haven't tried just restarting the telemetry server though.

dualznz commented 8 years ago

yea i have, it didnt make a difference

Funbit commented 8 years ago

If you unhook the trailer within 0.5km of the destination point - the plugin cancels job information. Due to SDK restrictions this is the only way to achieve "job finished" event. If you are sure that you are pretty far from the destination when you unhook the trailer - it might be a bug. Please let me know.

Foshitz commented 8 years ago

Last time I had that issue was in Leipzig when trucking from Bremen to Linz.

dualznz commented 8 years ago

yes i can confirm its a bug i was 1200 km from destination and it cancelled it

Funbit commented 8 years ago

Unfortunately, this means that game reports that destination is either 0 or less than 500m (but it shouldn't). So if this is the case - it's more like an SDK problem, rather than the plugin... Can I ask a question, why do you unhook the trailer in the first place? Where do you place it? o_o

dualznz commented 8 years ago

i got stuck so i unhooked so i could move position and then it happend

Funbit commented 8 years ago

I see. Well, if you're using the latest version of the server (3.2.5), then we should ask SDK developers, why distance changes along the way to [0, 500m]..

dualznz commented 8 years ago

yea not sure, but ok so good old scs bug

dualznz commented 8 years ago

maybe if we can store the trailer info, and if it detects it being unhooked it holds the information for a min or 2 then kills it if it hasnt been rehooked

Foshitz commented 8 years ago

I'm unhooking the trailer in the intersection outside the garage on my hunt for the Property Magnate achievement, so I don't have to drive in and then back up with the trailer to be able to continue my journey

dualznz commented 8 years ago

mmmm, i tried 4 jobs so far in both games and they do the same thing, im running the latest

Funbit commented 8 years ago

@dualznz Actually, you proposed a very good idea regarding job info buffer. Probably I will implement it. So whenever you unhook your trailer the plugin will clear the job but remember it in some buffer. If trailer is hooked again - restore from the buffer. It should solve the issue.

dualznz commented 8 years ago

yea, that would work great indeed

dualznz commented 8 years ago

maybe you could add the buffer to the json output showing thats its stored in the buffer with a activation by a boolean True / False, then adding the trailer id and so forth to that container.

this will allow it to still be shown on the API

jammerxd commented 8 years ago

I also can confirm this bug.