Commit 43387ca
authored
Fix flickering turrets in techroom (scp-fs2open#7527)
Turrets with initial animations flip animation angles every frame in the techroom. The commit returns TriStateBool from model_get_cached_ui_render_instance specifically so callers can run setup only when a new instance is created, but only `render_tech_model` (the Lua path) actually checks it.
Since the instance is cached and persists across frames, every frame re-runs clearShipData + initial-animation start on an already-animated instance, re-applying the initial animations relative to the current (already-animated) pose. This is what seems to produces the per-frame flip/jitter.
This PR caches it to prevent this, and fixes scp-fs2open#7526. Tests confirm it works as expected.1 parent 3e41e5b commit 43387ca
3 files changed
Lines changed: 16 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
600 | 600 | | |
601 | 601 | | |
602 | 602 | | |
603 | | - | |
604 | | - | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
605 | 608 | | |
606 | 609 | | |
607 | 610 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1665 | 1665 | | |
1666 | 1666 | | |
1667 | 1667 | | |
1668 | | - | |
1669 | | - | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
1670 | 1671 | | |
1671 | 1672 | | |
1672 | 1673 | | |
| |||
1688 | 1689 | | |
1689 | 1690 | | |
1690 | 1691 | | |
1691 | | - | |
1692 | | - | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
1693 | 1695 | | |
1694 | 1696 | | |
1695 | 1697 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
828 | 828 | | |
829 | 829 | | |
830 | 830 | | |
831 | | - | |
832 | | - | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
833 | 836 | | |
834 | 837 | | |
835 | 838 | | |
| |||
0 commit comments