Add ps2scorchedvehicles world special property#5012
Open
QueryOfficial wants to merge 2 commits into
Open
Conversation
- Introduced a new world special property for PS2 scorched vehicles, allowing for enhanced vehicle lighting effects. - Implemented enabling/disabling functionality in CClientGame and CMultiplayerSA. - Updated packet handling to synchronize the new property across clients and servers. - Adjusted vehicle color darkening logic based on the new property state. - Added necessary hooks and enums to support the new feature. This change enhances the visual experience for vehicles in the game, particularly for PS2 users.
- Added support for PS2 scorched vehicles as a new world special property. - Updated CClientGame and CMultiplayerSA to manage the enabling/disabling of this feature. - Enhanced packet handling to synchronize the new property across clients and servers. - Modified vehicle color darkening logic to reflect the state of the new property. - Introduced necessary hooks and enums to facilitate the feature. This update improves the visual effects for vehicles, particularly enhancing the experience for PS2 users.
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
Adds a new world special property
ps2scorchedvehicles(default:false) to darken destroyed vehicle chassis closer to PS2 SA behaviour.When enabled:
WorldReplaceNormalLightsWithScorchedto use0.0finstead of PC's0.18fVehColrender pathUsage:
Motivation
Fixes #4946 .
On PS2 SA, destroyed vehicles appear nearly black. On PC SA and MTA, the chassis stays visibly coloured because PC uses a weaker scorched lighting multiplier (0.18f) and MTA reapplies synced paint colours during render.
This is vanilla PC behaviour, not an MTA bug. SkyGFX reproduces the PS2 look externally; this change exposes it as an opt-in server setting via
setWorldSpecialPropertyEnabled.Test plan
Tests_Clientand confirmSWorldSpecialPropertiesStateSyncround-trip uses 21 bitssetWorldSpecialPropertyEnabled("ps2scorchedvehicles", true)resetWorldPropertiesand confirm the property resets tofalseHook addresses are for GTA SA 1.0 US:
0x553E6A,0x554FC2,0x7357E0.Checklist