Skip to content

Commit

Permalink
Merge pull request #41 from Deaod/master
Browse files Browse the repository at this point in the history
InstaGib+ 10B
  • Loading branch information
Deaod authored May 22, 2023
2 parents 64b7a69 + 03f7cb9 commit ac5e301
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 42 deletions.
71 changes: 34 additions & 37 deletions Classes/bbPlayer.uc
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -5083,8 +5078,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++;
}
}

Expand Down Expand Up @@ -5973,7 +5969,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
Expand Down Expand Up @@ -7238,11 +7235,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;
Expand All @@ -7267,31 +7290,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)
{
Expand Down Expand Up @@ -7570,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;
Expand Down
10 changes: 5 additions & 5 deletions System/InstaGibPlus.int
Original file line number Diff line number Diff line change
@@ -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,<Insert description here>")
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,<Insert description here>")
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,<Insert description here>")
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,<Insert description here>")
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,<Insert description here>")
Object=(Name=InstaGibPlus.DisableWeapons,Class=Class,MetaClass=Engine.Mutator,Description="DisableWeapons,<Insert description here>")
Object=(Name=InstaGibPlus.NN_FraggerRifle,Class=Class,MetaClass=Engine.Weapon)
Expand Down

0 comments on commit ac5e301

Please sign in to comment.