Skip to content

Commit

Permalink
fix: Disable invalid input redundancy values
Browse files Browse the repository at this point in the history
Prevent values lower than 1 as they can break netfox.

Fixes #252

---------

Co-authored-by: Tamás Gálffy <[email protected]>
  • Loading branch information
albertok and elementbound authored Sep 10, 2024
1 parent 2c70ff1 commit 54c9c38
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion addons/netfox.extras/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="netfox.extras"
description="Game-specific utilities for Netfox"
author="Tamas Galffy"
version="1.8.2"
version="1.8.3"
script="netfox-extras.gd"
2 changes: 1 addition & 1 deletion addons/netfox.internals/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="netfox.internals"
description="Shared internals for netfox addons"
author="Tamas Galffy"
version="1.8.2"
version="1.8.3"
script="plugin.gd"
2 changes: 1 addition & 1 deletion addons/netfox.noray/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="netfox.noray"
description="Bulletproof your connectivity with noray integration for netfox"
author="Tamas Galffy"
version="1.8.2"
version="1.8.3"
script="netfox-noray.gd"
2 changes: 1 addition & 1 deletion addons/netfox/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
name="netfox"
description="Shared internals for netfox addons"
author="Tamas Galffy"
version="1.8.2"
version="1.8.3"
script="netfox.gd"
8 changes: 4 additions & 4 deletions addons/netfox/rollback/network-rollback.gd
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ var display_offset: int:

## How many previous input frames to send along with the current one.
##
## Input data is sent unreliably over UDP for speed.
## Some packets may be lost, some arrive late or out of order.
## To mitigate this, we can send the current and previous n ticks of input data.
## With UDP - packets may be lost, arrive late or out of order.
## To mitigate this, we send the current and previous n ticks of input data.
##
## [i]read-only[/i], you can change this in the project settings
var input_redundancy: int:
get:
return ProjectSettings.get_setting("netfox/rollback/input_redundancy", 3)
var value = ProjectSettings.get_setting("netfox/rollback/input_redundancy", 3)
return max(1, value)
set(v):
push_error("Trying to set read-only variable input_redundancy")

Expand Down

0 comments on commit 54c9c38

Please sign in to comment.