Fix tow truck and tractor hooks on custom vehicle models - #5195
Open
TheCrazy17 wants to merge 1 commit into
Open
Fix tow truck and tractor hooks on custom vehicle models#5195TheCrazy17 wants to merge 1 commit into
TheCrazy17 wants to merge 1 commit into
Conversation
Tow truck and tractor clones now swing their hook, dispatch to TowTruckControl and bounce their misc_b or boot panel like the stock models do; the tug's tow bar now falls back to its misc_b dummy and can hook onto the utility trailer as well as the two baggage boxes and the stairs; the artict3 can tow a second trailer off its own misc_b dummy, which the game never read before.
Contributor
Author
2 tasks
Contributor
|
Christmas came early 🤩🤩🤩 |
Contributor
|
We need to do multiplayer (2+) sync tests of vehicle towing |
Contributor
Author
The synchronization hasn’t been touched for now. Maybe I or someone else can improve it later, but for now it remains unchanged |
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 tow truck and tractor, so a cloned one behaves exactly like the stock model: the hook swings, it attaches to a trailer, and it bounces with movement instead of sitting rigid.As an extra, based on a fix from SilentPatch, the tug can now hook up to trailers it couldn't before (including the utility trailer) and the artict3 can now tow a second trailer behind it, both on the stock models and on their clones.
So now, you can have B-Trains:

Motivation
Continues the ongoing series of fixes for vehicles with hardcoded native behaviour that
engineRequestModelclones don't inherit (#5161, #5162, #5165, #5166, #5171, #5181). The tractor is included here since it shares the same code as the tow truck; the tug and artict3 fixes came up while working through that same area.Part of #1861.
Test plan
Tested in game with clones of the tow truck, tractor and tug, and with both the stock and cloned artict3. Stock vehicles behave exactly as before, since the tow truck/tractor hooks are gated on the same model checks the game already used, and the tug/artict3 fixes only touch behaviour that was already broken without any custom models involved.
towtruck.zip
Checklist