mtasa-blue icon indicating copy to clipboard operation
mtasa-blue copied to clipboard

engineRequestModel (vehicle) bugs

Open Xenius97 opened this issue 5 years ago • 12 comments

Describe the bug

  1. Can't enter passanger seats
  2. MTA can't get vehicle occupants (you get an error)
  3. Doors waving if someone enters into custom vehicle
  4. Can't get vehicle type (scripting can fix this)

To reproduce Spawn requested model and load mod

Expected behaviour Work as default vehicles without these issues

Version 1.5.8 -

Additional context https://i.imgur.com/yQG6NxQ.gif

Xenius97 avatar Jul 09 '21 19:07 Xenius97

Another bug that occurs is the tires appearing flattened

https://user-images.githubusercontent.com/39979049/126101791-722aa04a-ae41-40cc-ab05-d457a3957e71.mp4

jjustns avatar Jul 19 '21 04:07 jjustns

related to my other 2 issues : #2166 #2127

SDabdlmounaim96 avatar Jul 24 '21 16:07 SDabdlmounaim96

Bikes and boats are working. https://streamable.com/wj5sl3 https://streamable.com/i5r7sg

Planes are bugged too. https://streamable.com/w9175t https://streamable.com/l26qix

Heli: https://streamable.com/ihrqyh

Xenius97 avatar Aug 18 '21 16:08 Xenius97

Door waving and wheel states bug still exiting + random crashes

Version = 1.5.9-release-21019.0.000 Time = Tue Oct 19 11:02:50 2021 Module = C:\Games\MTA San Andreas\mta\game_sa.dll Code = 0xC0000005 Offset = 0x00043277

EAX=00000000 EBX=00000001 ECX=0000022F EDX=00000000 ESI=1DA7C4E8 EDI=18280481 EBP=0177FC24 ESP=0177FC18 EIP=5BDC3277 FLG=00010206 CS=0023 DS=002B SS=002B ES=002B FS=0053 GS=002B

https://streamable.com/2k3f95

Xenius97 avatar Oct 19 '21 09:10 Xenius97

@BCG2000 @Pirulax

Fernando-A-Rocha avatar Oct 19 '21 19:10 Fernando-A-Rocha

Well, these issues never happen while alone. I guess it is something to do with the packets since the server still thinks the custom model is the parent model the car was created as, so the tyres and doors come up as invalid in the client during sync (since the client model doesn't match the one on the server). I want to take a look at it when I can, or someone else will.

That being said, I don't think the crash has to do with my fix that was recently merged, just don't see why it would cause that.

BCG2000 avatar Oct 19 '21 20:10 BCG2000

I can confirm the issues don't happen alone. While driving a car with a requested model you experience no visual bugs.

However, another player will see the following:

  • Doors flickering opening/closing fast
  • Tires slashed
  • Windshield damaged...

Steps to reproduce:

  • Client & Server version r21019.
  • Use this script
  • Need 1 other player to witness you driving a car with engineRequestModel

Notes:

  • Can confirm Bikes and boats don't show any visual issues
  • Helis and Planes have visual bugs too
  • Repairing the vehicle won't resolve the problem

@BCG2000

I guess it is something to do with the packets since the server still thinks the custom model is the parent model the car was created as, so the tyres and doors come up as invalid in the client during sync (since the client model doesn't match the one on the server).

That's quite a specific guess so you might be right, thanks for investigating :heart:

Fernando-A-Rocha avatar Oct 20 '21 03:10 Fernando-A-Rocha

Things to add:

  • When you are inside the vehicle and someone tries to enter as passanger the door does the opening animation but he can't enter.
  • If you create a 4 door vehicle using server-side and enter as passanger and then setElementModel into a custom vehicle client-side, the game will freeze and you will get a Network Trouble issue, as the server thinks you are a passanger but you will see yourself outside the vehicle client side.
  • Tow-truck functions don't work with a engineRequestModel model

MrSol0 avatar Oct 21 '21 12:10 MrSol0

  1. Can't enter passanger seats
  2. MTA can't get vehicle occupants (you get an error)
  3. Can't get vehicle type (scripting can fix this)
  • When you are inside the vehicle and someone tries to enter as passanger the door does the opening animation but he can't enter.

These were fixed in nightly r21019.

BCG2000 avatar Oct 25 '21 19:10 BCG2000

  1. Doors waving if someone enters into custom vehicle

Another bug that occurs is the tires appearing flattened

Door waving and wheel states bug still exiting

Fixed in nightly r21022.

The rest of the issues exist mostly due to the hardcoding, like the Towtruck's hook. Another issue I found while testing is that custom trucks can't attach any trailer (also hardcoded), although custom trailers work just fine on vanilla trucks.

BCG2000 avatar Oct 29 '21 04:10 BCG2000

Towtruck hook not working Custom truck can't attach trailers

Yes, all those hardcoded problems are being discussed here #1861 👍

Fernando-A-Rocha avatar Oct 29 '21 05:10 Fernando-A-Rocha

Yes, all those hardcoded problems are being discussed here #1861 +1

Oh yea, then it is better to close this issue here since the relevant problems listed here are fixed now. We can take the rest of this discussion to #1861.

BCG2000 avatar Oct 29 '21 06:10 BCG2000