Unlock sirens for all vehicle types, including custom models#4959
Open
TheCrazy17 wants to merge 1 commit into
Open
Unlock sirens for all vehicle types, including custom models#4959TheCrazy17 wants to merge 1 commit into
TheCrazy17 wants to merge 1 commit 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.
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
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