altmp / altv-issues

Issues and roadmap for alt:V project
93 stars 17 forks source link

Vehicles can't be driven (some vehicles start, others dont) #963

Closed TheDutchDev closed 3 years ago

TheDutchDev commented 3 years ago

Client/server version

Build 4.0-dev12 (dev)

Current behavior

When entering a car it won't start at all. When entering planes it sometimes works, sometimes doesn't work. When enter a motorbike it instantly starts. I make no distinction between the different vehicle types, and they should start at all times. Yet this seems to have broken in the last update. I upgraded from dev9 to dev12 and it was still working fine in dev9.

Expected behavior

The vehicles(engine) should start so the vehicle can be driven.

Steps to reproduce

Spawn a vehicle and try to drive it. As described above: cars don't work, airplanes seem to work sometimes and motorbikes seem to work all the time.

Context (environment)

Can't drive most vehicles anymore.

Possible solution

C0kkie commented 3 years ago

Be sure your server is on the newest version

FabianTerhorst commented 3 years ago

Show full server log.

TheDutchDev commented 3 years ago

Be sure your server is on the newest version

It is, I downloaded the latest version from the downloads page like 20 minutes ago.

Show full server log.

[20:41:12] alt:V Server 4.0-dev12 (dev)
[20:41:12] Starting [EN/EU] Los Angeles Cops & Robbers on 0.0.0.0:7788
[20:41:12] C:\Program Files\dotnet\host\fxr\5.0.6\hostfxr.dll
[20:41:12] coreclr-module: version found: 5.0.3
[20:41:12] coreclr-module: version found: 5.0.6
[20:41:12] coreclr-module: greatest version: 5.0.6
[20:41:12] Loading resource 69charger
[20:41:12] Loaded resource 69charger
[20:41:12] Loading resource mustangbkit
[20:41:13] Loaded resource mustangbkit
[20:41:13] Loading resource p2
[20:41:13] Loaded resource p2
[20:41:13] Loading resource polamggtr
[20:41:13] Loaded resource polamggtr
[20:41:13] Loading resource polgt17
[20:41:13] Loaded resource polgt17
[20:41:13] Loading resource ss16
[20:41:13] Loaded resource ss16
[20:41:13] Loading resource 2015polstang
[20:41:13] Loaded resource 2015polstang
[20:41:13] Loading resource lp770cop
[20:41:13] Loaded resource lp770cop
[20:41:13] Loading resource rmodveneno
[20:41:13] Loaded resource rmodveneno
[20:41:13] Loading resource xnsgt
[20:41:13] Loaded resource xnsgt
[20:41:13] Loading resource shelbygt500w
[20:41:13] Loaded resource shelbygt500w
[20:41:13] Loading resource v_68_backrmstuff2
[20:41:13] Loaded resource v_68_backrmstuff2
[20:41:13] Loading resource v_66_backrmstuff2
[20:41:13] Loaded resource v_66_backrmstuff2
[20:41:13] Loading resource jtower
[20:41:13] Loaded resource jtower
[20:41:13] Loading resource vremastered
[20:41:13] Loaded resource vremastered
[20:41:13] Loading resource trumpstatue
[20:41:13] Loaded resource trumpstatue
[20:41:13] Loading resource allpoliceopen
[20:41:13] Loaded resource allpoliceopen
[20:41:13] Loading resource object-streamer
[20:41:13] Loaded resource object-streamer
[20:41:13] Loading resource marker-streamer
[20:41:13] Loaded resource marker-streamer
[20:41:13] Loading resource textlabel-streamer
[20:41:13] Loaded resource textlabel-streamer
[20:41:13] Loading resource interaction-streamer
[20:41:14] Loaded resource interaction-streamer
[20:41:14] Loading resource blip-streamer
[20:41:14] Loaded resource blip-streamer
[20:41:14] Loading resource la-cnr
[20:41:15] Loaded resource la-cnr
[20:41:15] Loading resource cnr-client
[20:41:15] Loaded resource cnr-client
[20:41:15] Loading resource altv-speedo
[20:41:15] Loaded resource altv-speedo
[20:41:15] Required server permissions:
[20:41:15] Optional server permissions:
[20:41:15] Starting HTTP server on 0.0.0.0:7788
[20:41:15] Main thread started (ThreadId: 14344)
[20:41:15] Colshape thread started (ThreadId: 17044)
[20:41:15] VoiceStreamer thread started (ThreadId: 13944)
[20:41:15] VoicePacketProcess thread started (ThreadId: 14264)
[20:41:15] EntityStreamer thread started (ThreadId: 18564)
[20:41:15] Network thread started (ThreadId: 16684)
[20:41:15] Console thread started (ThreadId: 18008)
[20:41:15] Server started
[20:41:20][Warning] resourceManager.Update() took: 219 ms
[20:41:20][Warning] resourceManager.Update() took: 364 ms
[20:41:20][Warning] resourceManager.Update() took: 56 ms
[20:44:04][Warning] resourceManager.Update() took: 128 ms
[20:46:24][Warning] resourceManager.Update() took: 140 ms
[20:54:03][Warning] resourceManager.Update() took: 65 ms
[20:58:19][Warning] resourceManager.Update() took: 93 ms
[21:02:13][Warning] resourceManager.Update() took: 72 ms
[21:10:18][Warning] resourceManager.Update() took: 78 ms
[21:20:01][Warning] resourceManager.Update() took: 186 ms
C0kkie commented 3 years ago

Can you try dev 13? Cuz we cant reproduce it atm and no body else reported a issue like this

TheDutchDev commented 3 years ago

Just tested it. Downloaded the latest RC branch & client and the latest RC nuget packages: Server: 4.0-rc1 (rc) Client: RC branch, I'm assuming it downloads the latest version Nuget:

The bug is still happening though. I'm kinda confused why I'm the only one having this issue...

Some more info from my gamemode: I'm using manual engine control server-side (vehicle.SetManualEngineControlAsync( true ) ). On client-side I run the PedConfigFlag.DisableStartingVehEngine in an on-tick. It's true/false depending on a streamsyncedmeta value from the vehicle the player is currently in/entering. This config flag is almost always false unless the vehicle is temporarily disabled(for 30 seconds) via a game feature.

I also use SetEngineOnAsync on a few occassions, but these don't seem to work very well without the client-side implementation described above.

Neither of these seem to be the cause in my opinion since motorbikes work perfectly fine, but cars don't. Unless I'm missing something...

EDIT: Manually doing SetEngineOnAsync( true ) on server-side when entering a vehicle seems to make it work fine again. Did anything change with manual engine control/setengineon internally? I remember adding the manual engine control cause I wanted more control over the engine stuff, but it didn't work out too well so I switched to the client-side implementation.

On a sidenote: I've always had to call "SetEngineOnAsync( true )" after repairing the vehicle with Repair(). Not sure if this is still an issue on the latest RC branch as I've simply added an extra method that calls both of those whenever I want to repair a vehicle. But may be something worth looking into nonetheless.

FabianTerhorst commented 3 years ago

Can you try again with latest nuget and csharp module

C0kkie commented 3 years ago

I think its fixed cuz you didnt response again, if you still have this issue (what i dont think, cuz nobody else reported it) you can reopen it