Fix Forklift forks not working on custom vehicle models - #5197
Open
TheCrazy17 wants to merge 1 commit into
Open
Conversation
The forks never move, apply force or draw raised on a clone, since ProcessControl, UpdateMovingCollision and PreRender all gate on the raw model index. A picked up object is also affected in several places: it doesn't ride the misc_a dummy, isn't exempt from the steep angle auto detach, doesn't let go on its own, gets damaged instead of carried, and the forks don't drop their own collision point once level. Every hook redirects through the clone's parent, verified against the retail disassembly with only the registers each fallthrough actually needs. Picking a ped or object up in the first place is a separate mechanic and stays out of scope.
Contributor
|
Awesome! Are the picked objects synced with other players ? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends
engineRequestModelcustom vehicle model support to the Forklift: the forks move, apply force and draw raised on a clone the same way they do on the stock model, and a picked up object rides them, gets the right detach behaviour, and doesn't get crushed instead of carried.Motivation
Continues the ongoing series of fixes for vehicles with hardcoded native behaviour that
engineRequestModelclones don't inherit (#5161, #5162, #5165, #5166, #5171, #5181, #5195).Part of #1861.
Test plan
Spawned a Forklift clone via
engineRequestModeland confirmed in game: the forks raise and lower, push what's in front of them, and pick up loose objects (garbage bags) instead of breaking them; a picked up object rides the forks, stays attached through steep angles, and lets go on its own once lowered. Confirmed the stock Forklift behaves exactly as before.forklift.zip
Checklist