Skip to content

Fix setCameraDrunkLevel(0) not stopping the camera shake - #5414

Open
Flashmyname wants to merge 1 commit into
multitheftauto:masterfrom
Flashmyname:fix/723-camera-shake
Open

Flashmyname wants to merge 1 commit into
multitheftauto:masterfrom
Flashmyname:fix/723-camera-shake

Conversation

@Flashmyname

Copy link
Copy Markdown
Contributor

Summary

The game drives the shake from every player ped's own drunk level. Other players and scripted peds are created with a copy of the local player's ped data, drunk level included, so a ped created while the level was non-zero keeps turning the shake back on, and once it is gone nothing turns it off.

Fixes #723

Test plan

crun setCameraDrunkLevel(255)
crun local x,y,z = getElementPosition(localPlayer) p = createPed(0, x+2, y, z)
crun setCameraDrunkLevel(0)   -- master: still shaking, getCameraDrunkLevel() is 0
crun destroyElement(p)        -- master: still shaking

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.

setCameraShakeLevel(0) setting wrong camera shake level

1 participant