Unlock sirens for all vehicle types, including custom models - #4959
Open
TheCrazy17 wants to merge 7 commits into
Open
Unlock sirens for all vehicle types, including custom models#4959TheCrazy17 wants to merge 7 commits into
TheCrazy17 wants to merge 7 commits into
Conversation
addVehicleSirens now renders on custom (engineRequestModel) vehicles and every vehicle class (bikes, BMX, boats, planes, helis, trains), with siren sound on boat/aircraft/train audio types. Closes multitheftauto#4090.
Contributor
|
This is awesome, thank you 🤩 we're on the right path |
FileEX
requested changes
Aug 15, 2026
FileEX
left a comment
Member
There was a problem hiding this comment.
Move all these hooks to CMultiplayerSA_Vehicles or create a new CMultiplayerSA_VehicleSirens file for them.
Passes hook arguments straight through instead of shuttling them through globals, drops the pushad/popad and vehicle type checks that turned out unnecessary, and shares one vehicle lookup helper across the three new functions.
Splits the whole siren subsystem out of CMultiplayerSA_1.3.cpp into CMultiplayerSA_VehicleSirens.cpp, and drops a few unused globals and one orphaned forward declaration found along the way.
Contributor
Author
|
Done ✅ |
FileEX
requested changes
Aug 16, 2026
Verified with Ghidra that all three just replayed the exact call they replaced with the exact same register state, then jumped back to the same continuation point; installing them changed nothing.
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
addVehicleSirens/setVehicleSirenspreviously only had a visible effect on stockcars (and the HPV1000 bike), because GTA only renders siren coronas for models 407-599.
This makes scripted sirens render — lights and sound, on every vehicle type:
engineRequestModel) vehicles and out-of-range stock models (400-406,600-611) now render sirens (the
CAutomobile::PreRendermodel-id gate is bypassed forvehicles that carry scripted sirens).
PreRenderentry hooks, these classes had no native siren rendering at all.(
CAEVehicleAudioEntity::ProcessVehicleonly ran it for car/bike/bmx).addVehicleSirens/setVehicleSirens(client + server)were relaxed to allow every vehicle class; only typeless/invalid vehicles are rejected.
Motivation
Closes #4090
Closes #1375
It also ticks one item off #1861 sirens being one of those features. It doesn't close, but it's one
less thing on the list. And honestly, I just enjoy closing issues and expanding what
you can do in MTA. :)
Test plan
Run this in client-side, get in a vehicle and enjoy:
Checklist