Commit 744b0cb
authored
Fix ped rotation sync is broken when using setElementFrozen instantly (#4566)
Simplify SetFrozen logic and ensure matrix consistency
The `SetFrozen` method was simplified by removing conditional logic
related to `m_pPlayerPed` and now always uses the cached `m_Matrix`
to update `m_matFrozen`. This leverages the fact that `m_Matrix` is
already updated by `SetCurrentRotation`.
In `SetCurrentRotation`, added logic to always update the Z-axis
rotation of `m_Matrix` when setting `fRotation`. This ensures
`m_matFrozen` gets the correct value in `SetFrozen` and maintains
consistency between the current rotation and the cached matrix.1 parent b59f414 commit 744b0cb
1 file changed
+7
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2012 | 2012 | | |
2013 | 2013 | | |
2014 | 2014 | | |
2015 | | - | |
2016 | | - | |
2017 | | - | |
2018 | | - | |
2019 | | - | |
2020 | | - | |
2021 | | - | |
2022 | | - | |
2023 | | - | |
2024 | | - | |
2025 | | - | |
2026 | | - | |
2027 | | - | |
2028 | | - | |
2029 | | - | |
| 2015 | + | |
| 2016 | + | |
2030 | 2017 | | |
2031 | 2018 | | |
2032 | 2019 | | |
| |||
3366 | 3353 | | |
3367 | 3354 | | |
3368 | 3355 | | |
| 3356 | + | |
| 3357 | + | |
| 3358 | + | |
| 3359 | + | |
| 3360 | + | |
3369 | 3361 | | |
3370 | 3362 | | |
3371 | 3363 | | |
| |||
0 commit comments