Skip to content

Commit 99f6e92

Browse files
authored
fix: TickInterpolator glitch on state switch (#301)
At the end of the tick loop, `TickInterpolator` catches the new state and starts interpolating towards it. However, between `NetworkTime.after_tick_loop` and the next `TickInterpolator._process` callback, there may be a single frame where the interpolated node(s) are still in the target state, and then get set back to the starting state once the interpolation kicks in. This leads to a periodic glitching. To fix this, `TickInterpolator` always applies the starting state once it's captured, in `NetworkTime.after_tick_loop`. Closes #287
1 parent 97c56d6 commit 99f6e92

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

addons/netfox.extras/plugin.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
name="netfox.extras"
44
description="Game-specific utilities for Netfox"
55
author="Tamas Galffy"
6-
version="1.8.4"
6+
version="1.8.5"
77
script="netfox-extras.gd"

addons/netfox.internals/plugin.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
name="netfox.internals"
44
description="Shared internals for netfox addons"
55
author="Tamas Galffy"
6-
version="1.8.4"
6+
version="1.8.5"
77
script="plugin.gd"

addons/netfox.noray/plugin.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
name="netfox.noray"
44
description="Bulletproof your connectivity with noray integration for netfox"
55
author="Tamas Galffy"
6-
version="1.8.4"
6+
version="1.8.5"
77
script="netfox-noray.gd"

addons/netfox/plugin.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
name="netfox"
44
description="Shared internals for netfox addons"
55
author="Tamas Galffy"
6-
version="1.8.4"
6+
version="1.8.5"
77
script="netfox.gd"

addons/netfox/tick-interpolator.gd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ func _before_tick_loop():
7070
func _after_tick_loop():
7171
if enable_recording:
7272
push_state()
73+
PropertySnapshot.apply(_state_from, _property_cache)
7374

7475
func _interpolate(from: Dictionary, to: Dictionary, f: float):
7576
if not can_interpolate():

0 commit comments

Comments
 (0)