From 5d3a8470c2e9dba56ad0dd83f6fc48669f2d3b68 Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Thu, 18 May 2023 14:33:25 +0200 Subject: [PATCH 1/5] Fix Netspeed Limiter ForcedSettings would not be "applied" if no ForcedSettings were configured. This ensures IGPlus_ForcedSettings_Apply is always called, regardless of the number of ForcedSettings. --- Classes/bbPlayer.uc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Classes/bbPlayer.uc b/Classes/bbPlayer.uc index 9ec3c2b2..a0fd7381 100644 --- a/Classes/bbPlayer.uc +++ b/Classes/bbPlayer.uc @@ -5083,8 +5083,9 @@ event ServerTick(float DeltaTime) { zzUTPure.GetForcedSettingMode(IGPlus_ForcedSettings_Index)); } IGPlus_ForcedSettings_Index++; - if (IGPlus_ForcedSettings_Index == Min(zzUTPure.Settings.ForcedSettings.Length, arraycount(IGPlus_ForcedSettings))) - IGPlus_ForcedSettingsApply(IGPlus_ForcedSettings_Counter); + } else if (IGPlus_ForcedSettings_Index == Min(zzUTPure.Settings.ForcedSettings.Length, arraycount(IGPlus_ForcedSettings))) { + IGPlus_ForcedSettingsApply(IGPlus_ForcedSettings_Counter); + IGPlus_ForcedSettings_Index++; } } From 11f7d4b16fa0b3c2bea74e9088602c978555c3f5 Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Thu, 18 May 2023 14:35:01 +0200 Subject: [PATCH 2/5] Extract Netspeed Limiter Into Function Eliminates a goto. --- Classes/bbPlayer.uc | 56 +++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/Classes/bbPlayer.uc b/Classes/bbPlayer.uc index a0fd7381..a50931f6 100644 --- a/Classes/bbPlayer.uc +++ b/Classes/bbPlayer.uc @@ -7239,11 +7239,37 @@ function IGPlus_LocationOffsetFix_TickBefore() { } } +function IGPlus_FixNetspeed() { + local int NetspeedTarget; + local int Netspeed; + + if (IGPlus_ForcedSettings_Applied && Player.CurrentNetspeed != zzNetspeed) { + Netspeed = int(ConsoleCommand("get ini:Engine.Engine.NetworkDevice MaxClientRate")); + if (Netspeed < Settings.DesiredNetspeed) { + ConsoleCommand("set ini:Engine.Engine.NetworkDevice MaxClientRate"@Settings.DesiredNetspeed); + Netspeed = Settings.DesiredNetspeed; + } + if (zzMinimumNetspeed > 0 && Netspeed < zzMinimumNetspeed) { + xxServerCheater("NS"); + return; + } + if (zzMaximumNetspeed > 0 && Netspeed < zzMaximumNetspeed) + zzMaximumNetspeed = Netspeed; + + NetspeedTarget = Settings.DesiredNetspeed; + if (zzMinimumNetspeed != 0 && NetspeedTarget < zzMinimumNetspeed) + NetspeedTarget = zzMinimumNetspeed; + if (zzMaximumNetspeed != 0 && NetspeedTarget > zzMaximumNetspeed) + NetspeedTarget = zzMaximumNetspeed; + + ConsoleCommand("Netspeed"@NetspeedTarget); + zzNetspeed = Player.CurrentNetspeed; + } +} + event PostRender( canvas zzCanvas ) { local int CH; - local int NetspeedTarget; - local int Netspeed; if (Settings.bUseCrosshairFactory) { CH = MyHud.Crosshair; @@ -7268,31 +7294,7 @@ event PostRender( canvas zzCanvas ) xxRenderLogo(zzCanvas); xxCleanAvars(); - if (IGPlus_ForcedSettings_Applied && Player.CurrentNetspeed != zzNetspeed) { - Netspeed = int(ConsoleCommand("get ini:Engine.Engine.NetworkDevice MaxClientRate")); - if (Netspeed < Settings.DesiredNetspeed) { - ConsoleCommand("set ini:Engine.Engine.NetworkDevice MaxClientRate"@Settings.DesiredNetspeed); - Netspeed = Settings.DesiredNetspeed; - } - if (zzMinimumNetspeed > 0 && Netspeed < zzMinimumNetspeed) { - xxServerCheater("NS"); - goto netspeed_end; - } - if (zzMaximumNetspeed > 0 && Netspeed < zzMaximumNetspeed) - zzMaximumNetspeed = Netspeed; - - NetspeedTarget = Settings.DesiredNetspeed; - if (zzMinimumNetspeed != 0 && NetspeedTarget < zzMinimumNetspeed) - NetspeedTarget = zzMinimumNetspeed; - if (zzMaximumNetspeed != 0 && NetspeedTarget > zzMaximumNetspeed) - NetspeedTarget = zzMaximumNetspeed; - - ConsoleCommand("Netspeed"@NetspeedTarget); - zzNetspeed = Player.CurrentNetspeed; - - netspeed_end: - // - } + IGPlus_FixNetspeed(); if (zzDelayedStartTime != 0.0) { From 449e221ffa26bc7199446e3cddb7bda30d30faf2 Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Thu, 18 May 2023 14:35:37 +0200 Subject: [PATCH 3/5] Add Comment To Weird Line --- Classes/bbPlayer.uc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Classes/bbPlayer.uc b/Classes/bbPlayer.uc index a50931f6..580b26f5 100644 --- a/Classes/bbPlayer.uc +++ b/Classes/bbPlayer.uc @@ -5974,7 +5974,8 @@ state Dying if (zzUTPure.Settings.bEnablePingCompensatedSpawn) { bDeathMatchSave = Level.Game.bDeathMatch; - Level.Game.bDeathMatch = false; + Level.Game.bDeathMatch = false; // this avoids the sound respawns generate, we will play our own later + // see DeathMatchPlus.PlayTeleportEffect() } Level.Game.DiscardInventory(self); // last possible place to rid ourselves of old inventory From bd154e05f3fa72ec9fbdadcc3762c384f79e66ff Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Thu, 18 May 2023 14:39:27 +0200 Subject: [PATCH 4/5] Update .int --- System/InstaGibPlus.int | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/System/InstaGibPlus.int b/System/InstaGibPlus.int index bbe8e0e2..bb5f2e7e 100644 --- a/System/InstaGibPlus.int +++ b/System/InstaGibPlus.int @@ -1,14 +1,14 @@ [Public] -Object=(Name=InstaGibPlus.ST_Mutator,Class=Class,MetaClass=Engine.Mutator,Description="IG+9 ST_Mutator,InstaGibPlus9 ST_Mutator") +Object=(Name=InstaGibPlus.ST_Mutator,Class=Class,MetaClass=Engine.Mutator,Description="IG+10 ST_Mutator,Replaces all normal weapons with their IG+ equivalent") Object=(Name=InstaGibPlus.PureStatMutator,Class=Class,MetaClass=Engine.Mutator,Description="PureStatMutator,") -Object=(Name=InstaGibPlus.UTPure,Class=Class,MetaClass=Engine.Mutator,Description="IG+9 UTPure,InstaGibPlus9 UTPure") -Object=(Name=InstaGibPlus.MutKillFeed,Class=Class,MetaClass=Engine.Mutator,Description="IG+9 Kill Feed,InstaGibPlus9 Kill Feed Mutator") +Object=(Name=InstaGibPlus.UTPure,Class=Class,MetaClass=Engine.Mutator,Description="IG+10 UTPure,Main IG+ mutator needed for everything else") +Object=(Name=InstaGibPlus.MutKillFeed,Class=Class,MetaClass=Engine.Mutator,Description="IG+10 Kill Feed,Kill Feed Mutator") Object=(Name=InstaGibPlus.PureClickBoard,Class=Class,MetaClass=Engine.Mutator,Description="PureClickBoard,") Object=(Name=InstaGibPlus.MutFraggerArena,Class=Class,MetaClass=Engine.Mutator,Description="Fragger Arena,Sniper+Translocator camping combat") Object=(Name=InstaGibPlus.NewNetArena,Class=Class,MetaClass=Engine.Mutator,Description="NewNetArena,") -Object=(Name=InstaGibPlus.NewNetIG,Class=Class,MetaClass=Engine.Mutator,Description="IG+9 NewNetIG,InstaGibPlus9 NewNetIG") +Object=(Name=InstaGibPlus.NewNetIG,Class=Class,MetaClass=Engine.Mutator,Description="IG+10 NewNetIG,InstaGib with lag-compensated SuperShockRifle") Object=(Name=InstaGibPlus.NNAnnouncer,Class=Class,MetaClass=Engine.Mutator,Description="NNAnnouncer,") -Object=(Name=InstaGibPlus.NewNetSA,Class=Class,MetaClass=Engine.Mutator,Description="IG+9 NewNetSA,InstaGibPlus9 NewNetSA") +Object=(Name=InstaGibPlus.NewNetSA,Class=Class,MetaClass=Engine.Mutator,Description="IG+10 NewNetSA,SniperArena with lag-compensated SniperRifle") Object=(Name=InstaGibPlus.DisableNewNet,Class=Class,MetaClass=Engine.Mutator,Description="DisableNewNet,") Object=(Name=InstaGibPlus.DisableWeapons,Class=Class,MetaClass=Engine.Mutator,Description="DisableWeapons,") Object=(Name=InstaGibPlus.NN_FraggerRifle,Class=Class,MetaClass=Engine.Weapon) From 03f7cb9928176b0afaf7f51563d8f6eb83670862 Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Sun, 21 May 2023 22:31:56 +0200 Subject: [PATCH 5/5] Remove FireAdjust Limitation Use ACE Anti-Tweak functionality as replacement. This should improve Siege compatibility. --- Classes/bbPlayer.uc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Classes/bbPlayer.uc b/Classes/bbPlayer.uc index 580b26f5..3d592fdc 100644 --- a/Classes/bbPlayer.uc +++ b/Classes/bbPlayer.uc @@ -3282,11 +3282,6 @@ simulated function xxDisableCarcasses() exec function Fire( optional float F ) { - if (TournamentWeapon(Weapon) != none && TournamentWeapon(Weapon).FireAdjust != 1.0) { - xxServerCheater("FA"); - TournamentWeapon(Weapon).FireAdjust = 1.0; - } - xxEnableCarcasses(); if (Weapon != none) { if (Level.NetMode == NM_Client) @@ -7574,8 +7569,6 @@ function xxServerCheater(string zzCode) zzS = "Mutator Kick!"; else if (zzCode == "TD") zzS = "Bad TimeDilation!"; - else if (zzCode == "FA") - zzS = "Bad FireAdjust!"; else zzS = "UNKNOWN!"; zzCode = zzCode@"-"@zzS;