Skip to content

Commit 3a51c30

Browse files
committed
fxs
1 parent 4df1031 commit 3a51c30

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

addons/netfox/rollback/network-rollback.gd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,8 @@ func register_input_submission(root_node: Node, tick: int) -> void:
275275
_input_submissions[root_node] = maxi(_input_submissions[root_node], tick)
276276

277277
## Get the latest input tick submitted by a specific root node
278+
## [br][br]
279+
## Returns [code]-1[/code] if no input was submitted for the node, ever.
278280
func get_latest_input_tick(root_node: Node) -> int:
279281
if _input_submissions.has(root_node):
280282
return _input_submissions[root_node]

docs/netfox/guides/network-rollback.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -131,17 +131,19 @@ These methods are called by [RollbackSynchronizer] under the hood.
131131

132132
## Input Submission Status
133133

134-
In certain scenarios you may wish to delay commiting to something hard to reverse
135-
like death, vfx or audio untill its known for sure the outcome won't change. One
136-
way of doing this is to check which nodes have submited input and are past a
137-
point of rollback.
138-
139-
You can query the status of Nodes with `NetworkRollback.get_latest_input_tick(root_node)`
140-
or `NetworkRollback.has_input_for_tick(root_node, tick)`. `root_node` being what
141-
the relevant [RollbackSynchronizer] has configured.
142-
143-
All tracked nodes can be retreived from `NetworkRollback.get_input_submissions()`
144-
which will return the entire <root_node, latest_tick> dictionary.
134+
In certain scenarios you may wish to delay committing to something hard to
135+
reverse like death, VFX or audio until its known for sure the outcome won't
136+
change. One way of doing this is to check which nodes have submitted input and
137+
are past a point of rollback.
138+
139+
You can query the status of Nodes with
140+
`NetworkRollback.get_latest_input_tick(root_node)` or
141+
`NetworkRollback.has_input_for_tick(root_node, tick)`. `root_node` being what
142+
the relevant [RollbackSynchronizer] has configured.
143+
144+
All tracked nodes can be retrieved from
145+
`NetworkRollback.get_input_submissions()` which will return the entire
146+
`<root_node, latest_tick>` dictionary.
145147

146148
## Settings
147149

0 commit comments

Comments
 (0)