From 99536310f57da5ce6aba5c19deeb054a289056e4 Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Sat, 31 Oct 2020 20:08:41 +0100 Subject: [PATCH 01/17] Prepare 5C --- Classes/ClientSettings.uc | 2 +- README.md | 12 ++++++------ System/InstaGibPlus5B.int | 8 ++++---- make.ini | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Classes/ClientSettings.uc b/Classes/ClientSettings.uc index 101a8193..ad834671 100644 --- a/Classes/ClientSettings.uc +++ b/Classes/ClientSettings.uc @@ -74,7 +74,7 @@ defaultproperties DesiredTeamSkinFemale=0 bEnableHitSounds=True selectedHitSound=0 - sHitSound(0)="InstaGibPlus5B.HitSound" + sHitSound(0)="InstaGibPlus5C.HitSound" sHitSound(1)="UnrealShare.StingerFire" cShockBeam=1 BeamScale=0.45 diff --git a/README.md b/README.md index d149ae48..f460571a 100644 --- a/README.md +++ b/README.md @@ -447,14 +447,14 @@ Extract the zipped files to your system folder. Remove any mention in your ServerPackages and ServerActors of TimTim's NewNet or Deepu's Ultimate NewNet. Add the following lines to your server's **UnrealTournament.ini** under **[Engine.GameEngine]**: -**ServerPackages=InstaGibPlus5B** -**ServerActors=InstaGibPlus5B.NewNetServer** -**ServerActors=InstaGibPlus5B.PureStats** +**ServerPackages=InstaGibPlus5C** +**ServerActors=InstaGibPlus5C.NewNetServer** +**ServerActors=InstaGibPlus5C.PureStats** It is highly recommended to set your server's tickrate to 100. # Usage -For InstaGib, make sure the mutator **InstaGibPlus5B.NewNetIG** is loaded via your map vote configuration or during server launch. +For InstaGib, make sure the mutator **InstaGibPlus5C.NewNetIG** is loaded via your map vote configuration or during server launch. InstaGib+ has minimal weapons code and will load the default UT weapons if the NewNetIG mutator is not loaded, so it is absolutely unusable in normal weapons, make sure to use it only if your objective is to play or to run an InstaGib centered server. @@ -922,8 +922,8 @@ If False, players will be slowed down to ground speed upon landing, which preven # Building 1. Go to the installation directory of UT99 in a command shell -2. Use `git clone https://github.com/utspect/InstaGibPlus InstaGibPlus5B` to clone the repo -3. Navigate to the newly created directory `InstaGibPlus5B` +2. Use `git clone https://github.com/utspect/InstaGibPlus InstaGibPlus5C` to clone the repo +3. Navigate to the newly created directory `InstaGibPlus5C` 4. Execute `build.bat` 5. The result of the build process will be available in the `System` folder that is next to `build.bat` diff --git a/System/InstaGibPlus5B.int b/System/InstaGibPlus5B.int index 552dcfb1..5dff7341 100644 --- a/System/InstaGibPlus5B.int +++ b/System/InstaGibPlus5B.int @@ -1,5 +1,5 @@ [Public] -Object=(Name=InstaGibPlus5B.UTPure,Class=Class,MetaClass=Engine.Mutator,Description="IG+5B UTPure,InstaGibPlus5B UTPure") -Object=(Name=InstaGibPlus5B.ST_Mutator,Class=Class,MetaClass=Engine.Mutator,Description="IG+5B ST_Mutator,InstaGibPlus5B ST_Mutator") -Object=(Name=InstaGibPlus5B.NewNetIG,Class=Class,MetaClass=Engine.Mutator,Description="IG+5B NewNetIG,InstaGibPlus5B NewNetIG") -Object=(Name=InstaGibPlus5B.NewNetSA,Class=Class,MetaClass=Engine.Mutator,Description="IG+5B NewNetSA,InstaGibPlus5B NewNetSA") \ No newline at end of file +Object=(Name=InstaGibPlus5C.UTPure,Class=Class,MetaClass=Engine.Mutator,Description="IG+5C UTPure,InstaGibPlus5C UTPure") +Object=(Name=InstaGibPlus5C.ST_Mutator,Class=Class,MetaClass=Engine.Mutator,Description="IG+5C ST_Mutator,InstaGibPlus5C ST_Mutator") +Object=(Name=InstaGibPlus5C.NewNetIG,Class=Class,MetaClass=Engine.Mutator,Description="IG+5C NewNetIG,InstaGibPlus5C NewNetIG") +Object=(Name=InstaGibPlus5C.NewNetSA,Class=Class,MetaClass=Engine.Mutator,Description="IG+5C NewNetSA,InstaGibPlus5C NewNetSA") \ No newline at end of file diff --git a/make.ini b/make.ini index 9352c09d..8b570a52 100644 --- a/make.ini +++ b/make.ini @@ -21,7 +21,7 @@ EditPackages=Botpack EditPackages=UTServerAdmin EditPackages=UTMenu EditPackages=UTBrowser -EditPackages=InstaGibPlus5B +EditPackages=InstaGibPlus5C [Core.System] Paths=*.u From 5ef565aa7b42452fd82be053ce31a16ed2ee9eb6 Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Sat, 31 Oct 2020 20:09:03 +0100 Subject: [PATCH 02/17] Rename .int --- System/{InstaGibPlus5B.int => InstaGibPlus5C.int} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename System/{InstaGibPlus5B.int => InstaGibPlus5C.int} (100%) diff --git a/System/InstaGibPlus5B.int b/System/InstaGibPlus5C.int similarity index 100% rename from System/InstaGibPlus5B.int rename to System/InstaGibPlus5C.int From 6debccf635b05ab58f21dd57f0175a25291c0155 Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Sat, 31 Oct 2020 15:50:44 +0100 Subject: [PATCH 03/17] Dont Modify Ping In xxServerMove --- Classes/bbPlayer.uc | 1 - 1 file changed, 1 deletion(-) diff --git a/Classes/bbPlayer.uc b/Classes/bbPlayer.uc index 7b236a41..44729ffa 100644 --- a/Classes/bbPlayer.uc +++ b/Classes/bbPlayer.uc @@ -1888,7 +1888,6 @@ function xxServerMove( debugClientForceUpdate = false; - PlayerReplicationInfo.Ping = int(ConsoleCommand("GETPING")); if (SetPendingWeapon) { xxSetPendingWeapon(PendingWeapon); zzPendingWeapon = PendingWeapon; From cfe00f4cc3b45c3566e4cdc5a1414db717252ea6 Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Sat, 31 Oct 2020 20:11:54 +0100 Subject: [PATCH 04/17] Fix BeamOriginMode 1 --- Classes/bbPlayer.uc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/bbPlayer.uc b/Classes/bbPlayer.uc index 44729ffa..8100eb9a 100644 --- a/Classes/bbPlayer.uc +++ b/Classes/bbPlayer.uc @@ -6653,7 +6653,7 @@ simulated function xxClientSpawnSSRBeamInternal(vector HitLocation, vector Smoke if (Settings.BeamOriginMode == 1) { // Show beam originating from its Owner - OriginLocation = Owner.Location + SmokeOffset; + OriginLocation = O.Location + SmokeOffset; } else { // Show beam originating from where it was shot OriginLocation = SmokeLocation; From d19e0c2d10e3bd8fe016b11ebe2312cecde21dc5 Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Wed, 11 Nov 2020 22:14:15 +0100 Subject: [PATCH 05/17] Make SSR Reload Time Consistent --- Classes/ST_SuperShockRifle.uc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Classes/ST_SuperShockRifle.uc b/Classes/ST_SuperShockRifle.uc index a08ab229..d25964c2 100644 --- a/Classes/ST_SuperShockRifle.uc +++ b/Classes/ST_SuperShockRifle.uc @@ -156,15 +156,18 @@ simulated function PlayFiring() { PlayOwnedSound(FireSound, SLOT_None, Pawn(Owner).SoundDampening*4.0); if (Level.NetMode == NM_Client) - LoopAnim('Fire1', 0.20 + 0.20 * FireAdjust,0.05); + PlayAnim('Fire1', 0.20 + 0.20 * FireAdjust,0.05); else - LoopAnim('Fire1', 0.22 + 0.22 * FireAdjust,0.05); + PlayAnim('Fire1', 0.22 + 0.22 * FireAdjust,0.05); } simulated function PlayAltFiring() { PlayOwnedSound(FireSound, SLOT_None, Pawn(Owner).SoundDampening*4.0); - LoopAnim('Fire1', 0.20 + 0.20 * FireAdjust,0.05); + if (Level.NetMode == NM_Client) + PlayAnim('Fire1', 0.20 + 0.20 * FireAdjust,0.05); + else + PlayAnim('Fire1', 0.22 + 0.22 * FireAdjust,0.05); } function AltFire( float Value ) From 65b1bd5006f18dec7adddb1c0c6ccc4a49b08b96 Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Mon, 9 Nov 2020 11:37:13 +0100 Subject: [PATCH 06/17] Fix SetForcedTeamSkins Parameters --- Classes/bbPlayer.uc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/bbPlayer.uc b/Classes/bbPlayer.uc index 8100eb9a..09c229ef 100644 --- a/Classes/bbPlayer.uc +++ b/Classes/bbPlayer.uc @@ -3006,11 +3006,11 @@ exec function setForcedSkins(int maleSkin, int femaleSkin) { exec function setForcedTeamSkins(int maleSkin, int femaleSkin) { local bool error; - if (maleSkin < 0 || maleSkin > 17) { + if (maleSkin < 0 || maleSkin > 18) { ClientMessage("Invalid maleSkin, please input a value between 1 and 18"); error = true; } - if (femaleSkin < 0 || femaleSkin > 17) { + if (femaleSkin < 0 || femaleSkin > 18) { ClientMessage("Invalid femaleSkin, please input a value between 1 and 18"); error = true; } From 0b0e118ca5ca2ea0cf8f21f8546ca2d281fa0aaa Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Tue, 10 Nov 2020 08:35:10 +0100 Subject: [PATCH 07/17] Allow selective disabling of forced skins through console --- Classes/bbPlayer.uc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Classes/bbPlayer.uc b/Classes/bbPlayer.uc index 09c229ef..e4e70354 100644 --- a/Classes/bbPlayer.uc +++ b/Classes/bbPlayer.uc @@ -2984,12 +2984,12 @@ exec function enableHitSounds(bool b) { exec function setForcedSkins(int maleSkin, int femaleSkin) { local bool error; - if (maleSkin <= 0 || maleSkin > 18) { - ClientMessage("Invalid maleSkin, please input a value between 1 and 18"); + if (maleSkin < -1 || maleSkin == 0 || maleSkin > 18) { + ClientMessage("Invalid maleSkin, please input a value between 1 and 18, or -1 to disable"); error = true; } - if (femaleSkin <= 0 || femaleSkin > 18) { - ClientMessage("Invalid femaleSkin, please input a value between 1 and 18"); + if (femaleSkin < -1 || femaleSkin == 0 || femaleSkin > 18) { + ClientMessage("Invalid femaleSkin, please input a value between 1 and 18, or -1 to disable"); error = true; } @@ -3006,12 +3006,12 @@ exec function setForcedSkins(int maleSkin, int femaleSkin) { exec function setForcedTeamSkins(int maleSkin, int femaleSkin) { local bool error; - if (maleSkin < 0 || maleSkin > 18) { - ClientMessage("Invalid maleSkin, please input a value between 1 and 18"); + if (maleSkin < -1 || maleSkin == 0 || maleSkin > 18) { + ClientMessage("Invalid maleSkin, please input a value between 1 and 18, or -1 to disable"); error = true; } - if (femaleSkin < 0 || femaleSkin > 18) { - ClientMessage("Invalid femaleSkin, please input a value between 1 and 18"); + if (femaleSkin < -1 || femaleSkin == 0 || femaleSkin > 18) { + ClientMessage("Invalid femaleSkin, please input a value between 1 and 18, or -1 to disable"); error = true; } From cad337ca050be1e9add7059e512e2d5a11c5af39 Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Sat, 28 Nov 2020 21:32:00 +0100 Subject: [PATCH 08/17] Force SmoothMaskedTexture Off --- Classes/bbPlayer.uc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Classes/bbPlayer.uc b/Classes/bbPlayer.uc index e4e70354..00bc95fb 100644 --- a/Classes/bbPlayer.uc +++ b/Classes/bbPlayer.uc @@ -5467,6 +5467,8 @@ function xxPlayerTickEvents() if (Level.NetMode == NM_Client) { + ConsoleCommand("set ini:engine.engine.gamerenderdevice SmoothMaskedTextures False"); + if (!zzbInitialized) { zzbInitialized = true; From a352bfc7a1e71dcc2f25d766e7d0da97c5330dc6 Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Sat, 28 Nov 2020 23:14:55 +0100 Subject: [PATCH 09/17] Document SmoothMaskedTexture Hack --- Classes/bbPlayer.uc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Classes/bbPlayer.uc b/Classes/bbPlayer.uc index 00bc95fb..ccbcecf8 100644 --- a/Classes/bbPlayer.uc +++ b/Classes/bbPlayer.uc @@ -5467,6 +5467,8 @@ function xxPlayerTickEvents() if (Level.NetMode == NM_Client) { + // SmoothMaskedTextures makes certain textures see-through + // --> force it off ConsoleCommand("set ini:engine.engine.gamerenderdevice SmoothMaskedTextures False"); if (!zzbInitialized) From f268a04831f935593d0c318fec702184518d7cb0 Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Sat, 28 Nov 2020 23:15:17 +0100 Subject: [PATCH 10/17] Change UI Version to 5C --- Classes/UTPure.uc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/UTPure.uc b/Classes/UTPure.uc index 2b83cb14..496ba3ef 100644 --- a/Classes/UTPure.uc +++ b/Classes/UTPure.uc @@ -1380,8 +1380,8 @@ defaultproperties ThrowVelocity=750 VersionStr="IG+" LongVersion="" - ThisVer="5B" - NiceVer="5B" + ThisVer="5C" + NiceVer="5C" BADminText="Not allowed - Log in as admin!" bAlwaysTick=True NNAnnouncer=True From 5357f72c26ee3510ac2e6b85ede50a0979a46f1c Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Sat, 28 Nov 2020 23:15:40 +0100 Subject: [PATCH 11/17] Change Default bEnableJitterBounding to False --- Classes/UTPure.uc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/UTPure.uc b/Classes/UTPure.uc index 496ba3ef..ec5a1640 100644 --- a/Classes/UTPure.uc +++ b/Classes/UTPure.uc @@ -1395,7 +1395,7 @@ defaultproperties bRestrictTrading=True MaxTradeTimeMargin=0.1 bEnableServerExtrapolation=True - bEnableJitterBounding=True + bEnableJitterBounding=False KillCamDelay=0.0 KillCamDuration=2.0 bJumpingPreservesMomentum=False From 3359c96887111101cacb613941d5367841afc5ef Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Sat, 28 Nov 2020 23:15:58 +0100 Subject: [PATCH 12/17] Change Default bEnableSingleButtonDodge to False --- Classes/UTPure.uc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/UTPure.uc b/Classes/UTPure.uc index ec5a1640..446b9925 100644 --- a/Classes/UTPure.uc +++ b/Classes/UTPure.uc @@ -1399,5 +1399,5 @@ defaultproperties KillCamDelay=0.0 KillCamDuration=2.0 bJumpingPreservesMomentum=False - bEnableSingleButtonDodge=True + bEnableSingleButtonDodge=False } From ab96b574afb1454fd29eb58fd43a59977a827b63 Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Mon, 26 Oct 2020 12:24:54 +0100 Subject: [PATCH 13/17] No Ducking In Air --- Classes/bbPlayer.uc | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/Classes/bbPlayer.uc b/Classes/bbPlayer.uc index ccbcecf8..316ea4ec 100644 --- a/Classes/bbPlayer.uc +++ b/Classes/bbPlayer.uc @@ -3314,21 +3314,22 @@ simulated function bool ClientAdjustHitLocation(out vector HitLocation, vector T TraceDir = Normal(TraceDir); - if ( (GetAnimGroup(AnimSequence) == 'Ducking') && (AnimFrame > -0.03) ) + if ( (Physics == PHYS_Walking) && (GetAnimGroup(AnimSequence) == 'Ducking') && (AnimFrame > -0.03) ) { - maxZ = Location.Z + 0.3 * CollisionHeight; // default value is 0.3 - if ( HitLocation.Z > maxZ ) - { - if ( TraceDir.Z >= 0 ) - return false; - adjZ = (maxZ - HitLocation.Z)/TraceDir.Z; - HitLocation.Z = maxZ; - HitLocation.X = HitLocation.X + TraceDir.X * adjZ; - HitLocation.Y = HitLocation.Y + TraceDir.Y * adjZ; - delta = (HitLocation - Location) * vect(1,1,0); - if (delta dot delta > CollisionRadius * CollisionRadius) - return false; - } + maxZ = Location.Z + 0.3 * CollisionHeight; // default game is 0.25 + if ( HitLocation.Z <= maxZ ) + return true; + + if ( TraceDir.Z >= 0 ) + return false; + + adjZ = (maxZ - HitLocation.Z)/TraceDir.Z; + HitLocation.Z = maxZ; + HitLocation.X = HitLocation.X + TraceDir.X * adjZ; + HitLocation.Y = HitLocation.Y + TraceDir.Y * adjZ; + delta = (HitLocation - Location) * vect(1,1,0); + if (delta dot delta > CollisionRadius * CollisionRadius) + return false; } return true; } From 60568afb6e3d6f47a0c6c1f7a258e06afe68fbd2 Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Thu, 5 Nov 2020 14:03:17 +0100 Subject: [PATCH 14/17] Improve crosshair accuracy for spectators --- Classes/bbCHSpectator.uc | 13 +++++++++++-- Classes/bbPlayer.uc | 19 ++++++++++--------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/Classes/bbCHSpectator.uc b/Classes/bbCHSpectator.uc index 18220fbc..69bac86b 100644 --- a/Classes/bbCHSpectator.uc +++ b/Classes/bbCHSpectator.uc @@ -415,6 +415,7 @@ event PostRender( canvas Canvas ) event PlayerCalcView(out actor ViewActor, out vector CameraLocation, out rotator CameraRotation ) { local Pawn PTarget; + local bbPlayer bbP; if ( ViewTarget != None ) { @@ -426,8 +427,16 @@ event PlayerCalcView(out actor ViewActor, out vector CameraLocation, out rotator { if ( Level.NetMode == NM_Client ) { - if ( PTarget.bIsPlayer ) - PTarget.ViewRotation = TargetViewRotation; + if ( PTarget.bIsPlayer ) { + bbP = bbPlayer(PTarget); + if (bbP != none) { + PTarget.ViewRotation.Pitch = bbP.CompressedViewRotation >>> 16; + PTarget.ViewRotation.Yaw = bbP.CompressedViewRotation & 0xFFFF; + PTarget.ViewRotation.Roll = 0; + } else { + PTarget.ViewRotation = TargetViewRotation; + } + } PTarget.EyeHeight = TargetEyeHeight; if ( PTarget.Weapon != None ) PTarget.Weapon.PlayerViewOffset = TargetWeaponViewOffset; diff --git a/Classes/bbPlayer.uc b/Classes/bbPlayer.uc index 316ea4ec..f73a63ff 100644 --- a/Classes/bbPlayer.uc +++ b/Classes/bbPlayer.uc @@ -3109,7 +3109,7 @@ function xxCalcBehindView(out vector CameraLocation, out rotator CameraRotation, event PlayerCalcView(out actor ViewActor, out vector CameraLocation, out rotator CameraRotation ) { local Pawn PTarget; - local bbPlayer bbTarg; + local bbPlayer bbP; if (zzInfoThing != None) zzInfoThing.zzPlayerCalcViewCalls--; @@ -3120,16 +3120,19 @@ event PlayerCalcView(out actor ViewActor, out vector CameraLocation, out rotator CameraLocation = ViewTarget.Location; CameraRotation = ViewTarget.Rotation; PTarget = Pawn(ViewTarget); - bbTarg = bbPlayer(ViewTarget); if ( PTarget != None ) { if ( Level.NetMode == NM_Client ) { - if ( PTarget.bIsPlayer ) - { - if (bbTarg != None) - bbTarg.ViewRotation = TargetViewRotation; - PTarget.ViewRotation = TargetViewRotation; + if ( PTarget.bIsPlayer ) { + bbP = bbPlayer(PTarget); + if (bbp != none) { + PTarget.ViewRotation.Pitch = bbP.CompressedViewRotation >>> 16; + PTarget.ViewRotation.Yaw = bbP.CompressedViewRotation & 0xFFFF; + PTarget.ViewRotation.Roll = 0; + } else { + PTarget.ViewRotation = TargetViewRotation; + } } PTarget.EyeHeight = TargetEyeHeight; if ( PTarget.Weapon != None ) @@ -3159,8 +3162,6 @@ event PlayerCalcView(out actor ViewActor, out vector CameraLocation, out rotator CameraRotation.Roll = 0; EyeHeight = zzRepVREye; } - else if (zzInfoThing != None && zzInfoThing.zzPlayerCalcViewCalls == zzNull) - CameraRotation = ViewRotation; else CameraRotation = ViewRotation; CameraLocation.Z += EyeHeight; From e4af0719ff22d5e8db2fbc619038c309f7343752 Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Mon, 9 Nov 2020 13:50:07 +0100 Subject: [PATCH 15/17] BehindView is calculated from Eyes, instead of Center --- Classes/bbCHSpectator.uc | 28 ++++++++++++++++++++-------- Classes/bbPlayer.uc | 18 ++++++++---------- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/Classes/bbCHSpectator.uc b/Classes/bbCHSpectator.uc index 69bac86b..113c23ed 100644 --- a/Classes/bbCHSpectator.uc +++ b/Classes/bbCHSpectator.uc @@ -411,6 +411,20 @@ event PostRender( canvas Canvas ) } } +function xxCalcBehindView(out vector CameraLocation, out rotator CameraRotation, float Dist) +{ + local vector View,HitLocation,HitNormal; + local float ViewDist; + + CameraRotation = ViewRotation; + View = vect(1,0,0) >> CameraRotation; + if( Trace( HitLocation, HitNormal, CameraLocation - (Dist + 30) * vector(CameraRotation), CameraLocation ) != None ) + ViewDist = FMin( (CameraLocation - HitLocation) Dot View, Dist ); + else + ViewDist = Dist; + CameraLocation -= (ViewDist - 30) * View; +} + // Fix the "roll" (upside/sideway view) bug. event PlayerCalcView(out actor ViewActor, out vector CameraLocation, out rotator CameraRotation ) { @@ -443,26 +457,24 @@ event PlayerCalcView(out actor ViewActor, out vector CameraLocation, out rotator } if ( PTarget.bIsPlayer ) CameraRotation = PTarget.ViewRotation; - if ( !bBehindView ) - CameraLocation.Z += PTarget.EyeHeight; + CameraLocation.Z += PTarget.EyeHeight; } CameraRotation.Roll = 0; if ( bBehindView ) - CalcBehindView(CameraLocation, CameraRotation, 180); + xxCalcBehindView(CameraLocation, CameraRotation, 180); return; } ViewActor = Self; CameraLocation = Location; + CameraLocation.Z += EyeHeight; - if( bBehindView ) //up and behind - CalcBehindView(CameraLocation, CameraRotation, 150); - else - { + if( bBehindView ) { //up and behind + xxCalcBehindView(CameraLocation, CameraRotation, 150); + } else { // First-person view. CameraRotation = ViewRotation; - CameraLocation.Z += EyeHeight; CameraLocation += WalkBob; } } diff --git a/Classes/bbPlayer.uc b/Classes/bbPlayer.uc index f73a63ff..ecd90315 100644 --- a/Classes/bbPlayer.uc +++ b/Classes/bbPlayer.uc @@ -3140,8 +3140,7 @@ event PlayerCalcView(out actor ViewActor, out vector CameraLocation, out rotator } if ( PTarget.bIsPlayer ) CameraRotation = PTarget.ViewRotation; - if ( !bBehindView ) - CameraLocation.Z += PTarget.EyeHeight; + CameraLocation.Z += PTarget.EyeHeight; } if ( bBehindView ) xxCalcBehindView(CameraLocation, CameraRotation, 180); @@ -3150,21 +3149,20 @@ event PlayerCalcView(out actor ViewActor, out vector CameraLocation, out rotator ViewActor = Self; CameraLocation = Location; + CameraLocation.Z += EyeHeight; - if( bBehindView ) //up and behind + if( bBehindView ) { //up and behind xxCalcBehindView(CameraLocation, CameraRotation, 150); - else - { - if (zzbRepVRData) - { // Received data through demo replication. + } else { + if (zzbRepVRData) { + // Received data through demo replication. CameraRotation.Yaw = zzRepVRYaw; CameraRotation.Pitch = zzRepVRPitch; CameraRotation.Roll = 0; EyeHeight = zzRepVREye; - } - else + } else { CameraRotation = ViewRotation; - CameraLocation.Z += EyeHeight; + } CameraLocation += WalkBob; } } From de96b58deb188939d2f4ca9831ba7a59c02eb26b Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Mon, 30 Nov 2020 01:19:13 +0100 Subject: [PATCH 16/17] Fix Slow Flip When Forcing Models --- Classes/bbPlayer.uc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/bbPlayer.uc b/Classes/bbPlayer.uc index ecd90315..c2fbc348 100644 --- a/Classes/bbPlayer.uc +++ b/Classes/bbPlayer.uc @@ -5771,12 +5771,12 @@ event PreRender( canvas zzCanvas ) if (GameReplicationInfo.bTeamGame && PlayerReplicationInfo.Team == zzPRI.Team) { if (Settings.DesiredTeamSkinFemale > 8 && zzPRI.bIsFemale) zzPRI.Owner.AnimRate = 1.35*1.55 * FMax(0.35, zzPRI.Owner.Region.Zone.ZoneGravity.Z/zzPRI.Owner.Region.Zone.Default.ZoneGravity.Z); - else if (Settings.DesiredTeamSkin <= 8 && zzPRI.bIsFemale == false) + else if (Settings.DesiredTeamSkin >= 0 && Settings.DesiredTeamSkin <= 8 && zzPRI.bIsFemale == false) zzPRI.Owner.AnimRate = 1.35/1.55 * FMax(0.35, zzPRI.Owner.Region.Zone.ZoneGravity.Z/zzPRI.Owner.Region.Zone.Default.ZoneGravity.Z); } else { if (Settings.DesiredSkinFemale > 8 && zzPRI.bIsFemale) zzPRI.Owner.AnimRate = 1.35*1.55 * FMax(0.35, zzPRI.Owner.Region.Zone.ZoneGravity.Z/zzPRI.Owner.Region.Zone.Default.ZoneGravity.Z); - else if (Settings.DesiredSkin <= 8 && zzPRI.bIsFemale == false) + else if (Settings.DesiredSkin >= 0 && Settings.DesiredSkin <= 8 && zzPRI.bIsFemale == false) zzPRI.Owner.AnimRate = 1.35/1.55 * FMax(0.35, zzPRI.Owner.Region.Zone.ZoneGravity.Z/zzPRI.Owner.Region.Zone.Default.ZoneGravity.Z); } } From 47783266d5d27381d8c771a80d9da348d217e251 Mon Sep 17 00:00:00 2001 From: Lukas Bagaric Date: Mon, 30 Nov 2020 16:44:31 +0100 Subject: [PATCH 17/17] Fix FPS Drops --- Classes/bbPlayer.uc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Classes/bbPlayer.uc b/Classes/bbPlayer.uc index c2fbc348..9cf0c822 100644 --- a/Classes/bbPlayer.uc +++ b/Classes/bbPlayer.uc @@ -5467,9 +5467,11 @@ function xxPlayerTickEvents() if (Level.NetMode == NM_Client) { - // SmoothMaskedTextures makes certain textures see-through - // --> force it off - ConsoleCommand("set ini:engine.engine.gamerenderdevice SmoothMaskedTextures False"); + if (ConsoleCommand("get ini:engine.engine.gamerenderdevice SmoothMaskedTextures") ~= "true") { + // SmoothMaskedTextures makes certain textures see-through + // --> force it off + ConsoleCommand("set ini:engine.engine.gamerenderdevice SmoothMaskedTextures False"); + } if (!zzbInitialized) {