Skip to content

Fix getHeatHaze reading three settings from the wrong variables - #5372

Open
Flashmyname wants to merge 1 commit into
multitheftauto:masterfrom
Flashmyname:fix/getheathaze-wrong-variables
Open

Fix getHeatHaze reading three settings from the wrong variables#5372
Flashmyname wants to merge 1 commit into
multitheftauto:masterfrom
Flashmyname:fix/getheathaze-wrong-variables

Conversation

@Flashmyname

Copy link
Copy Markdown
Contributor

Summary

CMultiplayerSA::GetHeatHaze declares m_HeatHazeFXSpeedMin at 0xC402C0, which is the random shift address, and then reads sScanSizeX from the scan size Y variable and sScanSizeY from the speed max variable. DoSetHeatHazePokes in the same file writes those three to 0x8D50EC, 0xC40304 and 0xC40308.

Motivation

setHeatHaze followed by getHeatHaze does not round trip, so a script cannot read back what it set.

Test plan

setHeatHaze with nine distinct values, then getHeatHaze:

                 set   before   after
speedMin          33      22      33      (22 is the random shift)
scanSizeX         55      66      55      (66 is scan size Y)
scanSizeY         66      44      66      (44 is speed max)

The other six fields were already correct. Each wrong value is exactly the value of the variable the code reads by mistake.

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.

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.

1 participant