Skip to content

Commit 739a858

Browse files
committed
Added a setting to toggle network settings between the old reliable ones and the new fast ones.
1 parent c79f541 commit 739a858

4 files changed

Lines changed: 68 additions & 16 deletions

File tree

LuaMenu/configs/gameConfig/zk/defaultSettings/springsettings.cfg

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ GroundDetail = 90
3333
HangTimeout = 30
3434
HardwareCursor = 1
3535
InitialNetworkTimeout = 0
36-
LinkOutgoingBandwidth= 262144
37-
LinkIncomingSustainedBandwidth = 262144
38-
LinkIncomingPeakBandwidth = 262144
39-
LinkIncomingMaxPacketRate = 2048
36+
LinkOutgoingBandwidth = 131072
37+
LinkIncomingSustainedBandwidth = 65536
38+
LinkIncomingPeakBandwidth = 65536
39+
LinkIncomingMaxPacketRate = 512
4040
LoadingMT = 0
4141
LODScale = 1.000
4242
LODScaleReflection = 1.000
@@ -56,7 +56,7 @@ MiniMapMarker = 0
5656
MinimapOnLeft = 1
5757
MouseDragScrollThreshold = 0
5858
MoveWarnings = 0
59-
NetworkLossFactor = 2
59+
NetworkLossFactor = 1
6060
NormalMapping = 1
6161
OverheadMaxHeightFactor = 1.4
6262
OverheadScrollSpeed = 50

LuaMenu/configs/gameConfig/zk/settingsMenu.lua

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,6 +853,8 @@ local settingsConfig = {
853853
EdgeScroll = "On",
854854
MiddlePanSpeed = 15,
855855
CameraPanSpeed = 50,
856+
NetworkSettings = "Balanced",
857+
SmoothBuffer = "Off",
856858
}
857859
},
858860
},
@@ -1017,6 +1019,60 @@ local settingsConfig = {
10171019
}
10181020
end,
10191021
},
1022+
{
1023+
name = "NetworkSettings",
1024+
humanName = "Network Connection",
1025+
options = {
1026+
{
1027+
name = "Reliable",
1028+
apply = {
1029+
NetworkLossFactor = 0,
1030+
LinkOutgoingBandwidth = 65536,
1031+
LinkIncomingSustainedBandwidth = 2048,
1032+
LinkIncomingPeakBandwidth = 32768,
1033+
LinkIncomingMaxPacketRate = 64,
1034+
}
1035+
},
1036+
{
1037+
name = "Balanced",
1038+
apply = {
1039+
NetworkLossFactor = 1,
1040+
LinkOutgoingBandwidth = 131072,
1041+
LinkIncomingSustainedBandwidth = 65536,
1042+
LinkIncomingPeakBandwidth = 65536,
1043+
LinkIncomingMaxPacketRate = 512,
1044+
}
1045+
},
1046+
{
1047+
name = "Fast",
1048+
apply = {
1049+
NetworkLossFactor = 2,
1050+
LinkOutgoingBandwidth = 262144,
1051+
LinkIncomingSustainedBandwidth = 262144,
1052+
LinkIncomingPeakBandwidth = 262144,
1053+
LinkIncomingMaxPacketRate = 2048,
1054+
}
1055+
},
1056+
},
1057+
},
1058+
{
1059+
name = "SmoothBuffer",
1060+
humanName = "Smooth Buffer",
1061+
options = {
1062+
{
1063+
name = "On",
1064+
apply = {
1065+
UseNetMessageSmoothingBuffer = 1,
1066+
}
1067+
},
1068+
{
1069+
name = "Off",
1070+
apply = {
1071+
UseNetMessageSmoothingBuffer = 0,
1072+
}
1073+
},
1074+
},
1075+
},
10201076
},
10211077
},
10221078
}
@@ -1051,6 +1107,8 @@ local settingsDefault = {
10511107
EdgeScroll = "On",
10521108
MiddlePanSpeed = 15,
10531109
CameraPanSpeed = 50,
1110+
NetworkSettings = "Balanced",
1111+
SmoothBuffer = "Off",
10541112
}
10551113

10561114
local settingsNames = {}

LuaMenu/configs/springsettings/springsettings.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ local settings = {
3333
HangTimeout = 30,
3434
HardwareCursor = 1,
3535
InitialNetworkTimeout = 0,
36-
LinkOutgoingBandwidth= 262144,
37-
LinkIncomingSustainedBandwidth = 262144,
38-
LinkIncomingPeakBandwidth = 262144,
39-
LinkIncomingMaxPacketRate = 2048,
36+
LinkOutgoingBandwidth = 131072,
37+
LinkIncomingSustainedBandwidth = 65536,
38+
LinkIncomingPeakBandwidth = 65536,
39+
LinkIncomingMaxPacketRate = 512,
4040
LoadingMT = 0,
4141
LODScale = 1.000,
4242
LODScaleReflection = 1.000,
@@ -56,7 +56,7 @@ local settings = {
5656
MinimapOnLeft = 1,
5757
MouseDragScrollThreshold = 0,
5858
MoveWarnings = 0,
59-
NetworkLossFactor = 2,
59+
NetworkLossFactor = 1,
6060
NormalMapping = 1,
6161
OverheadMaxHeightFactor = 1.4,
6262
OverheadScrollSpeed = 50,

LuaMenu/configs/springsettings/springsettingsChanges.lua

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@ local settings = {
1313
local onlyIfMissingSettings = {
1414
FeatureDrawDistance = 600000,
1515
FeatureFadeDistance = 600000,
16-
UseNetMessageSmoothingBuffer = 0,
17-
NetworkLossFactor = 2,
18-
LinkOutgoingBandwidth= 262144,
19-
LinkIncomingSustainedBandwidth = 262144,
20-
LinkIncomingPeakBandwidth = 262144,
21-
LinkIncomingMaxPacketRate = 2048,
2216
}
2317

2418
return settings, onlyIfMissingSettings

0 commit comments

Comments
 (0)