getting disconnected is extremely easy though
so even if LFS detects it ..u will still have idiots pulling the plug and rejoining after 10seconds ,just to get their car repaired,tire fixed or to get out of a graveltrap.
It doesnt matter for leagues as they will DQ such drivers anyway ,but it might pose a problem on publics.
Plus that its more attractive to start at a runoff-zone close to where u lost connection ,compared to starting in the pits and losing almost a whole lap
It can't actually. It can assume, but not know.
You can assume that the client crashed unexpectedly if the connection wasn't reset/closed properly, but you can make LFS crash that way deliberately.
My system rules:
If server option is enabled:
Save finished laps and car state (tyre wear, suspension damage, fuel) upon disconnect.
Load car state and finished laps upon reconnect.
Restart from pits.
Advantages:
- One rule that always applies if the server option is set. It doesn't get more simple.
- Started (but not yet finished) laps always void. Can't be exploited thus.
- Damage is saved and preserved for special league use. (Like restricted tyres rules.)
- No cars suddenly appear in the middle of the track. (LFS can't properly find a "safe" spot to place the car. You can often see this when resetting a car in LFS. It sometimes places the car in a bloody dangerous spot.)
LFS shouldnt have to find those safe spots..they should be hardcoded, and every reset or reconnect would automatically be placed at the closest pre-coded safe spot, thus also eliminating those silly resets (just about every track has intersections or runoff areas where no car ever comes and where it would be safe to reset to.)
Starting in the pits with a new car could be used as a temporary bandaid solution as coding this will probably take quite some time..but starting near to where u lost connection with your previous fuel,tires and damage can't be a bad thing.
edit : instead of coding resetspots..just marking where a car can NOT be reset (basically the track itself) would probably be easier and quicker
Actually it works this way in LFS. And it's, frankly speaking, crap.
There are some zones where LFS will reset the car into a sand-trap where no car can escape from, ending your race immediately.
There are some zones where LFS will reset the car directly unto the ideal line.
There are some zones where LFS will reset the car to the spot where you pressed space, just with the wheels pointing downwards.
Using LFS's resetting-feature for the rejoining after disconnect would be very dangerous to all drivers. I would not join such a league.
By the way, in real endurance racing you may rejoin the race from the pits after a technical problem. You may not join from the place where you solved the problem, you have to go back to the pits and start from there. It'd be good to have a similar system in LFS.
No problem, if the reset code can't be drastically improved ,starting from the pits is the next best thing. (at the expense of leaving the dangerous resets untouched)
And as u say it might be more realistic. Since we can pretend a DC is similar to a technical problem.
At least we agree fuel ,tires and damage would need to be saved serverside (which will still require more coding from Scawen)
Ah yes - but after more than a year of continuous, non-stop consideration, and much fruitful inter-mind debate we think the resumption shouldn't be from the pits, we are unanimous on that.
Already some tracks have specific "respawn" areas that are used when you reset the car - mark some of them in run-off areas as "resume friendly" and have the player rejoin from the nearest one to where he was prior to disconnection.