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

Door & panel states (damage) not syncing for vehicles with custom model IDs

Open Fernando-A-Rocha opened this issue 3 years ago • 4 comments

engineRequestModel("vehicle") gives you a new vehicle model ID. Logically this ID needs to be applied to an element using setElementModel. You may also want to use engineFreeModel when the element streams out to save memory at some point.

I've noticed an issue while testing my newmodels resource related to visible damage on the vehicle not staying.

Door & panel damage that you can obtain on a vehicle by damaging it yourself or using setVehicleDoorState & setVehiclePanelState resets after the vehicle's model is changed.

This is problematic and can strongly be considered a bug as it's some unintended behavior.

Serverside sync should fix this issue.

Version r21135

Fernando-A-Rocha avatar Mar 12 '22 15:03 Fernando-A-Rocha

See how to reproduce: https://github.com/Fernando-A-Rocha/mta-add-models/commit/679fcc74932dc0d0ef53be2ed837d6c419801886#diff-42765a3fba5de103617ea4bbc5cf9c08274deed18913ce00514f6678cfdbded8R237

Fernando-A-Rocha avatar Mar 12 '22 15:03 Fernando-A-Rocha

Other important related issue: #1861

Fernando-A-Rocha avatar Mar 12 '22 15:03 Fernando-A-Rocha

@TheNormalnij Possible to fix this? Sorry for ping but this was created in march 2022 and more bugs related to allocated model IDs have been fixed recently, so this could be too?

Fernando-A-Rocha avatar Oct 01 '23 15:10 Fernando-A-Rocha

This should be fixed in #2533

TheNormalnij avatar Oct 01 '23 15:10 TheNormalnij