Added docs for is_fresh and updated screenshot#263
Added docs for is_fresh and updated screenshot#263elementbound merged 5 commits intofoxssake:mainfrom
Conversation
|
The updated screenshot has As for Example code of forest brawler func _rollback_tick(delta: float, tick: int, is_fresh: bool):
# Respawn
if tick == respawn_tick:
_snap_to_spawn()
velocity = Vector3.ZERO
last_hit_tick = -1
if is_fresh:
GameEvents.on_brawler_respawn.emit(self) |
|
|
||
| ## Single fire events | ||
|
|
||
| The first time a tick is processed, the `is_fresh` parameter is set to `true`. |
There was a problem hiding this comment.
I would suggest the following replacement for this line:
"In the first rollback tick processed for a node, the is_fresh parameter is set to true."
Good catch @TheYellowArchitect . Screenshot updated! is_fresh is definitely always true when a tick is first processed as its set and emitted from _process_tick. flow is here: https://foxssake.github.io/netfox/netfox/guides/network-rollback/ I did some testing on both a single and multi client game and they worked as expected. Observed by adding a log line at the start of a rollback tick function |
|
Added a minor commit, wrapping docs to 80 chars. I'll have to document this convention somewhere 🙂 Not approving yet, due to the naming thing with #252 |
|
@elementbound removed the screenshot on this one to unblock |
|
@albertok kudos! |
#228
Added documentation for how is_fresh can be used.