From 5c3c1b528a77cb77f71ee3d4dcacdaf84f8a98dc Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Thu, 20 Jan 2022 18:41:02 +0400 Subject: [PATCH 01/15] added default config file --- Configs/NicePack.ini | 54 ++++++++++++++++++++++++++++ Docs/Compile Scripts/Compilation.bat | 2 +- README.md | 6 +++- 3 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 Configs/NicePack.ini diff --git a/Configs/NicePack.ini b/Configs/NicePack.ini new file mode 100644 index 0000000..0f17c7e --- /dev/null +++ b/Configs/NicePack.ini @@ -0,0 +1,54 @@ +[NicePack.NicePack] +bScaleZedHealth=True +bReplacePickups=True +bInitialTrader=True +bStillDuringInitTrader=False +initialTraderTime=10 +bUseProgresiveCash=True +startupCashBeg=500 +startupCashNormal=500 +startupCashHard=500 +startupCashSui=400 +startupCashHOE=400 +waveCashBeg=350 +waveCashNormal=300 +waveCashHard=200 +waveCashSui=150 +waveCashHOE=150 +bConvertExp=True +vetFieldMedicExpCost=2.000000 +vetFieldMedicDmgExpCost=0.025000 +vetSharpHeadshotExpCost=10.000000 +vetSupportDamageExpCost=0.050000 +vetCommandoDamageExpCost=0.050000 +vetDemoDamageExpCost=0.050000 +vetZerkDamageExpCost=0.050000 +vetHeavyMGDamageExpCost=0.050000 +vetGunslingerKillExpCost=20.000000 +bAlwaysAllowSkillChange=False +minSpawnRate=0.200000 +maxSpawnRate=0.200000 +minimalSpawnDistance=1200 +bOneFFIncOnly=False +bNoLateFFIncrease=True +bReplaceCrawler=True +bReplaceStalker=True +bReplaceClot=True +bReplaceGorefast=True +bReplaceBloat=True +bReplaceSiren=True +bReplaceHusk=True +bReplaceScrake=True +bReplaceFleshpound=True +lateMultiplier=0.500000 +BigZedMinHealth=1000 +MediumZedMinHealth=500 +waveCash=800 +waveCash=750 +waveCash=600 +waveCash=500 +waveCash=450 +waveCash=350 +waveCash=250 +waveCash=100000 + diff --git a/Docs/Compile Scripts/Compilation.bat b/Docs/Compile Scripts/Compilation.bat index beee2f8..84dee26 100644 --- a/Docs/Compile Scripts/Compilation.bat +++ b/Docs/Compile Scripts/Compilation.bat @@ -2,7 +2,7 @@ Title=Compilation set PACKAGE="NicePack" -@REM set SOURCES="C:\Users\Shtoyan\Documents\NicePack" +@REM set SOURCES="D:\Games\SteamLibrary\steamapps\common\KillingFloor\NicePack" set SOURCES="C:\Users\dkanu\OneDrive\Documents\Programming projects\Killing floor\NicePack\project" set DIR_COMPILE="C:\Program Files (x86)\Steam\steamapps\common\KillingFloor" diff --git a/README.md b/README.md index 9d610e7..4ce1668 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,11 @@ This repo contains sources for the last public NicePack release. It is a haphazard bunch of changes that were made to customize ScrN for ourselves. It is unfinished, but due to some reasons I don't want to release it publicly anymore. -The link to the compiled NicePack, along with all necessary files, is here: +The link to the compiled NicePack, along with all necessary files, is here: + +## Config Files + +Only 1 file atm: [NicePack.ini](Configs/NicePack.ini) ## Changelog From 132f4f2d2d1723cb687c7746bb423f3ef4f94190 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Thu, 20 Jan 2022 18:46:28 +0400 Subject: [PATCH 02/15] steves dont log spam about "jump" anim --- sources/Zeds/Nice/NiceZombieCrawlerBase.uc | 27 +++++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/sources/Zeds/Nice/NiceZombieCrawlerBase.uc b/sources/Zeds/Nice/NiceZombieCrawlerBase.uc index 1b16d19..a56ead9 100644 --- a/sources/Zeds/Nice/NiceZombieCrawlerBase.uc +++ b/sources/Zeds/Nice/NiceZombieCrawlerBase.uc @@ -156,16 +156,31 @@ defaultproperties WalkAnims(1)="ZombieScuttleB" WalkAnims(2)="ZombieScuttleL" WalkAnims(3)="ZombieScuttleR" - AirAnims(0)="ZombieSpring" - AirAnims(1)="ZombieSpring" - AirAnims(2)="ZombieSpring" - AirAnims(3)="ZombieSpring" + // steves dont have "jump" animation + // https://github.com/poosh/KF-ScrnZedPack/blob/master/Classes/ZedBaseCrawler.uc + AirAnims(0)="ZombieLeapIdle" + AirAnims(1)="ZombieLeapIdle" + AirAnims(2)="ZombieLeapIdle" + AirAnims(3)="ZombieLeapIdle" TakeoffAnims(0)="ZombieSpring" TakeoffAnims(1)="ZombieSpring" TakeoffAnims(2)="ZombieSpring" TakeoffAnims(3)="ZombieSpring" - AirStillAnim="ZombieSpring" - TakeoffStillAnim="ZombieLeapIdle" + LandAnims(0)="Landed" + LandAnims(1)="Landed" + LandAnims(2)="Landed" + LandAnims(3)="Landed" + // these should not use but just in case + DoubleJumpAnims(0)="ZombieSpring" + DoubleJumpAnims(1)="ZombieSpring" + DoubleJumpAnims(2)="ZombieSpring" + DoubleJumpAnims(3)="ZombieSpring" + DodgeAnims(0)="ZombieSpring" + DodgeAnims(1)="ZombieSpring" + DodgeAnims(2)="ZombieSpring" + DodgeAnims(3)="ZombieSpring" + AirStillAnim="Jump2" + TakeoffStillAnim="ZombieSpring" IdleCrouchAnim="ZombieLeapIdle" IdleWeaponAnim="ZombieLeapIdle" IdleRestAnim="ZombieLeapIdle" From 0cb0b2842b06de673c17ccbb989b54bdd1e30c45 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Thu, 20 Jan 2022 18:58:10 +0400 Subject: [PATCH 03/15] siren doesn't spawn emitter on death --- sources/Zeds/Nice/NiceZombieSiren.uc | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/sources/Zeds/Nice/NiceZombieSiren.uc b/sources/Zeds/Nice/NiceZombieSiren.uc index f361024..8d5f6ae 100644 --- a/sources/Zeds/Nice/NiceZombieSiren.uc +++ b/sources/Zeds/Nice/NiceZombieSiren.uc @@ -445,6 +445,32 @@ static simulated function PreCacheMaterials(LevelInfo myLevel) myLevel.AddPrecacheMaterial(Texture'KF_Specimens_Trip_T.siren_hair'); myLevel.AddPrecacheMaterial(Material'KF_Specimens_Trip_T.siren_hair_fb'); } + + +// DEAD sirens can NOT spawn scream emitter +simulated function PlayDying(class DamageType, vector HitLoc) +{ + super.PlayDying(DamageType, HitLoc); + + // yea, stop all animations on dead zed + StopAnimating(); +} + + +state ZombieDying +{ +ignores AnimEnd, Trigger, Bump, HitWall, HeadVolumeChange, PhysicsVolumeChange, Falling, BreathTimer, Died, RangedAttack; + + simulated function BeginState() + { + // yea, stop all animations on dead zed + StopAnimating(); + + super.BeginState(); + } +} + + defaultproperties { screamTimings(0)=0.420000 From 7af1e7bc4e60a724d0a32f52343793c7a6536a69 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Thu, 20 Jan 2022 19:11:51 +0400 Subject: [PATCH 04/15] new lobby footer from base class --- sources/GUI/NiceLobbyFooter.uc | 446 +++++++++++++++++++++++++++++++-- 1 file changed, 430 insertions(+), 16 deletions(-) diff --git a/sources/GUI/NiceLobbyFooter.uc b/sources/GUI/NiceLobbyFooter.uc index 623dd6f..ac2c0f8 100644 --- a/sources/GUI/NiceLobbyFooter.uc +++ b/sources/GUI/NiceLobbyFooter.uc @@ -1,23 +1,437 @@ -class NiceLobbyFooter extends ScrnLobbyFooter; +// base class, not vanilla +class NiceLobbyFooter extends ButtonFooter; + + +const MidGameMenuString="NicePack.NiceInvasionLoginMenu"; + +var automated GUIButton b_Menu, b_MapVote, b_KickVote, b_Ready, b_ViewMap, b_Cancel; +var string ReadyString, UnreadyString; + + +function bool InternalOnPreDraw(Canvas C) +{ + if (PlayerOwner().GameReplicationInfo != none) + { + // disable view map if its not a lobby state + if (!PlayerOwner().GameReplicationInfo.bMatchHasBegun) + b_ViewMap.EnableMe(); + else + b_ViewMap.DisableMe(); + } + + // ready-unready text switch + if (PlayerOwner().PlayerReplicationInfo != none && PlayerOwner().PlayerReplicationInfo.bReadyToPlay) + b_Ready.Caption = UnreadyString; + else + b_Ready.Caption = ReadyString; + + return super.InternalOnPreDraw(C); +} + + +// took poosh ScrnLobbyFooter as a reference +// 1. overrided to position buttons by TabOrder +// 2. moved some buttons to left side +function PositionButtons(Canvas C) +{ + local int j; + local GUIButton b; + local array buttonsLEFT, buttonsRIGHT; + local float x, s, m; + + s = GetSpacer(); + m = GetMargin() / 2; + x = ActualLeft() + ActualWidth() - m; + // position the Disconnect button on the left, others on the right + + // right buttons + buttonsRIGHT = GetButtons(false); + for (j = buttonsRIGHT.length - 1; j >= 0; --j) + { + b = buttonsRIGHT[j]; + x -= b.ActualWidth(); + b.WinLeft = b.RelativeLeft(x, true); + x -= s; + } + + // left buttons + buttonsLEFT = GetButtons(true); + for (j = 0; j < buttonsLEFT.length; j++) + { + b = buttonsLEFT[j]; + b.WinLeft = b.RelativeLeft(m, true); + m += b.ActualWidth(); + m += s; + } +} + + +final private function array GetButtons(optional bool bLEFTSIDED) +{ + local int i, j; + local GUIButton b; + local array buttons; + + if (bLEFTSIDED) + { + for (i = 0; i < Controls.Length; ++i) + { + b = GUIButton(Controls[i]); + if (b != none && bIsButtonLeft(b) && b.bVisible) + { + // compare tab orders and kepp the array sorted + for (j = 0; j < buttons.length; ++j) + { + if (buttons[j].TabOrder >= b.TabOrder) + break; + } + // fill the array + buttons.insert(j, 1); + buttons[j] = b; + } + } + } + else + { + for (i = 0; i < Controls.Length; ++i) + { + b = GUIButton(Controls[i]); + if (b != none && !bIsButtonLeft(b) && b.bVisible) + { + // compare tab orders and kepp the array sorted + for (j = 0; j < buttons.length; ++j) + { + if (buttons[j].TabOrder >= b.TabOrder) + break; + } + // fill the array + buttons.insert(j, 1); + buttons[j] = b; + } + } + } + + return buttons; +} + + +// which buttons are left sided +final private function bool bIsButtonLeft(GUIButton b) +{ + // mapvote, kickvote and main menu must be on left side + if (b == b_MapVote || b == b_KickVote || b == b_Menu) + return true; + + return false; +} + + +function bool ButtonsSized(Canvas C) +{ + local int i; + local GUIButton b; + local bool bResult; + local string str; + local float T, AH, AT; + + if (!bPositioned) + return false; + + bResult = true; + str = GetLongestCaption(C); + + AH = ActualHeight(); + AT = ActualTop(); + + for (i = 0; i < Controls.Length; i++) + { + b = GUIButton(Controls[i]); + if (b != none) + { + if (bAutoSize && bFixedWidth) + { + if (b.Caption == "") + b.SizingCaption = Left(str, Len(str) / 2); + else + b.SizingCaption = str; + } + else + b.SizingCaption = ""; + + bResult = bResult && b.bPositioned; + if (bFullHeight) + b.WinHeight = b.RelativeHeight(AH, true); + else + b.WinHeight = b.RelativeHeight(ActualHeight(ButtonHeight), true); + + switch (Justification) + { + case TXTA_Left: + T = ClientBounds[1]; + break; + + case TXTA_Center: + T = (AT + AH / 2) - (b.ActualHeight() / 2); + break; + + case TXTA_Right: + T = ClientBounds[3] - b.ActualHeight(); + break; + } + + //b.WinTop = AT + ((AH - ActualHeight(ButtonHeight)) / 2); + b.WinTop = b.RelativeTop(T, true) + ((WinHeight - ButtonHeight) / 2); + } + } + + return bResult; +} + + +function float GetButtonLeft() +{ + local int i; + local GUIButton b; + local float TotalWidth, AW, AL; + local float FooterMargin; + + AL = ActualLeft(); + AW = ActualWidth(); + FooterMargin = GetMargin(); + + for (i = 0; i < Controls.Length; i++) + { + b = GUIButton(Controls[i]); + if (b != none) + { + if (TotalWidth > 0) + TotalWidth += GetSpacer(); + + TotalWidth += b.ActualWidth(); + } + } + + if (Alignment == TXTA_Center) + return (AL + AW) / 2 - FooterMargin / 2 - TotalWidth / 2; + + if (Alignment == TXTA_Right) + return (AL + AW - FooterMargin / 2) - TotalWidth; + + return AL + (FooterMargin / 2); +} + + +// Finds the longest caption of all the buttons +function string GetLongestCaption(Canvas C) +{ + local int i; + local float XL, YL, LongestW; + local string str; + local GUIButton b; + + if (C == none) + return ""; + + for (i = 0; i < Controls.Length; i++) + { + b = GUIButton(Controls[i]); + if (b != none) + { + if (b.Style != none) + b.Style.TextSize(C, b.MenuState, b.Caption, XL, YL, b.FontScale); + else + C.StrLen( b.Caption, XL, YL ); + + if (LongestW == 0 || XL > LongestW) + { + str = b.Caption; + LongestW = XL; + } + } + } + + return str; +} + + function bool OnFooterClick(GUIComponent Sender) { - if (Sender == b_Perks){ - PlayerOwner().ClientOpenMenu(string(Class'NicePack.NiceInvasionLoginMenu'), false); - return false; - } - else if(Sender == b_ViewMap){ - if(KF_StoryGRI(PlayerOwner().Level.GRI) == none){ - LobbyMenu(PageOwner).bAllowClose = true; - PlayerOwner().ClientCloseMenu(true, false); - LobbyMenu(PageOwner).bAllowClose = false; - } - } - else if(Sender == b_Ready){ - return super(LobbyFooter).OnFooterClick(Sender); // bypass serverperks + local GUIController C; + local PlayerController PC; + + PC = PlayerOwner(); + C = Controller; + + // midgame menu + if (Sender == b_Menu) + { + PC.ClientOpenMenu(MidGameMenuString, false); + } + // ready-unready us + else if (Sender == b_Ready) + { + if (PC.Level.NetMode == NM_Standalone || !PC.PlayerReplicationInfo.bReadyToPlay) + { + if (KFPlayerController(PC) != none) + KFPlayerController(PC).SendSelectedVeterancyToServer(true); + + // Set Ready + PC.ServerRestartPlayer(); + PC.PlayerReplicationInfo.bReadyToPlay = True; + if (PC.Level.GRI.bMatchHasBegun) + PC.ClientCloseMenu(true, false); + + b_Ready.Caption = UnreadyString; } else - return super.OnFooterClick(Sender); + { + if (KFPlayerController(PC) != none) + { + KFPlayerController(PC).ServerUnreadyPlayer(); + PC.PlayerReplicationInfo.bReadyToPlay = false; + b_Ready.Caption = ReadyString; + } + } + } + // Kill Window and exit game / disconnect from server + else if (Sender == b_Cancel) + { + // change class to ours + NiceLobbyMenu(PageOwner).bAllowClose = true; + C.ViewportOwner.Console.ConsoleCommand("DISCONNECT"); + // Marco SP + PC.ClientCloseMenu(true, false); + C.AutoLoadMenus(); + } + // Spectate map while waiting for players to get ready + else if (Sender == b_ViewMap) + { + // change class to ours + NiceLobbyMenu(PageOwner).bAllowClose = true; + PC.ClientCloseMenu(true, false); + } + // open kick vote + else if (Sender == b_KickVote) + { + Controller.OpenMenu(Controller.KickVotingMenu); + } + // open map vote + else if (Sender == b_MapVote) + { + PC.ShowVoteMenu(); + } + + return false; } + + +function OnSteamStatsAndAchievementsReady() +{ + PlayerOwner().ClientOpenMenu("KFGUI.KFProfilePage", false); +} + + defaultproperties { -} + ReadyString="Ready" + UnreadyString="Unready" + OnPreDraw=NiceLobbyFooter.InternalOnPreDraw + + // LEFT buttons + Begin Object Class=GUIButton Name=MenuButton + Caption="Main Menu" + Hint="Open midgame menu." + WinTop=0.966146 + WinLeft=0.280000 + WinWidth=0.120000 + WinHeight=0.033203 + RenderWeight=2.000000 + TabOrder=0 + bBoundToParent=true + ToolTip=none + OnClick=NiceLobbyFooter.OnFooterClick + OnKeyEvent=Cancel.InternalOnKeyEvent + End Object + b_Menu=MenuButton + + Begin Object Class=GUIButton Name=MapVote + Caption="Map Vote" + Hint="Shortcut to map vote." + WinTop=0.966146 + WinLeft=1.500000 //-0.500000 + WinWidth=0.120000 + WinHeight=0.033203 + RenderWeight=2.000000 + TabOrder=1 + bBoundToParent=true + ToolTip=none + OnClick=NiceLobbyFooter.OnFooterClick + OnKeyEvent=Cancel.InternalOnKeyEvent + End Object + b_MapVote=MapVote + + Begin Object Class=GUIButton Name=KickVote + Caption="Kick Vote" + Hint="Shortcut to kick vote." + WinTop=0.966146 + WinLeft=-0.500000 + WinWidth=0.120000 + WinHeight=0.033203 + RenderWeight=2.000000 + TabOrder=2 + bBoundToParent=true + ToolTip=none + OnClick=NiceLobbyFooter.OnFooterClick + OnKeyEvent=Cancel.InternalOnKeyEvent + End Object + b_KickVote=KickVote + + // RIGHT buttons + Begin Object Class=GUIButton Name=ReadyButton + Caption="Ready" + Hint="Click to indicate you are ready to play" + WinTop=0.966146 + WinLeft=0.280000 + WinWidth=0.120000 + WinHeight=0.033203 + RenderWeight=2.000000 + TabOrder=3 + bBoundToParent=true + ToolTip=none + OnClick=NiceLobbyFooter.OnFooterClick + OnKeyEvent=ReadyButton.InternalOnKeyEvent + End Object + b_Ready=ReadyButton + + Begin Object Class=GUIButton Name=ViewMap + Caption="View Map" + Hint="Hover around while other players afk to death." + WinTop=0.966146 + WinLeft=-0.500000 + WinWidth=0.120000 + WinHeight=0.033203 + RenderWeight=2.000000 + TabOrder=4 + bBoundToParent=true + ToolTip=none + OnClick=NiceLobbyFooter.OnFooterClick + OnKeyEvent=Cancel.InternalOnKeyEvent + End Object + b_ViewMap=ViewMap + + Begin Object Class=GUIButton Name=Cancel + Caption="Disconnect" + Hint="Disconnect From This Server" + WinTop=0.966146 + WinLeft=-0.500000 + WinWidth=0.120000 + WinHeight=0.033203 + RenderWeight=2.000000 + TabOrder=5 + bBoundToParent=true + ToolTip=none + OnClick=NiceLobbyFooter.OnFooterClick + OnKeyEvent=Cancel.InternalOnKeyEvent + End Object + b_Cancel=Cancel +} \ No newline at end of file From 65371a7a5309990f8d62f1813456dc32b244da09 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Thu, 20 Jan 2022 21:19:11 +0400 Subject: [PATCH 05/15] SomeoneHasSkill - Accessed None 'Pawn' fix --- sources/Perks/NiceVeterancyTypes.uc | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/sources/Perks/NiceVeterancyTypes.uc b/sources/Perks/NiceVeterancyTypes.uc index d5ce02b..2282d0f 100644 --- a/sources/Perks/NiceVeterancyTypes.uc +++ b/sources/Perks/NiceVeterancyTypes.uc @@ -50,24 +50,35 @@ static function bool HasSkill(NicePlayerController nicePlayer, class return true; return false; } -static function bool SomeoneHasSkill(NicePlayerController player, class skill){ + +static function bool SomeoneHasSkill(NicePlayerController player, class skill) +{ local int i; local Controller P; local NicePlayerController nicePlayer; - if(player == none) + + if (player == none) return false; - if(player.Pawn.Role == ROLE_Authority) - for(P = player.Level.ControllerList; P != none; P = P.nextController){ + // added pawn check coz of log spam + if (player.Pawn != none && player.Pawn.Role == ROLE_Authority) + { + for(P = player.Level.ControllerList; P != none; P = P.nextController) + { nicePlayer = NicePlayerController(P); - if(nicePlayer != none && HasSkill(nicePlayer, skill) && nicePlayer.Pawn.Health > 0 && !nicePlayer.Pawn.bPendingDelete + if (nicePlayer != none && HasSkill(nicePlayer, skill) && nicePlayer.Pawn.Health > 0 && !nicePlayer.Pawn.bPendingDelete && nicePlayer.PlayerReplicationInfo.Team == player.PlayerReplicationInfo.Team) return true; - } - else for(i = 0;i < player.broadcastedSkills.Length;i ++) - if(player.broadcastedSkills[i] == skill) + } + } + else + { + for (i = 0;i < player.broadcastedSkills.Length;i ++) + if (player.broadcastedSkills[i] == skill) return true; + } return false; } + // Checks if player will automatically chose given skill at the next opportunity static function bool IsSkillPending(NicePlayerController nicePlayer, class skill){ local int i; From eda5d44fac28b777680030a0bc4b2dd829a96e6f Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Thu, 20 Jan 2022 21:28:18 +0400 Subject: [PATCH 06/15] Accessed None 'MyExtCollision' fix / new log --- sources/Zeds/NiceMonster.uc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/sources/Zeds/NiceMonster.uc b/sources/Zeds/NiceMonster.uc index 32fcb4e..31cc3f6 100644 --- a/sources/Zeds/NiceMonster.uc +++ b/sources/Zeds/NiceMonster.uc @@ -2130,6 +2130,27 @@ simulated function DisableCollisions() } +// Setters for extra collision cylinders +simulated function ToggleAuxCollision(bool newbCollision) +{ + if (MyExtCollision == none) + { + log(">> NiceMonster -> ToggleAuxCollision(" $ newbCollision $ ") -> MyExtCollision was none!!!"); + return; + } + + if (!newbCollision) + { + SavedExtCollision = MyExtCollision.bCollideActors; + MyExtCollision.SetCollision(false); + } + else + { + MyExtCollision.SetCollision(SavedExtCollision); + } +} + + defaultproperties { stunDurationMultiplier=0.5 From 410515b99d06e2be81ec8377df33e9c4f0742a9e Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Thu, 20 Jan 2022 21:37:47 +0400 Subject: [PATCH 07/15] MeanZombieBloat touch Accessed none fix --- sources/Zeds/Mean/MeanZombieBloat.uc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sources/Zeds/Mean/MeanZombieBloat.uc b/sources/Zeds/Mean/MeanZombieBloat.uc index 660a1a7..b0a4c56 100644 --- a/sources/Zeds/Mean/MeanZombieBloat.uc +++ b/sources/Zeds/Mean/MeanZombieBloat.uc @@ -23,12 +23,19 @@ simulated function Tick(float DeltaTime) { } } } -function Touch(Actor Other) { + +function Touch(Actor Other) +{ + if (Other == none) + return; + super.Touch(Other); - if (Other.IsA('ShotgunBullet')) { + if (Other.IsA('ShotgunBullet')) + { ShotgunBullet(Other).Damage = 0; } } + function RangedAttack(Actor A) { local int LastFireTime; if ( bShotAnim ) From c0de294c59d0472ae334e20012ed3d3a71f29f1a Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Thu, 20 Jan 2022 21:47:31 +0400 Subject: [PATCH 08/15] MeanZombieStalker Accessed None 'Controller' fix --- sources/Zeds/Mean/MeanZombieStalker.uc | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/sources/Zeds/Mean/MeanZombieStalker.uc b/sources/Zeds/Mean/MeanZombieStalker.uc index f302d94..cb84cd5 100644 --- a/sources/Zeds/Mean/MeanZombieStalker.uc +++ b/sources/Zeds/Mean/MeanZombieStalker.uc @@ -173,25 +173,34 @@ simulated function int AttackAndMoveDoAnimAction( name AnimName ) { } return super.DoAnimAction( AnimName ); } -function bool MeleeDamageTarget(int hitdamage, vector pushdir) { + +function bool MeleeDamageTarget(int hitdamage, vector pushdir) +{ local bool result; local float effectStrenght; local NiceHumanPawn targetPawn; - result = Super(NiceMonster).MeleeDamageTarget(hitdamage, pushdir); - targetPawn = NiceHumanPawn(Controller.Target); - if(result && targetPawn != none){ - if(targetPawn.ShieldStrength > 100) + + result = super(NiceMonster).MeleeDamageTarget(hitdamage, pushdir); + // if true means we checked ctlr and ctrl.target != none + if (result) + targetPawn = NiceHumanPawn(Controller.Target); + + if (result && targetPawn != none) + { + if (targetPawn.ShieldStrength > 100) return result; - else if(targetPawn.ShieldStrength < 0) + else if (targetPawn.ShieldStrength < 0) effectStrenght = 1.0; else effectStrenght = (100 - targetPawn.ShieldStrength) * 0.01; + class'MeanReplicationInfo'.static .findSZri(targetPawn.PlayerReplicationInfo) .setBleeding(Self, effectStrenght); } return result; } + function RemoveHead() { Super(NiceMonster).RemoveHead(); From 6b46ed69eaaaa4b46c27ac649dcc23fa1ad4575a Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Thu, 20 Jan 2022 22:00:51 +0400 Subject: [PATCH 09/15] no log spam when zeds damage you with ebr in hands --- .../SniperWeapons/M14EBR/NiceM14EBRAttachment.uc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sources/Weapons/Playable/SniperWeapons/M14EBR/NiceM14EBRAttachment.uc b/sources/Weapons/Playable/SniperWeapons/M14EBR/NiceM14EBRAttachment.uc index 6320825..51b931c 100644 --- a/sources/Weapons/Playable/SniperWeapons/M14EBR/NiceM14EBRAttachment.uc +++ b/sources/Weapons/Playable/SniperWeapons/M14EBR/NiceM14EBRAttachment.uc @@ -42,10 +42,11 @@ defaultproperties FireCrouchAltAnims(1)="CHFire_M14" FireCrouchAltAnims(2)="CHFire_M14" FireCrouchAltAnims(3)="CHFire_M14" - HitAnims(0)="HitF_M14" - HitAnims(1)="HitB_M14" - HitAnims(2)="HitL_M14" - HitAnims(3)="HitR_M14" + // was "HitF_M14" and was log spamming like hell + HitAnims(0)="HitR_M14_EBR" + HitAnims(1)="HitR_M14_EBR" + HitAnims(2)="HitR_M14_EBR" + HitAnims(3)="HitR_M14_EBR" PostFireBlendStandAnim="Blend_M14" PostFireBlendCrouchAnim="CHBlend_M14" MeshRef="KF_Weapons3rd2_Trip.M14_EBR_3rd" From 9d5fba534463c9ab11cf08bd21c253e9cdb9e030 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Thu, 20 Jan 2022 22:07:02 +0400 Subject: [PATCH 10/15] ClawDamageSingleTarget accessed none ctrl fix --- sources/Zeds/Nice/NiceZombieBrute.uc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sources/Zeds/Nice/NiceZombieBrute.uc b/sources/Zeds/Nice/NiceZombieBrute.uc index ddbae1c..6d5984b 100644 --- a/sources/Zeds/Nice/NiceZombieBrute.uc +++ b/sources/Zeds/Nice/NiceZombieBrute.uc @@ -232,6 +232,7 @@ function ClawDamageTarget() PlaySound(MeleeAttackHitSound, SLOT_Interact, 1.25); } } + function bool ClawDamageSingleTarget(float UsedMeleeDamage, Actor ThisTarget) { local Pawn HumanTarget; @@ -239,6 +240,11 @@ function bool ClawDamageSingleTarget(float UsedMeleeDamage, Actor ThisTarget) local bool bHitSomeone; local float EnemyAngle; local vector PushForceVar; + + // fix log spam + if (Controller == none || ThisTarget == none) + return false; + EnemyAngle = Normal(ThisTarget.Location - Location) dot vector(Rotation); if (EnemyAngle > 0) { @@ -272,6 +278,7 @@ function bool ClawDamageSingleTarget(float UsedMeleeDamage, Actor ThisTarget) } return bHitSomeone; } + function StartCharging() { // How many times should we hit before we cool down? From 3247720a46ca17370700e105705cf833d95d0f2b Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Thu, 20 Jan 2022 22:10:13 +0400 Subject: [PATCH 11/15] RemovePoisonAndBleed inv accessed none fix --- sources/NiceReplicationInfo.uc | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/sources/NiceReplicationInfo.uc b/sources/NiceReplicationInfo.uc index cc1d99e..9a07d35 100644 --- a/sources/NiceReplicationInfo.uc +++ b/sources/NiceReplicationInfo.uc @@ -182,21 +182,32 @@ simulated function HandleNiceHealingMechanicsAndSkills healed.bZedTimeInvincible = true; } } -simulated function RemovePoisonAndBleed(NiceHumanPawn healed){ + +simulated function RemovePoisonAndBleed(NiceHumanPawn healed) +{ local Inventory I; local MeanReplicationInfo MRI; + + // log spam fix + if (healed == none) + return; + // No bleeding MRI = class'MeanReplicationInfo'.static. findSZri(healed.PlayerReplicationInfo); - if(MRI != none) + if (MRI != none) MRI.stopBleeding(); // No poison - if(healed.inventory == none) return; - for(I = healed.inventory; I != none; I = I.inventory){ - if(MeanPoisonInventory(I) != none) + if (healed.inventory == none) + return; + + for (I = healed.inventory; I != none; I = I.inventory) + { + if (MeanPoisonInventory(I) != none) I.Destroy(); } } + // Tells server to heal given human pawn. simulated function ServerHealTarget(NiceHumanPawn healed, float charPotency, Pawn instigator){ From 692b66b9a68fc21e5c3c7b60927660c8f29dbe14 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Thu, 20 Jan 2022 22:23:07 +0400 Subject: [PATCH 12/15] Accessed None 'Killer' fix --- sources/Zeds/NiceMonster.uc | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/sources/Zeds/NiceMonster.uc b/sources/Zeds/NiceMonster.uc index 31cc3f6..509e782 100644 --- a/sources/Zeds/NiceMonster.uc +++ b/sources/Zeds/NiceMonster.uc @@ -536,16 +536,22 @@ simulated function NonRelevantSpeedupTick(float deltaTime){ SetGroundSpeed(GetOriginalGroundSpeed()); } } + // Kill zed if it has been bleeding long enough -simulated function BleedOutTick(float deltaTick){ - if(Role < ROLE_Authority || !bDecapitated) return; - if(BleedOutTime <= 0 || Level.TimeSeconds < BleedOutTime) return; - if(LastDamagedBy != none) - Died(LastDamagedBy.Controller, class'DamTypeBleedOut', Location); - else - Died(none, class'DamTypeBleedOut', Location); - BleedOutTime = 0; +simulated function BleedOutTick(float deltaTick) +{ + if (Role < ROLE_Authority || !bDecapitated) + return; + if (BleedOutTime <= 0 || Level.TimeSeconds < BleedOutTime) + return; + if (LastDamagedBy != none) + Died(LastDamagedBy.Controller, class'DamTypeBleedOut', Location); + // else we can say we killed ourselves, none -> self + else + Died(self, class'DamTypeBleedOut', Location); + BleedOutTime = 0; } + // FX-stuff TWI did in the tick, unchanged simulated function TWIFXTick(float deltaTime){ if(Level.netMode == NM_DedicatedServer) return; From 0f987e9a1e554f58f38f5a3d2e5d55079ba80a63 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Thu, 20 Jan 2022 23:51:49 +0400 Subject: [PATCH 13/15] another attempt to fix accessed none killer --- sources/Zeds/NiceMonster.uc | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/sources/Zeds/NiceMonster.uc b/sources/Zeds/NiceMonster.uc index 509e782..8047bc8 100644 --- a/sources/Zeds/NiceMonster.uc +++ b/sources/Zeds/NiceMonster.uc @@ -546,9 +546,10 @@ simulated function BleedOutTick(float deltaTick) return; if (LastDamagedBy != none) Died(LastDamagedBy.Controller, class'DamTypeBleedOut', Location); - // else we can say we killed ourselves, none -> self + // else we can say we killed ourselves, none -> controller (self) + // P.S. we really need to use Suicide here D: else - Died(self, class'DamTypeBleedOut', Location); + Died(controller, class'DamTypeBleedOut', Location); BleedOutTime = 0; } @@ -1083,19 +1084,27 @@ function DealBodyDamage(int damage, damageType, headshotLevel); MakeNoise(1.0); } + function Died( Controller killer, class damageType, - vector HitLocation){ - local bool bHasManiac; - local NiceHumanPawn nicePawn; - bHasManiac = class'NiceVeterancyTypes'.static. - HasSkill(NicePlayerController(killer), class'NiceSkillDemoManiac'); - nicePawn = NiceHumanPawn(killer.pawn); - if(bHasManiac && nicePawn != none) - nicePawn.maniacTimeout = - class'NiceSkillDemoManiac'.default.reloadBoostTime; - super.Died(killer, damageType, HitLocation); + vector HitLocation) +{ + local bool bHasManiac; + local NiceHumanPawn nicePawn; + + if (killer != none || (Controller != none && killer != Controller)) + { + bHasManiac = class'NiceVeterancyTypes'.static. + HasSkill(NicePlayerController(killer), class'NiceSkillDemoManiac'); + nicePawn = NiceHumanPawn(killer.pawn); + if (bHasManiac && nicePawn != none) + nicePawn.maniacTimeout = + class'NiceSkillDemoManiac'.default.reloadBoostTime; + } + + super.Died(killer, damageType, HitLocation); } + simulated function SetTearOffMomemtum(vector NewMomentum){ TearOffMomentum = NewMomentum; TearOffMomentumX = NewMomentum.X; From 0f98b8f6ea65b6164a6538215f4404525216cbb2 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Thu, 20 Jan 2022 23:57:29 +0400 Subject: [PATCH 14/15] UnCloakStalker accessed none Controller fixed --- sources/Zeds/Mean/MeanZombieStalker.uc | 11 +++++++---- sources/Zeds/Nice/NiceZombieStalker.uc | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/sources/Zeds/Mean/MeanZombieStalker.uc b/sources/Zeds/Mean/MeanZombieStalker.uc index cb84cd5..53111d2 100644 --- a/sources/Zeds/Mean/MeanZombieStalker.uc +++ b/sources/Zeds/Mean/MeanZombieStalker.uc @@ -77,13 +77,14 @@ simulated function CloakStalker() SetOverlayMaterial(Material'KFX.FBDecloakShader', 0.25, true); } } + simulated function UnCloakStalker() { - if( bZapped ) + if (bZapped) { return; } - if( !bCrispified ) + if (!bCrispified) { LastUncloakTime = Level.TimeSeconds; @@ -92,8 +93,9 @@ simulated function UnCloakStalker() bUnlit = false; // 25% chance of our Enemy saying something about us being invisible - if( Level.NetMode!=NM_Client && !KFGameType(Level.Game).bDidStalkerInvisibleMessage && FRand()<0.25 && Controller.Enemy!=none && - PlayerController(Controller.Enemy.Controller)!=none ) + // added Controller check here + if (Level.NetMode!=NM_Client && !KFGameType(Level.Game).bDidStalkerInvisibleMessage && FRand()<0.25 && Controller != none && Controller.Enemy!=none && + PlayerController(Controller.Enemy.Controller)!=none) { PlayerController(Controller.Enemy.Controller).Speech('AUTO', 17, ""); KFGameType(Level.Game).bDidStalkerInvisibleMessage = true; @@ -115,6 +117,7 @@ simulated function UnCloakStalker() } } } + simulated function SetZappedBehavior() { super(NiceMonster).SetZappedBehavior(); diff --git a/sources/Zeds/Nice/NiceZombieStalker.uc b/sources/Zeds/Nice/NiceZombieStalker.uc index 3e2c054..fc8ab30 100644 --- a/sources/Zeds/Nice/NiceZombieStalker.uc +++ b/sources/Zeds/Nice/NiceZombieStalker.uc @@ -115,13 +115,14 @@ simulated function CloakStalker() SetOverlayMaterial(Material'KFX.FBDecloakShader', 0.25, true); } } + simulated function UnCloakStalker() { - if( bZapped ) + if (bZapped) { return; } - if( !bCrispified ) + if (!bCrispified) { LastUncloakTime = Level.TimeSeconds; @@ -130,8 +131,9 @@ simulated function UnCloakStalker() bUnlit = false; // 25% chance of our Enemy saying something about us being invisible - if( Level.NetMode!=NM_Client && !KFGameType(Level.Game).bDidStalkerInvisibleMessage && FRand()<0.25 && Controller.Enemy!=none && - PlayerController(Controller.Enemy.Controller)!=none ) + // added Controller check here + if (Level.NetMode!=NM_Client && !KFGameType(Level.Game).bDidStalkerInvisibleMessage && FRand()<0.25 && Controller != none && Controller.Enemy!=none && + PlayerController(Controller.Enemy.Controller) != none ) { PlayerController(Controller.Enemy.Controller).Speech('AUTO', 17, ""); KFGameType(Level.Game).bDidStalkerInvisibleMessage = true; @@ -153,6 +155,7 @@ simulated function UnCloakStalker() } } } + // Set the zed to the zapped behavior simulated function SetZappedBehavior() { From 429a95b863d5b94f4f0209cb8049fe773f149576 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Fri, 21 Jan 2022 00:54:24 +0400 Subject: [PATCH 15/15] tabs -> x4 spaces --- .../Effects/NiceFreezeParticlesDirectional.uc | 2 +- sources/Effects/NiceIceChunkEmitter.uc | 4 +- sources/GUI/NiceGUIBuyMenu.uc | 242 +++++++++--------- .../Skills/NiceSkillSupportDiversity.uc | 2 +- .../PipeBombs/NiceDamTypePipeBomb.uc | 10 +- .../Playable/Grenades/NiceCryoNadeCloud.uc | 16 +- sources/Zeds/Nice/NiceDamTypePoundCrushed.uc | 2 +- sources/Zeds/NiceMonsterController.uc | 4 +- 8 files changed, 141 insertions(+), 141 deletions(-) diff --git a/sources/Effects/NiceFreezeParticlesDirectional.uc b/sources/Effects/NiceFreezeParticlesDirectional.uc index b24fd57..2cc6bce 100644 --- a/sources/Effects/NiceFreezeParticlesDirectional.uc +++ b/sources/Effects/NiceFreezeParticlesDirectional.uc @@ -1,7 +1,7 @@ // ScrN copy class NiceFreezeParticlesDirectional extends NiceFreezeParticlesBase; simulated function Trigger(Actor other, Pawn eventInstigator){ - emitters[0].SpawnParticle(1); + emitters[0].SpawnParticle(1); } defaultproperties { diff --git a/sources/Effects/NiceIceChunkEmitter.uc b/sources/Effects/NiceIceChunkEmitter.uc index a0effca..7464f82 100644 --- a/sources/Effects/NiceIceChunkEmitter.uc +++ b/sources/Effects/NiceIceChunkEmitter.uc @@ -1,8 +1,8 @@ class NiceIceChunkEmitter extends Emitter; var() array ImpactSounds; simulated function PostBeginPlay(){ - if(ImpactSounds.Length > 0) - PlaySound(ImpactSounds[Rand(ImpactSounds.Length)]); + if(ImpactSounds.Length > 0) + PlaySound(ImpactSounds[Rand(ImpactSounds.Length)]); } // NICETODO: change linksfrom HTeac_A to NicePackSM (and change that file) defaultproperties diff --git a/sources/GUI/NiceGUIBuyMenu.uc b/sources/GUI/NiceGUIBuyMenu.uc index 54d6540..a7a0202 100644 --- a/sources/GUI/NiceGUIBuyMenu.uc +++ b/sources/GUI/NiceGUIBuyMenu.uc @@ -1,87 +1,87 @@ class NiceGUIBuyMenu extends UT2k4MainPage; //The "Header" -var automated GUIImage HeaderBG_Left; -var automated GUIImage HeaderBG_Center; -var automated GUIImage HeaderBG_Right; -var automated GUILabel CurrentPerkLabel; -var automated GUILabel TimeLeftLabel; -var automated GUILabel WaveLabel; -var automated GUILabel HeaderBG_Left_Label; -var automated KFQuickPerkSelect QuickPerkSelect; +var automated GUIImage HeaderBG_Left; +var automated GUIImage HeaderBG_Center; +var automated GUIImage HeaderBG_Right; +var automated GUILabel CurrentPerkLabel; +var automated GUILabel TimeLeftLabel; +var automated GUILabel WaveLabel; +var automated GUILabel HeaderBG_Left_Label; +var automated KFQuickPerkSelect QuickPerkSelect; var automated KFBuyMenuFilter BuyMenuFilter; -var automated GUIButton StoreTabButton; -var automated GUIButton PerkTabButton; +var automated GUIButton StoreTabButton; +var automated GUIButton PerkTabButton; //The "Footer" -var automated GUIImage WeightBG; -var automated GUIImage WeightIcon; -var automated GUIImage WeightIconBG; -var automated KFWeightBar WeightBar; +var automated GUIImage WeightBG; +var automated GUIImage WeightIcon; +var automated GUIImage WeightIconBG; +var automated KFWeightBar WeightBar; //const BUYLIST_CATS =7; -var() editconst noexport float SavedPitch; -var color RedColor; -var color GreenGreyColor; -var() UT2K4TabPanel ActivePanel; -var localized string CurrentPerk; -var localized string NoActivePerk; -var localized string TraderClose; -var localized string WaveString; -var localized string LvAbbrString; +var() editconst noexport float SavedPitch; +var color RedColor; +var color GreenGreyColor; +var() UT2K4TabPanel ActivePanel; +var localized string CurrentPerk; +var localized string NoActivePerk; +var localized string TraderClose; +var localized string WaveString; +var localized string LvAbbrString; function InitComponent(GUIController MyC, GUIComponent MyO) { - local int i; - super.InitComponent(MyC, MyO); - c_Tabs.BackgroundImage = none; - c_Tabs.BackgroundStyle = none; - InitTabs(); - for ( i = 0; i < c_Tabs.TabStack.Length; i++ ) - { - c_Tabs.TabStack[i].bVisible = false; - } - UpdateWeightBar(); + local int i; + super.InitComponent(MyC, MyO); + c_Tabs.BackgroundImage = none; + c_Tabs.BackgroundStyle = none; + InitTabs(); + for ( i = 0; i < c_Tabs.TabStack.Length; i++ ) + { + c_Tabs.TabStack[i].bVisible = false; + } + UpdateWeightBar(); } function InitTabs() { - local int i; - for ( i = 0; i < PanelCaption.Length && i < PanelClass.Length && i < PanelHint.Length; i++ ) - { - c_Tabs.AddTab(PanelCaption[i], PanelClass[i],, PanelHint[i]); - } + local int i; + for ( i = 0; i < PanelCaption.Length && i < PanelClass.Length && i < PanelHint.Length; i++ ) + { + c_Tabs.AddTab(PanelCaption[i], PanelClass[i],, PanelHint[i]); + } } function UpdateWeightBar() { - if ( KFHumanPawn(PlayerOwner().Pawn) != none ) - { - WeightBar.MaxBoxes = KFHumanPawn(PlayerOwner().Pawn).MaxCarryWeight; - WeightBar.CurBoxes = KFHumanPawn(PlayerOwner().Pawn).CurrentWeight; - } + if ( KFHumanPawn(PlayerOwner().Pawn) != none ) + { + WeightBar.MaxBoxes = KFHumanPawn(PlayerOwner().Pawn).MaxCarryWeight; + WeightBar.CurBoxes = KFHumanPawn(PlayerOwner().Pawn).CurrentWeight; + } } event Opened(GUIComponent Sender) { - local rotator PlayerRot; - super.Opened(Sender); - c_Tabs.ActivateTabByName(PanelCaption[0], true); - // Tell the controller that he is on a shopping spree + local rotator PlayerRot; + super.Opened(Sender); + c_Tabs.ActivateTabByName(PanelCaption[0], true); + // Tell the controller that he is on a shopping spree if ( KFPlayerController(PlayerOwner()) != none ) - { + { KFPlayerController(PlayerOwner()).bShopping = true; } if ( KFWeapon(KFHumanPawn(PlayerOwner().Pawn).Weapon).bAimingRifle ) - { - KFWeapon(KFHumanPawn(PlayerOwner().Pawn).Weapon).IronSightZoomOut(); - } - // Set camera's pitch to zero when menu initialised (otherwise spinny weap goes kooky) - PlayerRot = PlayerOwner().Rotation; - SavedPitch = PlayerRot.Pitch; - PlayerRot.Yaw = PlayerRot.Yaw % 65536; - PlayerRot.Pitch = 0; - PlayerRot.Roll = 0; - PlayerOwner().SetRotation(PlayerRot); - SetTimer(0.05f, true); + { + KFWeapon(KFHumanPawn(PlayerOwner().Pawn).Weapon).IronSightZoomOut(); + } + // Set camera's pitch to zero when menu initialised (otherwise spinny weap goes kooky) + PlayerRot = PlayerOwner().Rotation; + SavedPitch = PlayerRot.Pitch; + PlayerRot.Yaw = PlayerRot.Yaw % 65536; + PlayerRot.Pitch = 0; + PlayerRot.Roll = 0; + PlayerOwner().SetRotation(PlayerRot); + SetTimer(0.05f, true); } function Timer() { - UpdateHeader(); - UpdateWeightBar(); + UpdateHeader(); + UpdateWeightBar(); } function InternalOnClose(optional bool bCanceled) { @@ -94,81 +94,81 @@ function InternalOnClose(optional bool bCanceled) } function UpdateHeader() { - local int TimeLeftMin, TimeLeftSec; - local string TimeString; - if ( KFPlayerController(PlayerOwner()) == none || PlayerOwner().PlayerReplicationInfo == none || - PlayerOwner().GameReplicationInfo == none ) - { - return; - } - // Current Perk - if ( KFPlayerController(PlayerOwner()).SelectedVeterancy != none ) + local int TimeLeftMin, TimeLeftSec; + local string TimeString; + if ( KFPlayerController(PlayerOwner()) == none || PlayerOwner().PlayerReplicationInfo == none || + PlayerOwner().GameReplicationInfo == none ) { - CurrentPerkLabel.Caption = CurrentPerk$":" @ KFPlayerController(PlayerOwner()).SelectedVeterancy.default.VeterancyName @ LvAbbrString$KFPlayerReplicationInfo(PlayerOwner().PlayerReplicationInfo).ClientVeteranSkillLevel; - } + return; + } + // Current Perk + if ( KFPlayerController(PlayerOwner()).SelectedVeterancy != none ) + { + CurrentPerkLabel.Caption = CurrentPerk$":" @ KFPlayerController(PlayerOwner()).SelectedVeterancy.default.VeterancyName @ LvAbbrString$KFPlayerReplicationInfo(PlayerOwner().PlayerReplicationInfo).ClientVeteranSkillLevel; + } else - { - CurrentPerkLabel.Caption = CurrentPerk$":" @ NoActivePerk; - } - // Trader time left - TimeLeftMin = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave / 60; - TimeLeftSec = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave % 60; - if ( TimeLeftMin < 1 ) - { - TimeString = "00:"; - } - else - { - TimeString = "0" $ TimeLeftMin $ ":"; - } - if ( TimeLeftSec >= 10 ) - { - TimeString = TimeString $ TimeLeftSec; - } - else - { - TimeString = TimeString $ "0" $ TimeLeftSec; - } - TimeLeftLabel.Caption = TraderClose @ TimeString; - if ( KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave < 10 ) - { - TimeLeftLabel.TextColor = RedColor; - } - else - { - TimeLeftLabel.TextColor = GreenGreyColor; - } - // Wave Counter - WaveLabel.Caption = WaveString$":" @ (KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).WaveNumber + 1)$"/"$KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).FinalWave; + { + CurrentPerkLabel.Caption = CurrentPerk$":" @ NoActivePerk; + } + // Trader time left + TimeLeftMin = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave / 60; + TimeLeftSec = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave % 60; + if ( TimeLeftMin < 1 ) + { + TimeString = "00:"; + } + else + { + TimeString = "0" $ TimeLeftMin $ ":"; + } + if ( TimeLeftSec >= 10 ) + { + TimeString = TimeString $ TimeLeftSec; + } + else + { + TimeString = TimeString $ "0" $ TimeLeftSec; + } + TimeLeftLabel.Caption = TraderClose @ TimeString; + if ( KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave < 10 ) + { + TimeLeftLabel.TextColor = RedColor; + } + else + { + TimeLeftLabel.TextColor = GreenGreyColor; + } + // Wave Counter + WaveLabel.Caption = WaveString$":" @ (KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).WaveNumber + 1)$"/"$KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).FinalWave; } function KFBuyMenuClosed(optional bool bCanceled) { - local rotator NewRot; - // Reset player - NewRot = PlayerOwner().Rotation; - NewRot.Pitch = SavedPitch; - PlayerOwner().SetRotation(NewRot); - Super.OnClose(bCanceled); - if ( KFPlayerController(PlayerOwner()) != none ) - { + local rotator NewRot; + // Reset player + NewRot = PlayerOwner().Rotation; + NewRot.Pitch = SavedPitch; + PlayerOwner().SetRotation(NewRot); + Super.OnClose(bCanceled); + if ( KFPlayerController(PlayerOwner()) != none ) + { KFPlayerController(PlayerOwner()).bShopping = false; } } function CloseSale(bool savePurchases) { - Controller.CloseMenu(!savePurchases); + Controller.CloseMenu(!savePurchases); } function bool ButtonClicked(GUIComponent Sender) { - if ( Sender == PerkTabButton ) + if ( Sender == PerkTabButton ) { - HandleParameters(PanelCaption[1], "OhHi!"); - } - if ( Sender == StoreTabButton ) + HandleParameters(PanelCaption[1], "OhHi!"); + } + if ( Sender == StoreTabButton ) { - HandleParameters(PanelCaption[0], "OhHi!"); - } - return true; + HandleParameters(PanelCaption[0], "OhHi!"); + } + return true; } defaultproperties { diff --git a/sources/Perks/Enforcer/Skills/NiceSkillSupportDiversity.uc b/sources/Perks/Enforcer/Skills/NiceSkillSupportDiversity.uc index 530a187..4492209 100644 --- a/sources/Perks/Enforcer/Skills/NiceSkillSupportDiversity.uc +++ b/sources/Perks/Enforcer/Skills/NiceSkillSupportDiversity.uc @@ -5,7 +5,7 @@ static function UpdateWeight(NicePlayerController nicePlayer){ local NiceHumanPawn nicePawn; if(nicePawn == none || nicePawn.KFPRI == none) return; nicePawn.maxCarryWeight = nicePawn.default.maxCarryWeight; - if(nicePawn.KFPRI.clientVeteranSkill != none) + if(nicePawn.KFPRI.clientVeteranSkill != none) nicePawn.maxCarryWeight += nicePawn.KFPRI.clientVeteranSkill.static.AddCarryMaxWeight(nicePawn.KFPRI); } function static SkillSelected(NicePlayerController nicePlayer){ diff --git a/sources/Weapons/Playable/Explosives/PipeBombs/NiceDamTypePipeBomb.uc b/sources/Weapons/Playable/Explosives/PipeBombs/NiceDamTypePipeBomb.uc index 21da34a..3224477 100644 --- a/sources/Weapons/Playable/Explosives/PipeBombs/NiceDamTypePipeBomb.uc +++ b/sources/Weapons/Playable/Explosives/PipeBombs/NiceDamTypePipeBomb.uc @@ -1,11 +1,11 @@ class NiceDamTypePipeBomb extends NiceWeaponDamageType; static function GetHitEffects(out class HitEffects[4], int VictimHealth) { - HitEffects[0] = class'HitSmoke'; - if(VictimHealth <= 0) - HitEffects[1] = class'KFHitFlame'; - else if (FRand() < 0.8) - HitEffects[1] = class'KFHitFlame'; + HitEffects[0] = class'HitSmoke'; + if(VictimHealth <= 0) + HitEffects[1] = class'KFHitFlame'; + else if (FRand() < 0.8) + HitEffects[1] = class'KFHitFlame'; } defaultproperties { diff --git a/sources/Weapons/Playable/Grenades/NiceCryoNadeCloud.uc b/sources/Weapons/Playable/Grenades/NiceCryoNadeCloud.uc index 4ea1d3a..f9be3cf 100644 --- a/sources/Weapons/Playable/Grenades/NiceCryoNadeCloud.uc +++ b/sources/Weapons/Playable/Grenades/NiceCryoNadeCloud.uc @@ -2,22 +2,22 @@ class NiceCryoNadeCloud extends Emitter; var bool bFlashed; simulated function PostBeginPlay(){ - super.PostBeginPlay(); - NadeLight(); + super.PostBeginPlay(); + NadeLight(); } simulated function NadeLight(){ if(instigator == none) return; if(Level.bDropDetail) return; - if( (Level.TimeSeconds - LastRenderTime < 0.2) + if( (Level.TimeSeconds - LastRenderTime < 0.2) || (PlayerController(instigator.controller) != none)){ - bDynamicLight = true; - SetTimer(0.25, false); - } - else + bDynamicLight = true; + SetTimer(0.25, false); + } + else Timer(); } simulated function Timer(){ - bDynamicLight = false; + bDynamicLight = false; } defaultproperties { diff --git a/sources/Zeds/Nice/NiceDamTypePoundCrushed.uc b/sources/Zeds/Nice/NiceDamTypePoundCrushed.uc index 6e368bc..19fc1a5 100644 --- a/sources/Zeds/Nice/NiceDamTypePoundCrushed.uc +++ b/sources/Zeds/Nice/NiceDamTypePoundCrushed.uc @@ -1,5 +1,5 @@ class NiceDamTypePoundCrushed extends NiceZedMeleeDamageType - abstract; + abstract; defaultproperties { DeathString="%o was pounded by %k." diff --git a/sources/Zeds/NiceMonsterController.uc b/sources/Zeds/NiceMonsterController.uc index 3e79aa7..f0165d7 100644 --- a/sources/Zeds/NiceMonsterController.uc +++ b/sources/Zeds/NiceMonsterController.uc @@ -16,8 +16,8 @@ class NiceMonsterController extends KFMonsterController; // Just reset threat assesment flag, since it's not used in NicePack function PostBeginPlay(){ - super.PostBeginPlay(); - bUseThreatAssessment = true; + super.PostBeginPlay(); + bUseThreatAssessment = true; } event bool NotifyBump(Actor other){ local Pawn otherPawn;