Commit c884fed
committed
fix: batched mode never cleared a transform state's change flags
ClearForNextTick had one production call site, inside OnUpdateAuthoritativeState, which a registered
instance never reaches because the tick loop skips anything the batched delta check already handled.
So in batched mode the change flags were never reset: any axial group that changed once kept its
Has*Change bit for the life of the instance and was serialized on every state update from then on.
Measured at 200 instances over 60 ticks, half float position and a compressed quaternion, with scale
registered and never touched: 100% of entries carried HasScaleChange and paid 6 bytes for a scale that
had not moved since spawn. The per instance path, which does clear, costs the same with scale
registered or not.
This is the third defect of the same shape, so rather than a second copy of the block the clear is now
ClearStateForNextTick, called from OnUpdateAuthoritativeState and from PrepareBatchedDeltaEntry. The
per instance side is a pure extraction: same condition, same body, same order relative to the axis
check and the delta check.1 parent 5894d94 commit c884fed
2 files changed
Lines changed: 39 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
Lines changed: 38 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2179 | 2179 | | |
2180 | 2180 | | |
2181 | 2181 | | |
2182 | | - | |
2183 | | - | |
2184 | | - | |
| 2182 | + | |
| 2183 | + | |
| 2184 | + | |
| 2185 | + | |
2185 | 2186 | | |
2186 | 2187 | | |
2187 | 2188 | | |
| |||
3608 | 3609 | | |
3609 | 3610 | | |
3610 | 3611 | | |
| 3612 | + | |
| 3613 | + | |
| 3614 | + | |
| 3615 | + | |
| 3616 | + | |
| 3617 | + | |
| 3618 | + | |
| 3619 | + | |
| 3620 | + | |
| 3621 | + | |
| 3622 | + | |
| 3623 | + | |
| 3624 | + | |
| 3625 | + | |
| 3626 | + | |
| 3627 | + | |
| 3628 | + | |
| 3629 | + | |
| 3630 | + | |
| 3631 | + | |
| 3632 | + | |
| 3633 | + | |
| 3634 | + | |
| 3635 | + | |
| 3636 | + | |
| 3637 | + | |
| 3638 | + | |
| 3639 | + | |
| 3640 | + | |
| 3641 | + | |
| 3642 | + | |
| 3643 | + | |
| 3644 | + | |
3611 | 3645 | | |
3612 | 3646 | | |
3613 | 3647 | | |
3614 | 3648 | | |
3615 | 3649 | | |
3616 | 3650 | | |
3617 | | - | |
3618 | | - | |
3619 | | - | |
3620 | | - | |
3621 | | - | |
3622 | | - | |
3623 | | - | |
3624 | | - | |
3625 | | - | |
3626 | | - | |
3627 | | - | |
3628 | | - | |
3629 | | - | |
3630 | | - | |
3631 | | - | |
| 3651 | + | |
3632 | 3652 | | |
3633 | 3653 | | |
3634 | 3654 | | |
| |||
0 commit comments