Skip to content

Add ps2scorchedvehicles world special property#5012

Open
QueryOfficial wants to merge 2 commits into
multitheftauto:masterfrom
QueryOfficial:feature/ps2-scorched-vehicles
Open

Add ps2scorchedvehicles world special property#5012
QueryOfficial wants to merge 2 commits into
multitheftauto:masterfrom
QueryOfficial:feature/ps2-scorched-vehicles

Conversation

@QueryOfficial

@QueryOfficial QueryOfficial commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a new world special property ps2scorchedvehicles (default: false) to darken destroyed vehicle chassis closer to PS2 SA behaviour.

When enabled:

  • Hooks WorldReplaceNormalLightsWithScorched to use 0.0f instead of PC's 0.18f
  • Darkens blown vehicle paint colours in the existing VehCol render path

Usage:

setWorldSpecialPropertyEnabled("ps2scorchedvehicles", true)

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

  • Build client (Win32) and server
  • Run Tests_Client and confirm SWorldSpecialPropertiesStateSync round-trip uses 21 bits
  • On a test server, run setWorldSpecialPropertyEnabled("ps2scorchedvehicles", true)
  • Blow up a passenger car and confirm the chassis is near-black with only faint colour hints
  • Disable the property and confirm behaviour matches vanilla PC/MTA
  • Run resetWorldProperties and confirm the property resets to false
  • Join the server with a fresh client and confirm the property syncs via map info

Hook addresses are for GTA SA 1.0 US: 0x553E6A, 0x554FC2, 0x7357E0.

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.

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

Destroyed vehicles don't turn black

1 participant