Immersive Vehicles (Formerly Transport Simulator)

Immersive Vehicles (Formerly Transport Simulator)

4M Downloads

[BUG?] Throttle/horn/brakes remain pressed when player pushes either, and exits seat

boot2big opened this issue ยท 5 comments

commented

Basically, if you hold W, S or C and press shift while holding any one of these, the signal still remains and the car still puts gas into the engine, or pumps the brakes.

It's funny if you imagine Steve putting a brick on the gas pedal while he goes into another seat to change armor, Mr. Bean style, except it might be intended.
(Not to mention it isn't very funny if your car goes flying into a tree because you mistakenly pressed LShift while accelerating)

commented

The problem with the ControlSystem is that it only gets called and checked if a player is in a vehicle's controlling seat. This is good, as it allows me to only do control checks when I know a player is seated in something, and it keeps random errors at bay. One of the drawbacks is what you just said: controls don't update when you leave the seat. Still, I should be able to find a way to combat this. Especially since I've already done it for guns.

commented

It is not a bug, it's a feature! This feature is very cool for charging aircraft' engines at the airports, when a car is being sth like an EMPU! If this will be removed, charging aircraft' batteries will be much more difficult and also this process will require an additional person seating in the car to make the gas pedal remain active.

commented

Perhaps it could be left as a comical feature, where if you click the car with a brick it keeps the throttle pushed at 100% until a player sits in the seat, although that sounds more complicated than just not fixing this.

commented

I personally like this feature for multiple reasons, and I'm pretty sure it's not specific to Minecraft. BeamNG.drive does the same thing, at least for the throttle.

commented

So I've decided against this, for the simple reason it's really hard to handle idle states of vehicles and will require quite a bit more extra code to handle. May consider it in the future, but for now you'll just have to remember to not bail out of your vehicle and "accidentally" leave it floored while it runs into your friend's house.