Skip to content

Fix tow truck and tractor hooks on custom vehicle models - #5195

Open
TheCrazy17 wants to merge 1 commit into
multitheftauto:masterfrom
TheCrazy17:tow-custom-models
Open

Fix tow truck and tractor hooks on custom vehicle models#5195
TheCrazy17 wants to merge 1 commit into
multitheftauto:masterfrom
TheCrazy17:tow-custom-models

Conversation

@TheCrazy17

@TheCrazy17 TheCrazy17 commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Extends engineRequestModel custom 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:
mta-screen_2026-08-16_23-23-56

Motivation

Continues the ongoing series of fixes for vehicles with hardcoded native behaviour that engineRequestModel clones 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

  • Your code should follow the coding guidelines.
  • Smaller pull requests are easier to review. If your pull request is beefy, your pull request should be reviewable commit-by-commit.

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.
@TheCrazy17

Copy link
Copy Markdown
Contributor Author

@Fernando-A-Rocha 🌚

@Fernando-A-Rocha

Copy link
Copy Markdown
Contributor

Christmas came early 🤩🤩🤩

@Fernando-A-Rocha

Copy link
Copy Markdown
Contributor

We need to do multiplayer (2+) sync tests of vehicle towing

@TheCrazy17

Copy link
Copy Markdown
Contributor Author

We need to do multiplayer (2+) sync tests of vehicle towing

The synchronization hasn’t been touched for now. Maybe I or someone else can improve it later, but for now it remains unchanged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants