From 54c9c38c8a9bacbbb098e32f9c624424c091fde7 Mon Sep 17 00:00:00 2001 From: Alberto Klocker Date: Wed, 11 Sep 2024 07:03:08 +1000 Subject: [PATCH] fix: Disable invalid input redundancy values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prevent values lower than 1 as they can break netfox. Fixes #252 --------- Co-authored-by: Tamás Gálffy --- addons/netfox.extras/plugin.cfg | 2 +- addons/netfox.internals/plugin.cfg | 2 +- addons/netfox.noray/plugin.cfg | 2 +- addons/netfox/plugin.cfg | 2 +- addons/netfox/rollback/network-rollback.gd | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/addons/netfox.extras/plugin.cfg b/addons/netfox.extras/plugin.cfg index 31761ad..5368f81 100644 --- a/addons/netfox.extras/plugin.cfg +++ b/addons/netfox.extras/plugin.cfg @@ -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" diff --git a/addons/netfox.internals/plugin.cfg b/addons/netfox.internals/plugin.cfg index 4663fc5..f450722 100644 --- a/addons/netfox.internals/plugin.cfg +++ b/addons/netfox.internals/plugin.cfg @@ -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" diff --git a/addons/netfox.noray/plugin.cfg b/addons/netfox.noray/plugin.cfg index 93cc433..6a12a3c 100644 --- a/addons/netfox.noray/plugin.cfg +++ b/addons/netfox.noray/plugin.cfg @@ -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" diff --git a/addons/netfox/plugin.cfg b/addons/netfox/plugin.cfg index 055d1b3..2107fd8 100644 --- a/addons/netfox/plugin.cfg +++ b/addons/netfox/plugin.cfg @@ -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" diff --git a/addons/netfox/rollback/network-rollback.gd b/addons/netfox/rollback/network-rollback.gd index 19d4807..f6be736 100644 --- a/addons/netfox/rollback/network-rollback.gd +++ b/addons/netfox/rollback/network-rollback.gd @@ -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")