From 4325a34acfff40be2e61ebec7748045d6bc682d6 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Fri, 21 Jan 2022 23:07:54 +0400 Subject: [PATCH 01/30] siren won't scream at low hp zeds, will melee --- sources/Zeds/Nice/NiceZombieSiren.uc | 72 +++++++++++++++++----------- 1 file changed, 43 insertions(+), 29 deletions(-) diff --git a/sources/Zeds/Nice/NiceZombieSiren.uc b/sources/Zeds/Nice/NiceZombieSiren.uc index 6a5c687..ad5b69b 100644 --- a/sources/Zeds/Nice/NiceZombieSiren.uc +++ b/sources/Zeds/Nice/NiceZombieSiren.uc @@ -77,48 +77,62 @@ function DiscardCurrentScreamBall(){ currScreamTiming = -1; } } + function RangedAttack(Actor A) { local int LastFireTime; local float Dist; - if ( bShotAnim ) - return; + + if (bShotAnim) + return; Dist = VSize(A.Location - Location); - if ( Physics == PHYS_Swimming ) + + if (Physics == PHYS_Swimming) { - SetAnimAction('Claw'); - bShotAnim = true; - LastFireTime = Level.TimeSeconds; + SetAnimAction('Claw'); + bShotAnim = true; + LastFireTime = Level.TimeSeconds; } - else if(Dist < MeleeRange + CollisionRadius + A.CollisionRadius && A != Self) + else if (Dist < MeleeRange + CollisionRadius + A.CollisionRadius && A != Self) { - bShotAnim = true; - LastFireTime = Level.TimeSeconds; - SetAnimAction('Claw'); - Controller.bPreparingMove = true; - Acceleration = vect(0,0,0); + bShotAnim = true; + LastFireTime = Level.TimeSeconds; + SetAnimAction('Claw'); + Controller.bPreparingMove = true; + Acceleration = vect(0,0,0); } - else if( Dist <= ScreamRadius && !bDecapitated && !bZapped ) + // ok se we DO NOT want to scream at other nice zeds + else if (!bNotAHuman() && Dist <= ScreamRadius && !bDecapitated && !bZapped) { - bShotAnim=true; - SetAnimAction('Siren_Scream'); - if(screamStartTime > 0) + bShotAnim = true; + SetAnimAction('Siren_Scream'); + if (screamStartTime > 0) DiscardCurrentScreamBall(); - currScreamTiming = 0; - screamStartTime = Level.TimeSeconds; - // Only stop moving if we are close - if( Dist < ScreamRadius * 0.25 ) - { - Controller.bPreparingMove = true; - Acceleration = vect(0,0,0); - } - else - { - Acceleration = AccelRate * Normal(A.Location - Location); - } - Acceleration.Z = FMin(Acceleration.Z, 0.0f); + currScreamTiming = 0; + screamStartTime = Level.TimeSeconds; + // Only stop moving if we are close + if (Dist < ScreamRadius * 0.25) + { + Controller.bPreparingMove = true; + Acceleration = vect(0,0,0); + } + else + { + Acceleration = AccelRate * Normal(A.Location - Location); + } + Acceleration.Z = FMin(Acceleration.Z, 0.0f); } } + +final private function bool bNotAHuman() +{ + if (Controller == none || Controller.Enemy == none) + return false; + + // log("Zed enemy classname was " $ Controller.Enemy.class); + return ClassIsChildOf(Controller.Enemy.class, class'NiceMonster'); +} + simulated function int DoAnimAction( name AnimName ) { if( AnimName=='Siren_Scream' || AnimName=='Siren_Bite' || AnimName=='Siren_Bite2' ) From c2fa773faec046562d08d9da5ea5771bd7fe6a04 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Fri, 21 Jan 2022 23:13:47 +0400 Subject: [PATCH 02/30] GetDecapDamageModifier KFPRI accessed none fix --- sources/Zeds/NiceMonster.uc | 66 ++++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 31 deletions(-) diff --git a/sources/Zeds/NiceMonster.uc b/sources/Zeds/NiceMonster.uc index b53123e..59c9b46 100644 --- a/sources/Zeds/NiceMonster.uc +++ b/sources/Zeds/NiceMonster.uc @@ -899,42 +899,46 @@ function BileDamageEffect( int damage, NextBileTime = Level.TimeSeconds + BileFrequency; } } + function float GetDecapDamageModifier( class damageType, NicePlayerController nicePlayer, - KFPlayerReplicationInfo KFPRI){ - local float damageMod; - local bool shouldDoGoodDecap; - local bool hasTrashCleaner; - local bool isPerkedPickup; - local class pickupClass; - local class niceVet; - niceVet = class(KFPRI.ClientVeteranSkill); - isPerkedPickup = false; - if(niceVet != none){ - pickupClass = niceVet.static.GetPickupFromDamageType(damageType); - if(pickupClass != none) - isPerkedPickup = niceVet.static.IsPerkedPickup(pickupClass); - } - shouldDoGoodDecap = false; - shouldDoGoodDecap = (damageType.default.decapType == DB_DROP); - shouldDoGoodDecap = shouldDoGoodDecap || + KFPlayerReplicationInfo KFPRI) +{ + local float damageMod; + local bool shouldDoGoodDecap; + local bool hasTrashCleaner; + local bool isPerkedPickup; + local class pickupClass; + local class niceVet; + + // KFPRI accessed none fix + if (KFPRI != none) + niceVet = class(KFPRI.ClientVeteranSkill); + isPerkedPickup = false; + if (niceVet != none) + { + pickupClass = niceVet.static.GetPickupFromDamageType(damageType); + if (pickupClass != none) + isPerkedPickup = niceVet.static.IsPerkedPickup(pickupClass); + } + shouldDoGoodDecap = false; + shouldDoGoodDecap = (damageType.default.decapType == DB_DROP); + shouldDoGoodDecap = shouldDoGoodDecap || (damageType.default.decapType == DB_PERKED && isPerkedPickup); - if(shouldDoGoodDecap) - damageMod = damageType.default.goodDecapMod; - else - damageMod = damageType.default.badDecapMod; - if(nicePlayer != none) - hasTrashCleaner = class'NiceVeterancyTypes'.static. + if (shouldDoGoodDecap) + damageMod = damageType.default.goodDecapMod; + else + damageMod = damageType.default.badDecapMod; + if (nicePlayer != none) + hasTrashCleaner = class'NiceVeterancyTypes'.static. hasSkill(nicePlayer, class'NiceSkillCommandoTrashCleaner'); - if(hasTrashCleaner){ - damageMod = FMin( - damageMod, - class'NiceSkillCommandoTrashCleaner'.default. - decapitationMultiLimit - ); - } - return damageMod; + if (hasTrashCleaner) + { + damageMod = FMin(damageMod, class'NiceSkillCommandoTrashCleaner'.default.decapitationMultiLimit); + } + return damageMod; } + function DealDecapDamage( int damage, Pawn instigatedBy, Vector hitLocation, From 2b164b56df658e1aca65573cf8b5e6144c78fa1a Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sat, 22 Jan 2022 01:42:04 +0400 Subject: [PATCH 03/30] lots of niceguitab changes --- sources/GUI/NiceGUISettings.uc | 430 ++++++++++++++------------- sources/NicePlayerController.uc | 2 + sources/Perks/NiceVeterancyTypes.uc | 26 +- sources/Zeds/Nice/NiceZombieBloat.uc | 7 +- 4 files changed, 259 insertions(+), 206 deletions(-) diff --git a/sources/GUI/NiceGUISettings.uc b/sources/GUI/NiceGUISettings.uc index d782df9..e4f7cd9 100644 --- a/sources/GUI/NiceGUISettings.uc +++ b/sources/GUI/NiceGUISettings.uc @@ -1,27 +1,64 @@ class NiceGUISettings extends Settings_Tabs; + //var automated GUIButton skillButtonA; var array ForceProjItems; -var automated moCheckBox ch_WeapManagement; -var automated moCheckBox ch_AltSwitches; -var automated moCheckBox ch_DispCounters; -var automated moCheckBox ch_DisWeapProgress; -var automated moCheckBox ch_ShowHLMessages; -var automated moCheckBox ch_CancelFire; -var automated moCheckBox ch_CancelSwitching; -var automated moCheckBox ch_CancelNades; -var automated moCheckBox ch_CancelAiming; -var automated moCheckBox ch_ReloadWontWork; -var automated GUISectionBackground bg_WEAP; -var automated GUISectionBackground bg_RELOAD; -function InitComponent(GUIController MyController, GUIComponent MyOwner){ - super.InitComponent(MyController, MyOwner); -} -function InternalOnLoadINI(GUIComponent sender, string s){ - local NicePlayerController nicePlayer; - nicePlayer = NicePlayerController(PlayerOwner()); - if(nicePlayer == none) - return; - switch(sender){ + +// GENERAL WEAPON SETTINGS +var automated GUISectionBackground bg_WEAP; +var automated moCheckBox ch_WeapManagement; +var automated moCheckBox ch_AltSwitches; +var automated moCheckBox ch_DispCounters; +var automated moCheckBox ch_DisWeapProgress; +var automated moCheckBox ch_ShowHLMessages; + +// WEAPON RELOAD SETTINGS +var automated GUISectionBackground bg_RELOAD; +var automated moCheckBox ch_CancelFire; +var automated moCheckBox ch_CancelSwitching; +var automated moCheckBox ch_CancelNades; +var automated moCheckBox ch_CancelAiming; +var automated moCheckBox ch_ReloadWontWork; + +// RANDOM SETTINGS +var automated GUISectionBackground bg_RANDOM; +var automated MoComboBox mo_ZedHPBars; + +function InitComponent(GUIController MyController, GUIComponent MyOwner) +{ + super.InitComponent(MyController, MyOwner); + + mo_ZedHPBars.AddItem("Big Zeds"); + mo_ZedHPBars.AddItem("All Zeds"); + mo_ZedHPBars.AddItem("Disable"); + + // GENERAL WEAPON SETTINGS + bg_WEAP.ManageComponent(ch_WeapManagement); + bg_WEAP.ManageComponent(ch_AltSwitches); + bg_WEAP.ManageComponent(ch_DispCounters); + bg_WEAP.ManageComponent(ch_DisWeapProgress); + bg_WEAP.ManageComponent(ch_ShowHLMessages); + + // WEAPON RELOAD SETTINGS + bg_RELOAD.ManageComponent(ch_CancelFire); + bg_RELOAD.ManageComponent(ch_CancelSwitching); + bg_RELOAD.ManageComponent(ch_CancelNades); + bg_RELOAD.ManageComponent(ch_CancelAiming); + bg_RELOAD.ManageComponent(ch_ReloadWontWork); + + // RANDOM SETTINGS + bg_RANDOM.ManageComponent(mo_ZedHPBars); +} + +function InternalOnLoadINI(GUIComponent sender, string s) +{ + local NicePlayerController nicePlayer; + + nicePlayer = NicePlayerController(PlayerOwner()); + if (nicePlayer == none) + return; + + switch(sender) + { case ch_WeapManagement: ch_WeapManagement.Checked(nicePlayer.bNiceWeaponManagement); break; @@ -52,15 +89,23 @@ function InternalOnLoadINI(GUIComponent sender, string s){ case ch_ReloadWontWork: ch_ReloadWontWork.Checked(nicePlayer.bFlagUseServerReload); break; - } + case mo_ZedHPBars: + mo_ZedHPBars.SetIndex(nicePlayer.ZedHPBarStyle); + break; + } } -function InternalOnChange(GUIComponent Sender){ - local NicePlayerController nicePlayer; - super.InternalOnChange(Sender); - nicePlayer = NicePlayerController(PlayerOwner()); - if(nicePlayer == none) - return; - switch(sender){ + +function InternalOnChange(GUIComponent Sender) +{ + local NicePlayerController nicePlayer; + + super.InternalOnChange(Sender); + nicePlayer = NicePlayerController(PlayerOwner()); + if (nicePlayer == none) + return; + + switch(sender) + { case ch_WeapManagement: nicePlayer.bNiceWeaponManagement = ch_WeapManagement.IsChecked(); break; @@ -91,191 +136,174 @@ function InternalOnChange(GUIComponent Sender){ case ch_ReloadWontWork: nicePlayer.ServerSetUseServerReload(ch_ReloadWontWork.IsChecked()); break; - } - nicePlayer.ClientSaveConfig(); + case mo_ZedHPBars: + nicePlayer.ZedHPBarStyle = mo_ZedHPBars.GetIndex(); + log(">>> nicePlayer.ZedHPBarStyle = " $ mo_ZedHPBars.GetIndex()); + break; + } + nicePlayer.ClientSaveConfig(); } + // size = (x=0.0125, y=0.0) ; (w=1.0, h=0.865) // tab order defaultproperties { - Begin Object Class=moCheckBox Name=WeaponManagement - CaptionWidth=0.955000 - Caption="Nice weapon management" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" - OnCreateComponent=WeaponManagement.InternalOnCreateComponent - IniOption="@Internal" - Hint="If checked, NicePack will use it's own system to manage weapon switching" - WinTop=0.050000 - WinLeft=0.012500 - WinWidth=0.278000 - TabOrder=4 - OnChange=NiceGUISettings.InternalOnChange - OnLoadINI=NiceGUISettings.InternalOnLoadINI - End Object - ch_WeapManagement=WeaponManagement + // GENERAL WEAPON SETTINGS + Begin Object Class=GUISectionBackground Name=WEAPBG + Caption="General weapon settings" + WinTop=0.012500 + WinWidth=0.495000 + WinHeight=0.287500 + RenderWeight=0.100100 + // OnPreDraw=WeaponsBG.InternalPreDraw + OnPreDraw=WEAPBG.InternalPreDraw + End Object + bg_WEAP=WEAPBG - Begin Object Class=moCheckBox Name=AltSwitches - CaptionWidth=0.955000 - Caption="Alt fire switches modes" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" - OnCreateComponent=AltSwitches.InternalOnCreateComponent - IniOption="@Internal" - Hint="Assault-rifle only; if enabled - alt fire button switches between fire modes, otherwise - acts as an alt fire" - WinTop=0.100000 - WinLeft=0.012500 - WinWidth=0.278000 - TabOrder=6 - OnChange=NiceGUISettings.InternalOnChange - OnLoadINI=NiceGUISettings.InternalOnLoadINI - End Object - ch_AltSwitches=AltSwitches + Begin Object Class=moCheckBox Name=WeaponManagement + Caption="Nice weapon management" + ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + OnCreateComponent=WeaponManagement.InternalOnCreateComponent + IniOption="@Internal" + Hint="If checked, NicePack will use it's own system to manage weapon switching" + OnChange=NiceGUISettings.InternalOnChange + OnLoadINI=NiceGUISettings.InternalOnLoadINI + End Object + ch_WeapManagement=WeaponManagement - Begin Object Class=moCheckBox Name=DispCounters - CaptionWidth=0.955000 - Caption="Display counters" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" - OnCreateComponent=DispCounters.InternalOnCreateComponent - IniOption="@Internal" - Hint="Toggles display of the various counters used by skills" - WinTop=0.150000 - WinLeft=0.012500 - WinWidth=0.278000 - TabOrder=7 - OnChange=NiceGUISettings.InternalOnChange - OnLoadINI=NiceGUISettings.InternalOnLoadINI - End Object - ch_DispCounters=DispCounters + Begin Object Class=moCheckBox Name=AltSwitches + Caption="Alt fire switches modes" + ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + OnCreateComponent=AltSwitches.InternalOnCreateComponent + IniOption="@Internal" + Hint="Assault-rifle only; if enabled - alt fire button switches between fire modes, otherwise - acts as an alt fire" + OnChange=NiceGUISettings.InternalOnChange + OnLoadINI=NiceGUISettings.InternalOnLoadINI + End Object + ch_AltSwitches=AltSwitches - Begin Object Class=moCheckBox Name=DispWeapProgress - CaptionWidth=0.955000 - Caption="Display weapon progress" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" - OnCreateComponent=DispWeapProgress.InternalOnCreateComponent - IniOption="@Internal" - Hint="Displays weapon progress rate, however it's defined by a skill that's using this functionality" - WinTop=0.200000 - WinLeft=0.012500 - WinWidth=0.278000 - TabOrder=8 - OnChange=NiceGUISettings.InternalOnChange - OnLoadINI=NiceGUISettings.InternalOnLoadINI - End Object - ch_DisWeapProgress=DispWeapProgress + Begin Object Class=moCheckBox Name=DispCounters + Caption="Display counters" + ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + OnCreateComponent=DispCounters.InternalOnCreateComponent + IniOption="@Internal" + Hint="Toggles display of the various counters used by skills" + OnChange=NiceGUISettings.InternalOnChange + OnLoadINI=NiceGUISettings.InternalOnLoadINI + End Object + ch_DispCounters=DispCounters - Begin Object Class=moCheckBox Name=ShowHLMessages - CaptionWidth=0.955000 - Caption="Show Hardcore Level messages" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" - OnCreateComponent=ShowHLMessages.InternalOnCreateComponent - IniOption="@Internal" - Hint="Enable to be notified each time Hardcore Level is changed" - WinTop=0.300000 - WinLeft=0.012500 - WinWidth=0.278000 - TabOrder=9 - OnChange=NiceGUISettings.InternalOnChange - OnLoadINI=NiceGUISettings.InternalOnLoadINI - End Object - ch_ShowHLMessages=ShowHLMessages + Begin Object Class=moCheckBox Name=DispWeapProgress + Caption="Display weapon progress" + ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + OnCreateComponent=DispWeapProgress.InternalOnCreateComponent + IniOption="@Internal" + Hint="Displays weapon progress rate, however it's defined by a skill that's using this functionality" + OnChange=NiceGUISettings.InternalOnChange + OnLoadINI=NiceGUISettings.InternalOnLoadINI + End Object + ch_DisWeapProgress=DispWeapProgress - Begin Object Class=moCheckBox Name=CancelFire - CaptionWidth=0.955000 - Caption="Cancel reload by shooting" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" - OnCreateComponent=CancelFire.InternalOnCreateComponent - IniOption="@Internal" - Hint="If checked, you'll be able to cancel reload of converted weapons by shooting (when you have ammo)" - WinTop=0.050000 - WinLeft=0.517500 - WinWidth=0.287000 - TabOrder=11 - OnChange=NiceGUISettings.InternalOnChange - OnLoadINI=NiceGUISettings.InternalOnLoadINI - End Object - ch_CancelFire=CancelFire + Begin Object Class=moCheckBox Name=ShowHLMessages + Caption="Show Hardcore Level messages" + ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + OnCreateComponent=ShowHLMessages.InternalOnCreateComponent + IniOption="@Internal" + Hint="Enable to be notified each time Hardcore Level is changed" + OnChange=NiceGUISettings.InternalOnChange + OnLoadINI=NiceGUISettings.InternalOnLoadINI + End Object + ch_ShowHLMessages=ShowHLMessages - Begin Object Class=moCheckBox Name=CancelSwitching - CaptionWidth=0.955000 - Caption="Cancel reload by switching weapons" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" - OnCreateComponent=CancelSwitching.InternalOnCreateComponent - IniOption="@Internal" - Hint="If checked, you'll be able to cancel reload of converted weapons by switching to different weapon" - WinTop=0.100000 - WinLeft=0.517500 - WinWidth=0.287000 - TabOrder=12 - OnChange=NiceGUISettings.InternalOnChange - OnLoadINI=NiceGUISettings.InternalOnLoadINI - End Object - ch_CancelSwitching=CancelSwitching + // WEAPON RELOAD SETTINGS + Begin Object Class=GUISectionBackground Name=RELOADBG + Caption="Weapon reload settings" + WinTop=0.012500 + WinLeft=0.505000 + WinWidth=0.495000 + WinHeight=0.287500 + RenderWeight=0.100100 + // OnPreDraw=WeaponsBG.InternalPreDraw + OnPreDraw=RELOADBG.InternalPreDraw + End Object + bg_RELOAD=RELOADBG - Begin Object Class=moCheckBox Name=CancelNades - CaptionWidth=0.955000 - Caption="Cancel reload by throwing grenades" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" - OnCreateComponent=CancelNades.InternalOnCreateComponent - IniOption="@Internal" - Hint="If checked, you'll be able to cancel reload of converted weapons by throwing a grenade" - WinTop=0.150000 - WinLeft=0.517500 - WinWidth=0.287000 - TabOrder=13 - OnChange=NiceGUISettings.InternalOnChange - OnLoadINI=NiceGUISettings.InternalOnLoadINI - End Object - ch_CancelNades=CancelNades + Begin Object Class=moCheckBox Name=CancelFire + Caption="Cancel reload by shooting" + ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + OnCreateComponent=CancelFire.InternalOnCreateComponent + IniOption="@Internal" + Hint="If checked, you'll be able to cancel reload of converted weapons by shooting (when you have ammo)" + OnChange=NiceGUISettings.InternalOnChange + OnLoadINI=NiceGUISettings.InternalOnLoadINI + End Object + ch_CancelFire=CancelFire - Begin Object Class=moCheckBox Name=CancelAiming - CaptionWidth=0.955000 - Caption="Cancel reload by aiming" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" - OnCreateComponent=CancelAiming.InternalOnCreateComponent - IniOption="@Internal" - Hint="If checked, you'll be able to cancel reload of converted weapons by going into iron sights (when you have ammo)" - WinTop=0.200000 - WinLeft=0.517500 - WinWidth=0.287000 - TabOrder=14 - OnChange=NiceGUISettings.InternalOnChange - OnLoadINI=NiceGUISettings.InternalOnLoadINI - End Object - ch_CancelAiming=CancelAiming + Begin Object Class=moCheckBox Name=CancelSwitching + Caption="Cancel reload by switching weapons" + ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + OnCreateComponent=CancelSwitching.InternalOnCreateComponent + IniOption="@Internal" + Hint="If checked, you'll be able to cancel reload of converted weapons by switching to different weapon" + OnChange=NiceGUISettings.InternalOnChange + OnLoadINI=NiceGUISettings.InternalOnLoadINI + End Object + ch_CancelSwitching=CancelSwitching - Begin Object Class=moCheckBox Name=ServerReload - CaptionWidth=0.955000 - Caption="My reload doesn't work" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" - OnCreateComponent=ServerReload.InternalOnCreateComponent - IniOption="@Internal" - Hint="Check this option ONLY in case converted weapons don't reload at all for you; this option should fix the problem, but then latency will affect both reload and active reload" - WinTop=0.250000 - WinLeft=0.517500 - WinWidth=0.287000 - TabOrder=15 - OnChange=NiceGUISettings.InternalOnChange - OnLoadINI=NiceGUISettings.InternalOnLoadINI - End Object - ch_ReloadWontWork=ServerReload + Begin Object Class=moCheckBox Name=CancelNades + Caption="Cancel reload by throwing grenades" + ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + OnCreateComponent=CancelNades.InternalOnCreateComponent + IniOption="@Internal" + Hint="If checked, you'll be able to cancel reload of converted weapons by throwing a grenade" + OnChange=NiceGUISettings.InternalOnChange + OnLoadINI=NiceGUISettings.InternalOnLoadINI + End Object + ch_CancelNades=CancelNades - Begin Object Class=GUISectionBackground Name=WEAPBG - Caption="General weapon settings" - WinTop=0.012500 - WinWidth=0.495000 - WinHeight=0.287500 - RenderWeight=0.100100 - OnPreDraw=WeaponsBG.InternalPreDraw - End Object - bg_WEAP=WEAPBG + Begin Object Class=moCheckBox Name=CancelAiming + Caption="Cancel reload by aiming" + ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + OnCreateComponent=CancelAiming.InternalOnCreateComponent + IniOption="@Internal" + Hint="If checked, you'll be able to cancel reload of converted weapons by going into iron sights (when you have ammo)" + OnChange=NiceGUISettings.InternalOnChange + OnLoadINI=NiceGUISettings.InternalOnLoadINI + End Object + ch_CancelAiming=CancelAiming - Begin Object Class=GUISectionBackground Name=RELOADBG - Caption="Weapon reload settings" - WinTop=0.012500 - WinLeft=0.505000 - WinWidth=0.495000 - WinHeight=0.287500 - RenderWeight=0.100100 - OnPreDraw=WeaponsBG.InternalPreDraw - End Object - bg_RELOAD=RELOADBG -} + Begin Object Class=moCheckBox Name=ServerReload + Caption="My reload doesn't work" + ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + OnCreateComponent=ServerReload.InternalOnCreateComponent + IniOption="@Internal" + Hint="Check this option ONLY in case converted weapons don't reload at all for you; this option should fix the problem, but then latency will affect both reload and active reload" + OnChange=NiceGUISettings.InternalOnChange + OnLoadINI=NiceGUISettings.InternalOnLoadINI + End Object + ch_ReloadWontWork=ServerReload + + // RANDOM SETTINGS + Begin Object Class=GUISectionBackground Name=randbg + Caption="Random settings" + WinTop=0.300000 + WinWidth=0.495000 + WinHeight=0.287500 + WinLeft=0.505000 + RenderWeight=0.100100 + // OnPreDraw=WeaponsBG.InternalPreDraw + OnPreDraw=randbg.InternalPreDraw + End Object + bg_RANDOM=randbg + + Begin Object class=moComboBox Name=zedhbarpmethod + bReadOnly=true + CaptionWidth=0.000000 + Caption="Zed health bars" + Hint="Choose what health bars you want to see" + OnCreateComponent=zedhbarpmethod.InternalOnCreateComponent + OnChange=NiceGUISettings.InternalOnChange + OnLoadINI=NiceGUISettings.InternalOnLoadINI + End Object + mo_ZedHPBars=zedhbarpmethod +} \ No newline at end of file diff --git a/sources/NicePlayerController.uc b/sources/NicePlayerController.uc index 3e02237..52926c1 100644 --- a/sources/NicePlayerController.uc +++ b/sources/NicePlayerController.uc @@ -2,6 +2,8 @@ class NicePlayerController extends ScrnPlayerController config(NiceUser) dependson(NicePack) dependson(NiceFire); + +var globalconfig int ZedHPBarStyle; // 0 - big zeds, 1 - all, 2 - disabled var globalconfig int nicePlayerInfoVersionNumber; // These are values stored in a settings file var globalconfig bool bDebug; diff --git a/sources/Perks/NiceVeterancyTypes.uc b/sources/Perks/NiceVeterancyTypes.uc index 28c3d31..19ebff2 100644 --- a/sources/Perks/NiceVeterancyTypes.uc +++ b/sources/Perks/NiceVeterancyTypes.uc @@ -285,20 +285,38 @@ static function int GetInvincibilityDuration(KFPlayerReplicationInfo KFPRI){ static function int GetInvincibilitySafeMisses(KFPlayerReplicationInfo KFPRI){ return 0; } -static function SpecialHUDInfo(KFPlayerReplicationInfo KFPRI, Canvas C){ + +static function SpecialHUDInfo(KFPlayerReplicationInfo KFPRI, Canvas C) +{ local KFMonster KFEnemy; local HUDKillingFloor HKF; + local int i, hp; local float MaxDistanceSquared; + MaxDistanceSquared = 640000; MaxDistanceSquared *= GetHealthBarsDistanceMulti(KFPRI)**2; HKF = HUDKillingFloor(C.ViewPort.Actor.myHUD); - if(HKF == none || C.ViewPort.Actor.Pawn == none || MaxDistanceSquared <= 0) + if (HKF == none || C.ViewPort.Actor.Pawn == none || MaxDistanceSquared <= 0) return; - foreach C.ViewPort.Actor.DynamicActors(class'KFMonster', KFEnemy){ - if(KFEnemy.Health > 0 && (!KFEnemy.Cloaked() || KFEnemy.bZapped || KFEnemy.bSpotted) && VSizeSquared(KFEnemy.Location - C.ViewPort.Actor.Pawn.Location) < MaxDistanceSquared) + + // read and use player settings + // 0 - big zeds, 1 - all, 2 - disabled + i = NicePlayerController(C.ViewPort.actor).ZedHPBarStyle; + + if (i == 2) + return; + else if (i == 1) + hp = 0; + else + hp = 1000; + + foreach C.ViewPort.Actor.DynamicActors(class'KFMonster', KFEnemy) + { + if (KFEnemy.Health > hp && (!KFEnemy.Cloaked() || KFEnemy.bZapped || KFEnemy.bSpotted) && VSizeSquared(KFEnemy.Location - C.ViewPort.Actor.Pawn.Location) < MaxDistanceSquared) HKF.DrawHealthBar(C, KFEnemy, KFEnemy.Health, KFEnemy.HealthMax , 50.0); } } + // Is player standing still? static function bool IsStandingStill(KFPlayerReplicationInfo KFPRI){ if(KFPRI != none && PlayerController(KFPRI.Owner) != none && PlayerController(KFPRI.Owner).Pawn != none && VSize(PlayerController(KFPRI.Owner).Pawn.Velocity) > 0.0) diff --git a/sources/Zeds/Nice/NiceZombieBloat.uc b/sources/Zeds/Nice/NiceZombieBloat.uc index 2e2a315..746d971 100644 --- a/sources/Zeds/Nice/NiceZombieBloat.uc +++ b/sources/Zeds/Nice/NiceZombieBloat.uc @@ -158,7 +158,12 @@ function SpawnTwoShots() { local vector X,Y,Z, FireStart; local rotator FireRotation; - if( Controller!=none && KFDoorMover(Controller.Target)!=none ) + + // check this from the very start to prevent any log spam + if (Controller == none || IsInState('ZombieDying')) + return; + + if (KFDoorMover(Controller.Target)!=none ) { Controller.Target.TakeDamage(22,Self,Location,vect(0,0,0),Class'DamTypeVomit'); return; From 5afc2ffa02a89921cc1ab5a1ca14c8399569cd90 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sat, 22 Jan 2022 02:03:06 +0400 Subject: [PATCH 04/30] removed debug log --- sources/GUI/NiceGUISettings.uc | 1 - 1 file changed, 1 deletion(-) diff --git a/sources/GUI/NiceGUISettings.uc b/sources/GUI/NiceGUISettings.uc index e4f7cd9..137dea7 100644 --- a/sources/GUI/NiceGUISettings.uc +++ b/sources/GUI/NiceGUISettings.uc @@ -138,7 +138,6 @@ function InternalOnChange(GUIComponent Sender) break; case mo_ZedHPBars: nicePlayer.ZedHPBarStyle = mo_ZedHPBars.GetIndex(); - log(">>> nicePlayer.ZedHPBarStyle = " $ mo_ZedHPBars.GetIndex()); break; } nicePlayer.ClientSaveConfig(); From 63c3907378ef8ab626c68a19d67cc280abdd5efa Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sat, 22 Jan 2022 02:14:53 +0400 Subject: [PATCH 05/30] better parent class for niceguisettings --- sources/GUI/NiceGUISettings.uc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sources/GUI/NiceGUISettings.uc b/sources/GUI/NiceGUISettings.uc index 137dea7..14e4ce2 100644 --- a/sources/GUI/NiceGUISettings.uc +++ b/sources/GUI/NiceGUISettings.uc @@ -1,7 +1,4 @@ -class NiceGUISettings extends Settings_Tabs; - -//var automated GUIButton skillButtonA; -var array ForceProjItems; +class NiceGUISettings extends UT2K4TabPanel; // GENERAL WEAPON SETTINGS var automated GUISectionBackground bg_WEAP; @@ -99,7 +96,6 @@ function InternalOnChange(GUIComponent Sender) { local NicePlayerController nicePlayer; - super.InternalOnChange(Sender); nicePlayer = NicePlayerController(PlayerOwner()); if (nicePlayer == none) return; From 9d74b68fb6100b437f7662ad0f6ff2d8fd6981ba Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sat, 22 Jan 2022 02:17:48 +0400 Subject: [PATCH 06/30] x3 spaces -> x4 spaces --- sources/GUI/NiceGUISettings.uc | 516 ++++++++++++++++----------------- 1 file changed, 258 insertions(+), 258 deletions(-) diff --git a/sources/GUI/NiceGUISettings.uc b/sources/GUI/NiceGUISettings.uc index 14e4ce2..330ed1f 100644 --- a/sources/GUI/NiceGUISettings.uc +++ b/sources/GUI/NiceGUISettings.uc @@ -1,304 +1,304 @@ class NiceGUISettings extends UT2K4TabPanel; // GENERAL WEAPON SETTINGS -var automated GUISectionBackground bg_WEAP; -var automated moCheckBox ch_WeapManagement; -var automated moCheckBox ch_AltSwitches; -var automated moCheckBox ch_DispCounters; -var automated moCheckBox ch_DisWeapProgress; -var automated moCheckBox ch_ShowHLMessages; +var automated GUISectionBackground bg_WEAP; +var automated moCheckBox ch_WeapManagement; +var automated moCheckBox ch_AltSwitches; +var automated moCheckBox ch_DispCounters; +var automated moCheckBox ch_DisWeapProgress; +var automated moCheckBox ch_ShowHLMessages; // WEAPON RELOAD SETTINGS -var automated GUISectionBackground bg_RELOAD; -var automated moCheckBox ch_CancelFire; -var automated moCheckBox ch_CancelSwitching; -var automated moCheckBox ch_CancelNades; -var automated moCheckBox ch_CancelAiming; -var automated moCheckBox ch_ReloadWontWork; +var automated GUISectionBackground bg_RELOAD; +var automated moCheckBox ch_CancelFire; +var automated moCheckBox ch_CancelSwitching; +var automated moCheckBox ch_CancelNades; +var automated moCheckBox ch_CancelAiming; +var automated moCheckBox ch_ReloadWontWork; // RANDOM SETTINGS -var automated GUISectionBackground bg_RANDOM; -var automated MoComboBox mo_ZedHPBars; +var automated GUISectionBackground bg_RANDOM; +var automated MoComboBox mo_ZedHPBars; function InitComponent(GUIController MyController, GUIComponent MyOwner) { - super.InitComponent(MyController, MyOwner); + super.InitComponent(MyController, MyOwner); - mo_ZedHPBars.AddItem("Big Zeds"); - mo_ZedHPBars.AddItem("All Zeds"); - mo_ZedHPBars.AddItem("Disable"); + mo_ZedHPBars.AddItem("Big Zeds"); + mo_ZedHPBars.AddItem("All Zeds"); + mo_ZedHPBars.AddItem("Disable"); - // GENERAL WEAPON SETTINGS - bg_WEAP.ManageComponent(ch_WeapManagement); - bg_WEAP.ManageComponent(ch_AltSwitches); - bg_WEAP.ManageComponent(ch_DispCounters); - bg_WEAP.ManageComponent(ch_DisWeapProgress); - bg_WEAP.ManageComponent(ch_ShowHLMessages); + // GENERAL WEAPON SETTINGS + bg_WEAP.ManageComponent(ch_WeapManagement); + bg_WEAP.ManageComponent(ch_AltSwitches); + bg_WEAP.ManageComponent(ch_DispCounters); + bg_WEAP.ManageComponent(ch_DisWeapProgress); + bg_WEAP.ManageComponent(ch_ShowHLMessages); - // WEAPON RELOAD SETTINGS - bg_RELOAD.ManageComponent(ch_CancelFire); - bg_RELOAD.ManageComponent(ch_CancelSwitching); - bg_RELOAD.ManageComponent(ch_CancelNades); - bg_RELOAD.ManageComponent(ch_CancelAiming); - bg_RELOAD.ManageComponent(ch_ReloadWontWork); + // WEAPON RELOAD SETTINGS + bg_RELOAD.ManageComponent(ch_CancelFire); + bg_RELOAD.ManageComponent(ch_CancelSwitching); + bg_RELOAD.ManageComponent(ch_CancelNades); + bg_RELOAD.ManageComponent(ch_CancelAiming); + bg_RELOAD.ManageComponent(ch_ReloadWontWork); - // RANDOM SETTINGS - bg_RANDOM.ManageComponent(mo_ZedHPBars); + // RANDOM SETTINGS + bg_RANDOM.ManageComponent(mo_ZedHPBars); } function InternalOnLoadINI(GUIComponent sender, string s) { - local NicePlayerController nicePlayer; + local NicePlayerController nicePlayer; - nicePlayer = NicePlayerController(PlayerOwner()); - if (nicePlayer == none) - return; + nicePlayer = NicePlayerController(PlayerOwner()); + if (nicePlayer == none) + return; - switch(sender) - { - case ch_WeapManagement: - ch_WeapManagement.Checked(nicePlayer.bNiceWeaponManagement); - break; - case ch_AltSwitches: - ch_AltSwitches.Checked(nicePlayer.bFlagAltSwitchesModes); - break; - case ch_DispCounters: - ch_DispCounters.Checked(nicePlayer.bFlagDisplayCounters); - break; - case ch_DisWeapProgress: - ch_DisWeapProgress.Checked(nicePlayer.bFlagDisplayWeaponProgress); - break; - case ch_ShowHLMessages: - ch_ShowHLMessages.Checked(nicePlayer.bFlagShowHLMessages); - break; - case ch_CancelFire: - ch_CancelFire.Checked(nicePlayer.bRelCancelByFire); - break; - case ch_CancelSwitching: - ch_CancelSwitching.Checked(nicePlayer.bRelCancelBySwitching); - break; - case ch_CancelNades: - ch_CancelNades.Checked(nicePlayer.bRelCancelByNades); - break; - case ch_CancelAiming: - ch_CancelAiming.Checked(nicePlayer.bRelCancelByAiming); - break; - case ch_ReloadWontWork: - ch_ReloadWontWork.Checked(nicePlayer.bFlagUseServerReload); - break; - case mo_ZedHPBars: - mo_ZedHPBars.SetIndex(nicePlayer.ZedHPBarStyle); - break; - } + switch(sender) + { + case ch_WeapManagement: + ch_WeapManagement.Checked(nicePlayer.bNiceWeaponManagement); + break; + case ch_AltSwitches: + ch_AltSwitches.Checked(nicePlayer.bFlagAltSwitchesModes); + break; + case ch_DispCounters: + ch_DispCounters.Checked(nicePlayer.bFlagDisplayCounters); + break; + case ch_DisWeapProgress: + ch_DisWeapProgress.Checked(nicePlayer.bFlagDisplayWeaponProgress); + break; + case ch_ShowHLMessages: + ch_ShowHLMessages.Checked(nicePlayer.bFlagShowHLMessages); + break; + case ch_CancelFire: + ch_CancelFire.Checked(nicePlayer.bRelCancelByFire); + break; + case ch_CancelSwitching: + ch_CancelSwitching.Checked(nicePlayer.bRelCancelBySwitching); + break; + case ch_CancelNades: + ch_CancelNades.Checked(nicePlayer.bRelCancelByNades); + break; + case ch_CancelAiming: + ch_CancelAiming.Checked(nicePlayer.bRelCancelByAiming); + break; + case ch_ReloadWontWork: + ch_ReloadWontWork.Checked(nicePlayer.bFlagUseServerReload); + break; + case mo_ZedHPBars: + mo_ZedHPBars.SetIndex(nicePlayer.ZedHPBarStyle); + break; + } } function InternalOnChange(GUIComponent Sender) { - local NicePlayerController nicePlayer; + local NicePlayerController nicePlayer; - nicePlayer = NicePlayerController(PlayerOwner()); - if (nicePlayer == none) - return; + nicePlayer = NicePlayerController(PlayerOwner()); + if (nicePlayer == none) + return; - switch(sender) - { - case ch_WeapManagement: - nicePlayer.bNiceWeaponManagement = ch_WeapManagement.IsChecked(); - break; - case ch_AltSwitches: - nicePlayer.ServerSetAltSwitchesModes(ch_AltSwitches.IsChecked()); - break; - case ch_DispCounters: - nicePlayer.ServerSetDisplayCounters(ch_DispCounters.IsChecked()); - break; - case ch_DisWeapProgress: - nicePlayer.ServerSetDisplayWeaponProgress(ch_DisWeapProgress.IsChecked()); - break; - case ch_ShowHLMessages: - nicePlayer.ServerSetHLMessages(ch_ShowHLMessages.IsChecked()); - break; - case ch_CancelFire: - nicePlayer.bRelCancelByFire = ch_CancelFire.IsChecked(); - break; - case ch_CancelSwitching: - nicePlayer.bRelCancelBySwitching = ch_CancelSwitching.IsChecked(); - break; - case ch_CancelNades: - nicePlayer.bRelCancelByNades = ch_CancelNades.IsChecked(); - break; - case ch_CancelAiming: - nicePlayer.bRelCancelByAiming = ch_CancelAiming.IsChecked(); - break; - case ch_ReloadWontWork: - nicePlayer.ServerSetUseServerReload(ch_ReloadWontWork.IsChecked()); - break; - case mo_ZedHPBars: - nicePlayer.ZedHPBarStyle = mo_ZedHPBars.GetIndex(); - break; - } - nicePlayer.ClientSaveConfig(); + switch(sender) + { + case ch_WeapManagement: + nicePlayer.bNiceWeaponManagement = ch_WeapManagement.IsChecked(); + break; + case ch_AltSwitches: + nicePlayer.ServerSetAltSwitchesModes(ch_AltSwitches.IsChecked()); + break; + case ch_DispCounters: + nicePlayer.ServerSetDisplayCounters(ch_DispCounters.IsChecked()); + break; + case ch_DisWeapProgress: + nicePlayer.ServerSetDisplayWeaponProgress(ch_DisWeapProgress.IsChecked()); + break; + case ch_ShowHLMessages: + nicePlayer.ServerSetHLMessages(ch_ShowHLMessages.IsChecked()); + break; + case ch_CancelFire: + nicePlayer.bRelCancelByFire = ch_CancelFire.IsChecked(); + break; + case ch_CancelSwitching: + nicePlayer.bRelCancelBySwitching = ch_CancelSwitching.IsChecked(); + break; + case ch_CancelNades: + nicePlayer.bRelCancelByNades = ch_CancelNades.IsChecked(); + break; + case ch_CancelAiming: + nicePlayer.bRelCancelByAiming = ch_CancelAiming.IsChecked(); + break; + case ch_ReloadWontWork: + nicePlayer.ServerSetUseServerReload(ch_ReloadWontWork.IsChecked()); + break; + case mo_ZedHPBars: + nicePlayer.ZedHPBarStyle = mo_ZedHPBars.GetIndex(); + break; + } + nicePlayer.ClientSaveConfig(); } // size = (x=0.0125, y=0.0) ; (w=1.0, h=0.865) // tab order defaultproperties { - // GENERAL WEAPON SETTINGS - Begin Object Class=GUISectionBackground Name=WEAPBG - Caption="General weapon settings" - WinTop=0.012500 - WinWidth=0.495000 - WinHeight=0.287500 - RenderWeight=0.100100 - // OnPreDraw=WeaponsBG.InternalPreDraw - OnPreDraw=WEAPBG.InternalPreDraw - End Object - bg_WEAP=WEAPBG + // GENERAL WEAPON SETTINGS + Begin Object Class=GUISectionBackground Name=WEAPBG + Caption="General weapon settings" + WinTop=0.012500 + WinWidth=0.495000 + WinHeight=0.287500 + RenderWeight=0.100100 + // OnPreDraw=WeaponsBG.InternalPreDraw + OnPreDraw=WEAPBG.InternalPreDraw + End Object + bg_WEAP=WEAPBG - Begin Object Class=moCheckBox Name=WeaponManagement - Caption="Nice weapon management" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" - OnCreateComponent=WeaponManagement.InternalOnCreateComponent - IniOption="@Internal" - Hint="If checked, NicePack will use it's own system to manage weapon switching" - OnChange=NiceGUISettings.InternalOnChange - OnLoadINI=NiceGUISettings.InternalOnLoadINI - End Object - ch_WeapManagement=WeaponManagement + Begin Object Class=moCheckBox Name=WeaponManagement + Caption="Nice weapon management" + ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + OnCreateComponent=WeaponManagement.InternalOnCreateComponent + IniOption="@Internal" + Hint="If checked, NicePack will use it's own system to manage weapon switching" + OnChange=NiceGUISettings.InternalOnChange + OnLoadINI=NiceGUISettings.InternalOnLoadINI + End Object + ch_WeapManagement=WeaponManagement - Begin Object Class=moCheckBox Name=AltSwitches - Caption="Alt fire switches modes" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" - OnCreateComponent=AltSwitches.InternalOnCreateComponent - IniOption="@Internal" - Hint="Assault-rifle only; if enabled - alt fire button switches between fire modes, otherwise - acts as an alt fire" - OnChange=NiceGUISettings.InternalOnChange - OnLoadINI=NiceGUISettings.InternalOnLoadINI - End Object - ch_AltSwitches=AltSwitches + Begin Object Class=moCheckBox Name=AltSwitches + Caption="Alt fire switches modes" + ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + OnCreateComponent=AltSwitches.InternalOnCreateComponent + IniOption="@Internal" + Hint="Assault-rifle only; if enabled - alt fire button switches between fire modes, otherwise - acts as an alt fire" + OnChange=NiceGUISettings.InternalOnChange + OnLoadINI=NiceGUISettings.InternalOnLoadINI + End Object + ch_AltSwitches=AltSwitches - Begin Object Class=moCheckBox Name=DispCounters - Caption="Display counters" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" - OnCreateComponent=DispCounters.InternalOnCreateComponent - IniOption="@Internal" - Hint="Toggles display of the various counters used by skills" - OnChange=NiceGUISettings.InternalOnChange - OnLoadINI=NiceGUISettings.InternalOnLoadINI - End Object - ch_DispCounters=DispCounters + Begin Object Class=moCheckBox Name=DispCounters + Caption="Display counters" + ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + OnCreateComponent=DispCounters.InternalOnCreateComponent + IniOption="@Internal" + Hint="Toggles display of the various counters used by skills" + OnChange=NiceGUISettings.InternalOnChange + OnLoadINI=NiceGUISettings.InternalOnLoadINI + End Object + ch_DispCounters=DispCounters - Begin Object Class=moCheckBox Name=DispWeapProgress - Caption="Display weapon progress" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" - OnCreateComponent=DispWeapProgress.InternalOnCreateComponent - IniOption="@Internal" - Hint="Displays weapon progress rate, however it's defined by a skill that's using this functionality" - OnChange=NiceGUISettings.InternalOnChange - OnLoadINI=NiceGUISettings.InternalOnLoadINI - End Object - ch_DisWeapProgress=DispWeapProgress + Begin Object Class=moCheckBox Name=DispWeapProgress + Caption="Display weapon progress" + ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + OnCreateComponent=DispWeapProgress.InternalOnCreateComponent + IniOption="@Internal" + Hint="Displays weapon progress rate, however it's defined by a skill that's using this functionality" + OnChange=NiceGUISettings.InternalOnChange + OnLoadINI=NiceGUISettings.InternalOnLoadINI + End Object + ch_DisWeapProgress=DispWeapProgress - Begin Object Class=moCheckBox Name=ShowHLMessages - Caption="Show Hardcore Level messages" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" - OnCreateComponent=ShowHLMessages.InternalOnCreateComponent - IniOption="@Internal" - Hint="Enable to be notified each time Hardcore Level is changed" - OnChange=NiceGUISettings.InternalOnChange - OnLoadINI=NiceGUISettings.InternalOnLoadINI - End Object - ch_ShowHLMessages=ShowHLMessages + Begin Object Class=moCheckBox Name=ShowHLMessages + Caption="Show Hardcore Level messages" + ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + OnCreateComponent=ShowHLMessages.InternalOnCreateComponent + IniOption="@Internal" + Hint="Enable to be notified each time Hardcore Level is changed" + OnChange=NiceGUISettings.InternalOnChange + OnLoadINI=NiceGUISettings.InternalOnLoadINI + End Object + ch_ShowHLMessages=ShowHLMessages - // WEAPON RELOAD SETTINGS - Begin Object Class=GUISectionBackground Name=RELOADBG - Caption="Weapon reload settings" - WinTop=0.012500 - WinLeft=0.505000 - WinWidth=0.495000 - WinHeight=0.287500 - RenderWeight=0.100100 - // OnPreDraw=WeaponsBG.InternalPreDraw - OnPreDraw=RELOADBG.InternalPreDraw - End Object - bg_RELOAD=RELOADBG + // WEAPON RELOAD SETTINGS + Begin Object Class=GUISectionBackground Name=RELOADBG + Caption="Weapon reload settings" + WinTop=0.012500 + WinLeft=0.505000 + WinWidth=0.495000 + WinHeight=0.287500 + RenderWeight=0.100100 + // OnPreDraw=WeaponsBG.InternalPreDraw + OnPreDraw=RELOADBG.InternalPreDraw + End Object + bg_RELOAD=RELOADBG - Begin Object Class=moCheckBox Name=CancelFire - Caption="Cancel reload by shooting" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" - OnCreateComponent=CancelFire.InternalOnCreateComponent - IniOption="@Internal" - Hint="If checked, you'll be able to cancel reload of converted weapons by shooting (when you have ammo)" - OnChange=NiceGUISettings.InternalOnChange - OnLoadINI=NiceGUISettings.InternalOnLoadINI - End Object - ch_CancelFire=CancelFire + Begin Object Class=moCheckBox Name=CancelFire + Caption="Cancel reload by shooting" + ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + OnCreateComponent=CancelFire.InternalOnCreateComponent + IniOption="@Internal" + Hint="If checked, you'll be able to cancel reload of converted weapons by shooting (when you have ammo)" + OnChange=NiceGUISettings.InternalOnChange + OnLoadINI=NiceGUISettings.InternalOnLoadINI + End Object + ch_CancelFire=CancelFire - Begin Object Class=moCheckBox Name=CancelSwitching - Caption="Cancel reload by switching weapons" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" - OnCreateComponent=CancelSwitching.InternalOnCreateComponent - IniOption="@Internal" - Hint="If checked, you'll be able to cancel reload of converted weapons by switching to different weapon" - OnChange=NiceGUISettings.InternalOnChange - OnLoadINI=NiceGUISettings.InternalOnLoadINI - End Object - ch_CancelSwitching=CancelSwitching + Begin Object Class=moCheckBox Name=CancelSwitching + Caption="Cancel reload by switching weapons" + ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + OnCreateComponent=CancelSwitching.InternalOnCreateComponent + IniOption="@Internal" + Hint="If checked, you'll be able to cancel reload of converted weapons by switching to different weapon" + OnChange=NiceGUISettings.InternalOnChange + OnLoadINI=NiceGUISettings.InternalOnLoadINI + End Object + ch_CancelSwitching=CancelSwitching - Begin Object Class=moCheckBox Name=CancelNades - Caption="Cancel reload by throwing grenades" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" - OnCreateComponent=CancelNades.InternalOnCreateComponent - IniOption="@Internal" - Hint="If checked, you'll be able to cancel reload of converted weapons by throwing a grenade" - OnChange=NiceGUISettings.InternalOnChange - OnLoadINI=NiceGUISettings.InternalOnLoadINI - End Object - ch_CancelNades=CancelNades + Begin Object Class=moCheckBox Name=CancelNades + Caption="Cancel reload by throwing grenades" + ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + OnCreateComponent=CancelNades.InternalOnCreateComponent + IniOption="@Internal" + Hint="If checked, you'll be able to cancel reload of converted weapons by throwing a grenade" + OnChange=NiceGUISettings.InternalOnChange + OnLoadINI=NiceGUISettings.InternalOnLoadINI + End Object + ch_CancelNades=CancelNades - Begin Object Class=moCheckBox Name=CancelAiming - Caption="Cancel reload by aiming" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" - OnCreateComponent=CancelAiming.InternalOnCreateComponent - IniOption="@Internal" - Hint="If checked, you'll be able to cancel reload of converted weapons by going into iron sights (when you have ammo)" - OnChange=NiceGUISettings.InternalOnChange - OnLoadINI=NiceGUISettings.InternalOnLoadINI - End Object - ch_CancelAiming=CancelAiming + Begin Object Class=moCheckBox Name=CancelAiming + Caption="Cancel reload by aiming" + ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + OnCreateComponent=CancelAiming.InternalOnCreateComponent + IniOption="@Internal" + Hint="If checked, you'll be able to cancel reload of converted weapons by going into iron sights (when you have ammo)" + OnChange=NiceGUISettings.InternalOnChange + OnLoadINI=NiceGUISettings.InternalOnLoadINI + End Object + ch_CancelAiming=CancelAiming - Begin Object Class=moCheckBox Name=ServerReload - Caption="My reload doesn't work" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" - OnCreateComponent=ServerReload.InternalOnCreateComponent - IniOption="@Internal" - Hint="Check this option ONLY in case converted weapons don't reload at all for you; this option should fix the problem, but then latency will affect both reload and active reload" - OnChange=NiceGUISettings.InternalOnChange - OnLoadINI=NiceGUISettings.InternalOnLoadINI - End Object - ch_ReloadWontWork=ServerReload + Begin Object Class=moCheckBox Name=ServerReload + Caption="My reload doesn't work" + ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + OnCreateComponent=ServerReload.InternalOnCreateComponent + IniOption="@Internal" + Hint="Check this option ONLY in case converted weapons don't reload at all for you; this option should fix the problem, but then latency will affect both reload and active reload" + OnChange=NiceGUISettings.InternalOnChange + OnLoadINI=NiceGUISettings.InternalOnLoadINI + End Object + ch_ReloadWontWork=ServerReload - // RANDOM SETTINGS - Begin Object Class=GUISectionBackground Name=randbg - Caption="Random settings" - WinTop=0.300000 - WinWidth=0.495000 - WinHeight=0.287500 - WinLeft=0.505000 - RenderWeight=0.100100 - // OnPreDraw=WeaponsBG.InternalPreDraw - OnPreDraw=randbg.InternalPreDraw - End Object - bg_RANDOM=randbg + // RANDOM SETTINGS + Begin Object Class=GUISectionBackground Name=randbg + Caption="Random settings" + WinTop=0.300000 + WinWidth=0.495000 + WinHeight=0.287500 + WinLeft=0.505000 + RenderWeight=0.100100 + // OnPreDraw=WeaponsBG.InternalPreDraw + OnPreDraw=randbg.InternalPreDraw + End Object + bg_RANDOM=randbg - Begin Object class=moComboBox Name=zedhbarpmethod - bReadOnly=true - CaptionWidth=0.000000 - Caption="Zed health bars" - Hint="Choose what health bars you want to see" - OnCreateComponent=zedhbarpmethod.InternalOnCreateComponent - OnChange=NiceGUISettings.InternalOnChange - OnLoadINI=NiceGUISettings.InternalOnLoadINI - End Object - mo_ZedHPBars=zedhbarpmethod + Begin Object class=moComboBox Name=zedhbarpmethod + bReadOnly=true + CaptionWidth=0.000000 + Caption="Zed health bars" + Hint="Choose what health bars you want to see" + OnCreateComponent=zedhbarpmethod.InternalOnCreateComponent + OnChange=NiceGUISettings.InternalOnChange + OnLoadINI=NiceGUISettings.InternalOnLoadINI + End Object + mo_ZedHPBars=zedhbarpmethod } \ No newline at end of file From be9e08c37b2ea7f98e8eb8766a1a021377b66929 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sat, 22 Jan 2022 14:14:36 +0400 Subject: [PATCH 07/30] less scrn hardcode, new guicbx copy-cat --- sources/GUI/NiceGUICheckBoxButton.uc | 13 +++++++++++ sources/GUI/NiceGUISettings.uc | 20 ++++++++-------- sources/GUI/NiceInvasionLoginMenu.uc | 23 ++++++++++--------- sources/NiceHumanPawn.uc | 6 ++--- sources/Perks/Firebug/NiceVetFirebug.uc | 2 +- sources/Weapons/NiceWeapon.uc | 4 ++-- sources/Weapons/Playable/Grenades/NiceNade.uc | 2 +- .../Incendiary/HuskGun/NiceHuskGunFire.uc | 2 +- 8 files changed, 43 insertions(+), 29 deletions(-) create mode 100644 sources/GUI/NiceGUICheckBoxButton.uc diff --git a/sources/GUI/NiceGUICheckBoxButton.uc b/sources/GUI/NiceGUICheckBoxButton.uc new file mode 100644 index 0000000..98a7150 --- /dev/null +++ b/sources/GUI/NiceGUICheckBoxButton.uc @@ -0,0 +1,13 @@ +class NiceGUICheckBoxButton extends GUICheckBoxButton; + +defaultproperties +{ + CheckedOverlay(0)=Texture'KF_InterfaceArt_tex.Menu.Checkbox' // checked + CheckedOverlay(1)=Texture'KF_InterfaceArt_tex.Menu.checkbox_highlight' // checked, mouse over + CheckedOverlay(2)=Texture'KF_InterfaceArt_tex.Menu.checkbox_highlight' // checked, focused + CheckedOverlay(3)=Texture'KF_InterfaceArt_tex.Menu.checkbox_dark' // checked, clicked + CheckedOverlay(4)=Texture'KF_InterfaceArt_tex.Menu.checkbox_dark' // checked, disabled + ImageIndex=0 + bAllOverlay=False + StyleName="CheckBox" +} \ No newline at end of file diff --git a/sources/GUI/NiceGUISettings.uc b/sources/GUI/NiceGUISettings.uc index 330ed1f..2ceaa06 100644 --- a/sources/GUI/NiceGUISettings.uc +++ b/sources/GUI/NiceGUISettings.uc @@ -157,7 +157,7 @@ defaultproperties Begin Object Class=moCheckBox Name=WeaponManagement Caption="Nice weapon management" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + ComponentClassName="NicePack.NiceGUICheckBoxButton" OnCreateComponent=WeaponManagement.InternalOnCreateComponent IniOption="@Internal" Hint="If checked, NicePack will use it's own system to manage weapon switching" @@ -168,7 +168,7 @@ defaultproperties Begin Object Class=moCheckBox Name=AltSwitches Caption="Alt fire switches modes" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + ComponentClassName="NicePack.NiceGUICheckBoxButton" OnCreateComponent=AltSwitches.InternalOnCreateComponent IniOption="@Internal" Hint="Assault-rifle only; if enabled - alt fire button switches between fire modes, otherwise - acts as an alt fire" @@ -179,7 +179,7 @@ defaultproperties Begin Object Class=moCheckBox Name=DispCounters Caption="Display counters" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + ComponentClassName="NicePack.NiceGUICheckBoxButton" OnCreateComponent=DispCounters.InternalOnCreateComponent IniOption="@Internal" Hint="Toggles display of the various counters used by skills" @@ -190,7 +190,7 @@ defaultproperties Begin Object Class=moCheckBox Name=DispWeapProgress Caption="Display weapon progress" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + ComponentClassName="NicePack.NiceGUICheckBoxButton" OnCreateComponent=DispWeapProgress.InternalOnCreateComponent IniOption="@Internal" Hint="Displays weapon progress rate, however it's defined by a skill that's using this functionality" @@ -201,7 +201,7 @@ defaultproperties Begin Object Class=moCheckBox Name=ShowHLMessages Caption="Show Hardcore Level messages" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + ComponentClassName="NicePack.NiceGUICheckBoxButton" OnCreateComponent=ShowHLMessages.InternalOnCreateComponent IniOption="@Internal" Hint="Enable to be notified each time Hardcore Level is changed" @@ -225,7 +225,7 @@ defaultproperties Begin Object Class=moCheckBox Name=CancelFire Caption="Cancel reload by shooting" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + ComponentClassName="NicePack.NiceGUICheckBoxButton" OnCreateComponent=CancelFire.InternalOnCreateComponent IniOption="@Internal" Hint="If checked, you'll be able to cancel reload of converted weapons by shooting (when you have ammo)" @@ -236,7 +236,7 @@ defaultproperties Begin Object Class=moCheckBox Name=CancelSwitching Caption="Cancel reload by switching weapons" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + ComponentClassName="NicePack.NiceGUICheckBoxButton" OnCreateComponent=CancelSwitching.InternalOnCreateComponent IniOption="@Internal" Hint="If checked, you'll be able to cancel reload of converted weapons by switching to different weapon" @@ -247,7 +247,7 @@ defaultproperties Begin Object Class=moCheckBox Name=CancelNades Caption="Cancel reload by throwing grenades" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + ComponentClassName="NicePack.NiceGUICheckBoxButton" OnCreateComponent=CancelNades.InternalOnCreateComponent IniOption="@Internal" Hint="If checked, you'll be able to cancel reload of converted weapons by throwing a grenade" @@ -258,7 +258,7 @@ defaultproperties Begin Object Class=moCheckBox Name=CancelAiming Caption="Cancel reload by aiming" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + ComponentClassName="NicePack.NiceGUICheckBoxButton" OnCreateComponent=CancelAiming.InternalOnCreateComponent IniOption="@Internal" Hint="If checked, you'll be able to cancel reload of converted weapons by going into iron sights (when you have ammo)" @@ -269,7 +269,7 @@ defaultproperties Begin Object Class=moCheckBox Name=ServerReload Caption="My reload doesn't work" - ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton" + ComponentClassName="NicePack.NiceGUICheckBoxButton" OnCreateComponent=ServerReload.InternalOnCreateComponent IniOption="@Internal" Hint="Check this option ONLY in case converted weapons don't reload at all for you; this option should fix the problem, but then latency will affect both reload and active reload" diff --git a/sources/GUI/NiceInvasionLoginMenu.uc b/sources/GUI/NiceInvasionLoginMenu.uc index 6f260a2..94e6868 100644 --- a/sources/GUI/NiceInvasionLoginMenu.uc +++ b/sources/GUI/NiceInvasionLoginMenu.uc @@ -8,16 +8,16 @@ function InitComponent(GUIController MyController, GUIComponent MyOwner){ local SRMenuAddition M; local int indexAfterScrn; // Setup panel classes. - Panels[0].ClassName = string(Class'ScrnBalanceSrv.ScrnTab_MidGamePerks'); + Panels[0].ClassName = string(class'ScrnTab_MidGamePerks'); Panels[1].ClassName = string(class'NicePanelSkills'); - Panels[2].ClassName = string(Class'SRTab_MidGameVoiceChat'); - Panels[3].ClassName = string(Class'SRTab_MidGameStats'); - Panels[0].Caption = Class'KFInvasionLoginMenu'.Default.Panels[1].Caption; + Panels[2].ClassName = string(class'SRTab_MidGameVoiceChat'); + Panels[3].ClassName = string(class'SRTab_MidGameStats'); + Panels[0].Caption = class'KFInvasionLoginMenu'.Default.Panels[1].Caption; Panels[1].Caption = "Skills"; - Panels[2].Caption = Class'KFInvasionLoginMenu'.Default.Panels[2].Caption; - Panels[0].Hint = Class'KFInvasionLoginMenu'.Default.Panels[1].Hint; + Panels[2].Caption = class'KFInvasionLoginMenu'.Default.Panels[2].Caption; + Panels[0].Hint = class'KFInvasionLoginMenu'.Default.Panels[1].Hint; Panels[1].Hint = "Customize your perk"; - Panels[2].Hint = Class'KFInvasionLoginMenu'.Default.Panels[2].Hint; + Panels[2].Hint = class'KFInvasionLoginMenu'.Default.Panels[2].Hint; b_Spec.Caption=class'KFTab_MidGamePerks'.default.b_Spec.Caption; b_MatchSetup.Caption=class'KFTab_MidGamePerks'.default.b_MatchSetup.Caption; b_KickVote.Caption=class'KFTab_MidGamePerks'.default.b_KickVote.Caption; @@ -28,17 +28,18 @@ function InitComponent(GUIController MyController, GUIComponent MyOwner){ b_Settings.Caption=class'KFTab_MidGamePerks'.default.b_Settings.Caption; b_Browser.Caption=class'KFTab_MidGamePerks'.default.b_Browser.Caption; // Other panels - Panels[4].ClassName = "ScrnBalanceSrv.ScrnTab_Achievements"; + Panels[4].ClassName = string(class'ScrnTab_Achievements'); Panels[4].Caption = "Achievements"; Panels[4].Hint = "ScrN server-side achievements"; - if(default.bShowScrnMenu){ - Panels[5].ClassName = "ScrnBalanceSrv.ScrnTab_UserSettings"; + if (default.bShowScrnMenu) + { + Panels[5].ClassName = string(class'ScrnTab_UserSettings'); Panels[5].Caption = "ScrN Features"; Panels[5].Hint = "ScrN Balance features, settings and info"; indexAfterScrn = 6; } else - indexAfterScrn = 5; + indexAfterScrn = 5; Panels[indexAfterScrn].ClassName = string(class'NiceGUISettings'); Panels[indexAfterScrn].Caption = "Nice settings"; Panels[indexAfterScrn].Hint = "Settings specific to NicePack mutator"; diff --git a/sources/NiceHumanPawn.uc b/sources/NiceHumanPawn.uc index ebbd6b0..a7dd51e 100644 --- a/sources/NiceHumanPawn.uc +++ b/sources/NiceHumanPawn.uc @@ -67,8 +67,8 @@ function ReplaceRequiredEquipment(){ Super.ReplaceRequiredEquipment(); RequiredEquipment[0] = String(class'NiceMachete'); RequiredEquipment[1] = String(class'Nice9mmPlus'); - RequiredEquipment[2] = String(class'ScrnBalanceSrv.ScrnFrag'); - RequiredEquipment[3] = String(class'ScrnBalanceSrv.ScrnSyringe'); + RequiredEquipment[2] = String(class'ScrnFrag'); + RequiredEquipment[3] = String(class'ScrnSyringe'); RequiredEquipment[4] = String(class'KFMod.Welder'); } simulated function int CalculateCalibrationScore(){ @@ -510,7 +510,7 @@ function bool AddInventory(inventory NewItem){ if((DualDeagle(weap) != none || Dual44Magnum(weap) != none || DualMK23Pistol(weap) != none) && weap.InventoryGroup != 4 ) { if(KFPRI != none && - ClassIsChildOf(KFPRI.ClientVeteranSkill, class'ScrnBalanceSrv.ScrnVetGunslinger')) + ClassIsChildOf(KFPRI.ClientVeteranSkill, class'ScrnVetGunslinger')) weap.InventoryGroup = 3; else weap.InventoryGroup = 2; diff --git a/sources/Perks/Firebug/NiceVetFirebug.uc b/sources/Perks/Firebug/NiceVetFirebug.uc index 6da1222..00e87f0 100644 --- a/sources/Perks/Firebug/NiceVetFirebug.uc +++ b/sources/Perks/Firebug/NiceVetFirebug.uc @@ -96,7 +96,7 @@ static function class GetNadeType(KFPlayerReplicationInfo KFPRI) //can't cook fire nades static function bool CanCookNade(KFPlayerReplicationInfo KFPRI, Weapon Weap) { - return GetNadeType(KFPRI) != class'ScrnBalanceSrv.ScrnFlameNade'; + return GetNadeType(KFPRI) != class'ScrnFlameNade'; } //v2.60: +60% faster charge with Husk Gun static function float GetReloadSpeedModifierStatic(KFPlayerReplicationInfo KFPRI, class Other) diff --git a/sources/Weapons/NiceWeapon.uc b/sources/Weapons/NiceWeapon.uc index 3adda40..efc2a0a 100644 --- a/sources/Weapons/NiceWeapon.uc +++ b/sources/Weapons/NiceWeapon.uc @@ -1626,8 +1626,8 @@ defaultproperties { recordedZoomTime=-1.000000 SecondaryCharge=1 - LaserAttachmentClass=Class'ScrnBalanceSrv.ScrnLaserAttachmentFirstPerson' - LaserDotClass=Class'ScrnBalanceSrv.ScrnLocalLaserDot' + LaserAttachmentClass=Class'ScrnLaserAttachmentFirstPerson' + LaserDotClass=Class'ScrnLocalLaserDot' LaserAttachmentBone="LightBone" MagazineBone="Magazine" bHasChargePhase=True diff --git a/sources/Weapons/Playable/Grenades/NiceNade.uc b/sources/Weapons/Playable/Grenades/NiceNade.uc index 1a2b71e..48b778b 100644 --- a/sources/Weapons/Playable/Grenades/NiceNade.uc +++ b/sources/Weapons/Playable/Grenades/NiceNade.uc @@ -135,7 +135,7 @@ simulated function HurtRadius( float DamageAmount, float DamageRadius, class= 5 && Stats != none ) - class'ScrnBalanceSrv.ScrnAchievements'.static.ProgressAchievementByID(Stats.Rep, 'SuicideBomber', 1); + class'ScrnAchievements'.static.ProgressAchievementByID(Stats.Rep, 'SuicideBomber', 1); if ( NumKilled >= 4 ) { diff --git a/sources/Weapons/Playable/Incendiary/HuskGun/NiceHuskGunFire.uc b/sources/Weapons/Playable/Incendiary/HuskGun/NiceHuskGunFire.uc index a25fa63..d806ad1 100644 --- a/sources/Weapons/Playable/Incendiary/HuskGun/NiceHuskGunFire.uc +++ b/sources/Weapons/Playable/Incendiary/HuskGun/NiceHuskGunFire.uc @@ -11,7 +11,7 @@ function Timer() // if (AmmoInCharge == MaxChargeAmmo) { // Player = Level.GetLocalPlayerController(); // if (Player != none) - // Player.ReceiveLocalizedMessage(class'ScrnBalanceSrv.ScrnPlayerMessage',0); + // Player.ReceiveLocalizedMessage(class'ScrnPlayerMessage',0); // } } super.Timer(); From f72cb160ed6ce2d7c9a683cd5943534d4ac390ab Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sat, 22 Jan 2022 15:32:55 +0400 Subject: [PATCH 08/30] fix portrait bullshi on windows resize --- sources/GUI/NiceLobbyMenu.uc | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/sources/GUI/NiceLobbyMenu.uc b/sources/GUI/NiceLobbyMenu.uc index fd2fd75..b89db7c 100644 --- a/sources/GUI/NiceLobbyMenu.uc +++ b/sources/GUI/NiceLobbyMenu.uc @@ -78,13 +78,29 @@ function InitComponent(GUIController MyC, GUIComponent MyO) { super(UT2k4MainPage).InitComponent(MyC, MyO); - i_Portrait.WinTop = PlayerPortraitBG.ActualTop() + 30; - i_Portrait.WinHeight = PlayerPortraitBG.ActualHeight() - 36; - + FixPortrait(); t_ChatBox.FocusInstead = PerkClickLabel; } +event ResolutionChanged(int ResX, int ResY) +{ + super.ResolutionChanged(ResX, ResY); + FixPortrait(); +} + + +// FUCKING TWI, YOUR FUCKING BUGS +final private function bool FixPortrait() +{ + i_Portrait.WinTop = PlayerPortraitBG.RelativeTop(i_Portrait.WinTop); // ActualTop() + 30; + i_Portrait.WinHeight = PlayerPortraitBG.RelativeHeight(i_Portrait.WinHeight); // ActualHeight() - 36; + // log(">>> HideLobbyMenu: FixPortrait() called!!!"); + + return false; +} + + // Called when the Menu Owner is opened event Opened(GUIComponent Sender) { From 51ce9f52fac01414ecc3a17277a126beb1dd3453 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sat, 22 Jan 2022 20:08:36 +0400 Subject: [PATCH 09/30] accessed None 'MyTrader' fix --- sources/GUI/NicePanelSkills.uc | 1 + sources/NicePlayerController.uc | 95 +++++++++++++++++++++++++++++ sources/Perks/NiceVeterancyTypes.uc | 1 + 3 files changed, 97 insertions(+) diff --git a/sources/GUI/NicePanelSkills.uc b/sources/GUI/NicePanelSkills.uc index 65ba5b9..c81517c 100644 --- a/sources/GUI/NicePanelSkills.uc +++ b/sources/GUI/NicePanelSkills.uc @@ -1,4 +1,5 @@ class NicePanelSkills extends Settings_Tabs; +// TODO change parent class / background var automated NiceGUIPerkButton skillButtonA[5], skillButtonB[5]; function ShowPanel(bool bShow){ local int i; diff --git a/sources/NicePlayerController.uc b/sources/NicePlayerController.uc index 52926c1..bc7d74f 100644 --- a/sources/NicePlayerController.uc +++ b/sources/NicePlayerController.uc @@ -1444,6 +1444,101 @@ exec simulated function Siren(float value) sirenScreamMod = value; } + +// copy-cat to fix MyTrader accessed none log spam +function ClientLocationalVoiceMessage(PlayerReplicationInfo Sender, + PlayerReplicationInfo Recipient, + name MessageType, byte MessageID, + optional Pawn SenderPawn, optional vector SenderLocation) +{ + local VoicePack Voice; + local ShopVolume Shop; + + if (Sender == none || Sender.VoiceType == none || Player.Console == none || Level.NetMode == NM_DedicatedServer) + { + return; + } + + Voice = Spawn(Sender.VoiceType, self); + if (KFVoicePack(Voice) != none) + { + if (MessageType == 'TRADER') + { + if (Pawn != none && MessageID >= 4) + { + foreach Pawn.TouchingActors(class'ShopVolume', Shop) + { + // fix this + if (Shop.MyTrader != none) + SenderLocation = Shop.MyTrader.Location; + else + SenderLocation = Shop.Location; + + // Only play the 30 Seconds remaining messages come across as Locational Speech if we're in the Shop + if (MessageID == 4) + { + return; + } + else if (MessageID == 5) + { + MessageID = 999; + } + + break; + } + } + + // Only play the 10 Seconds remaining message if we are in the Shop + // and only play the 30 seconds remaning message if we haven't been to the Shop + if (MessageID == 5 || (MessageID == 4 && bHasHeardTraderWelcomeMessage)) + { + return; + } + else if (MessageID == 999) + { + MessageID = 5; + } + + // Store the fact that we've heard the Trader's Welcome message on the client + if (MessageID == 7) + { + bHasHeardTraderWelcomeMessage = true; + } + // If we're hearing the Shop's Closed Message, reset the Trader's Welcome message flag + else if (MessageID == 6) + { + bHasHeardTraderWelcomeMessage = false; + } + + KFVoicePack(Voice).ClientInitializeLocational(Sender, Recipient, MessageType, MessageID, SenderPawn, SenderLocation); + + if (MessageID > 6 /*&& bBuyMenuIsOpen*/) + { + // TODO: Show KFVoicePack(Voice).GetClientParsedMessage() in the Buy Menu + } + else if (KFVoicePack(Voice).GetClientParsedMessage() != "") + { + // Radio commands print to Text + TeamMessage(Sender, KFVoicePack(Voice).GetClientParsedMessage(), 'Trader'); + } + } + else + { + KFVoicePack(Voice).ClientInitializeLocational(Sender, Recipient, MessageType, MessageID, SenderPawn, SenderLocation); + + if (KFVoicePack(Voice).GetClientParsedMessage() != "") + { + TeamMessage(Sender, KFVoicePack(Voice).GetClientParsedMessage(), 'Voice'); + } + } + } + else if (Voice != none) + { + Voice.ClientInitialize(Sender, Recipient, MessageType, MessageID); + } +} + + defaultproperties { nicePlayerInfoVersionNumber=1 diff --git a/sources/Perks/NiceVeterancyTypes.uc b/sources/Perks/NiceVeterancyTypes.uc index 19ebff2..24560b4 100644 --- a/sources/Perks/NiceVeterancyTypes.uc +++ b/sources/Perks/NiceVeterancyTypes.uc @@ -312,6 +312,7 @@ static function SpecialHUDInfo(KFPlayerReplicationInfo KFPRI, Canvas C) foreach C.ViewPort.Actor.DynamicActors(class'KFMonster', KFEnemy) { + // check with stopwatch if (KFEnemy.Health > hp && (!KFEnemy.Cloaked() || KFEnemy.bZapped || KFEnemy.bSpotted) && VSizeSquared(KFEnemy.Location - C.ViewPort.Actor.Pawn.Location) < MaxDistanceSquared) HKF.DrawHealthBar(C, KFEnemy, KFEnemy.Health, KFEnemy.HealthMax , 50.0); } From 3120047995ca3c6a97b26d4cf021e79d31ba7a2e Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sat, 22 Jan 2022 20:13:13 +0400 Subject: [PATCH 10/30] better parent class for skill menu --- sources/GUI/NicePanelSkills.uc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/GUI/NicePanelSkills.uc b/sources/GUI/NicePanelSkills.uc index c81517c..fac11a5 100644 --- a/sources/GUI/NicePanelSkills.uc +++ b/sources/GUI/NicePanelSkills.uc @@ -1,5 +1,5 @@ -class NicePanelSkills extends Settings_Tabs; -// TODO change parent class / background +class NicePanelSkills extends UT2K4TabPanel; +// TODO add background var automated NiceGUIPerkButton skillButtonA[5], skillButtonB[5]; function ShowPanel(bool bShow){ local int i; From b9fc5b85739be737c95cfb49ffe228a046cc58b5 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sat, 22 Jan 2022 20:22:40 +0400 Subject: [PATCH 11/30] test fix for bloat BileExplosionLoc accessed none --- sources/Zeds/Nice/NiceZombieBloat.uc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sources/Zeds/Nice/NiceZombieBloat.uc b/sources/Zeds/Nice/NiceZombieBloat.uc index 746d971..ef95593 100644 --- a/sources/Zeds/Nice/NiceZombieBloat.uc +++ b/sources/Zeds/Nice/NiceZombieBloat.uc @@ -200,7 +200,10 @@ simulated function Tick(float deltatime) { local vector BileExplosionLoc; local FleshHitEmitter GibBileExplosion; + Super.tick(deltatime); + + if( Role == ROLE_Authority && bMovingPukeAttack ) { // Keep moving toward the target until the timer runs out (anim finishes) @@ -243,7 +246,8 @@ simulated function Tick(float deltatime) { if ( !class'GameInfo'.static.UseLowGore() ) { - BileExplosionLoc = self.Location; + // remove self. + BileExplosionLoc = Location; BileExplosionLoc.z += (CollisionHeight - (CollisionHeight * 0.5)); if (bDecapitated) @@ -258,7 +262,7 @@ simulated function Tick(float deltatime) } else { - BileExplosionLoc = self.Location; + BileExplosionLoc = Location; BileExplosionLoc.z += (CollisionHeight - (CollisionHeight * 0.5)); GibBileExplosion = Spawn(class 'LowGoreBileExplosion',self,, BileExplosionLoc ); From de6567f15a2e20399b55c4dfaa8364ba104ff195 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sat, 22 Jan 2022 20:36:30 +0400 Subject: [PATCH 12/30] Disable `breathsound` log on pawn spawn --- sources/NiceHumanPawn.uc | 34 ++++++++++++++++++++++++++++ sources/Zeds/Nice/NiceZombieBloat.uc | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/sources/NiceHumanPawn.uc b/sources/NiceHumanPawn.uc index a7dd51e..a0154b3 100644 --- a/sources/NiceHumanPawn.uc +++ b/sources/NiceHumanPawn.uc @@ -863,6 +863,40 @@ simulated function AltFire(optional float F){ super.AltFire(F); } +// added copy-cated function to disable some log +simulated function Setup(xUtil.PlayerRecord rec, optional bool bLoadNow) +{ + local ScrnPlayerController PC; + local string CN; + + PC = ScrnPlayerController(Controller); + if ( PC != none && IsLocallyControlled() ) + { + // check this only on player side, because it stores + // RedCharacter & BlueCharacter in the config + CN = rec.DefaultName; + if ( !PC.ValidateCharacter(CN) ) { + // character invalid, change it valid one, which was set up in ValidateCharacter() + rec = class'xUtil'.static.FindPlayerRecord(CN); + PC.ChangeCharacter(CN); + } + } + + super(KFPawn).Setup(rec, bLoadNow); + + if( class(Species) != none ) + { + BreathingSound = class'KFDARSoundGroup'.default.BreathingSound; + } + else if( class(Species) != none ) + { + BreathingSound = class'KFFemaleSoundGroup'.default.BreathingSound; + } + // disable the log!!! + // log(BreathingSound); +} + + defaultproperties { defaultInvincibilityDuration=2.000000 diff --git a/sources/Zeds/Nice/NiceZombieBloat.uc b/sources/Zeds/Nice/NiceZombieBloat.uc index ef95593..c3ab99b 100644 --- a/sources/Zeds/Nice/NiceZombieBloat.uc +++ b/sources/Zeds/Nice/NiceZombieBloat.uc @@ -265,7 +265,7 @@ simulated function Tick(float deltatime) BileExplosionLoc = Location; BileExplosionLoc.z += (CollisionHeight - (CollisionHeight * 0.5)); - GibBileExplosion = Spawn(class 'LowGoreBileExplosion',self,, BileExplosionLoc ); + GibBileExplosion = Spawn(class'LowGoreBileExplosion',self,, BileExplosionLoc ); bPlayBileSplash = true; } } From 9c4ec1b0950c657860c7b808a76539505f146cc6 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sat, 22 Jan 2022 20:42:34 +0400 Subject: [PATCH 13/30] NiceMonsterController SetEnemy newEnemy none fix --- sources/Zeds/NiceMonsterController.uc | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/sources/Zeds/NiceMonsterController.uc b/sources/Zeds/NiceMonsterController.uc index f0165d7..60b680c 100644 --- a/sources/Zeds/NiceMonsterController.uc +++ b/sources/Zeds/NiceMonsterController.uc @@ -414,36 +414,47 @@ Begin: } WhatToDoNext(99); } + function bool SetEnemy( pawn newEnemy, optional bool bHateMonster, - optional float MonsterHateChanceOverride){ + optional float MonsterHateChanceOverride) +{ local NiceMonster niceZed; local NiceZombieFleshpound niceFP; local bool bCanForceFight; + // Can we fight anything? niceZed = NiceMonster(pawn); niceFP = NiceZombieFleshpound(niceZed); - if(niceZed != none) - bCanForceFight = + + if (niceZed != none) + { + bCanForceFight = KFMonster(pawn).HeadHealth <= 0 || KFMonster(pawn).bDecapitated - || newEnemy.Health <= 15; + || (newEnemy != none && newEnemy.Health <= 15); + } + if (niceFP != none && niceFP.IsInState('RageCharging')) bCanForceFight = false; - if(newEnemy != none) - bCanForceFight = bCanForceFight - && newEnemy.Health > 0 && newEnemy != enemy; + + if (newEnemy != none) + bCanForceFight = bCanForceFight && newEnemy.Health > 0 && newEnemy != enemy; else bCanForceFight = false; + // Do fight if we can - if(bCanForceFight){ + if(bCanForceFight) + { ChangeEnemy(newEnemy, true); FightEnemy(false); return true; } + // Otherwise - do the usual stupid stuff return super.SetEnemy(newEnemy, bHateMonster, monsterHateChanceOverride); } + simulated function AddKillAssistant(Controller PC, float damage){ local bool bIsalreadyAssistant; local int i; From 42f172f0dfa75c33964d9090a04a4e75c71f0e92 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sat, 22 Jan 2022 21:57:38 +0400 Subject: [PATCH 14/30] chete se pickup removed --- sources/NicePack.uc | 34 +++++++++++++++-------------- sources/Zeds/Nice/NiceZombieClot.uc | 4 ++++ 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/sources/NicePack.uc b/sources/NicePack.uc index 40fc897..eefb7b6 100644 --- a/sources/NicePack.uc +++ b/sources/NicePack.uc @@ -176,14 +176,14 @@ simulated function PostBeginPlay(){ class'ScrnHorzineVestPickup'.default.cost = 750; class'NicePack'.default.Mut = self; // Gun skins - class'NiceMaulerPickup'.default.VariantClasses[class'NiceMaulerPickup'.default.VariantClasses.length] = class'ScrnBalanceSrv.ScrnSPSniperPickup'; + class'NiceMaulerPickup'.default.VariantClasses[class'NiceMaulerPickup'.default.VariantClasses.length] = class'ScrnSPSniperPickup'; class'NiceDeaglePickup'.default.VariantClasses[class'NiceDeaglePickup'.default.VariantClasses.length] = class'SkinExecutionerPickup'; class'NiceDualDeaglePickup'.default.VariantClasses[class'NiceDualDeaglePickup'.default.VariantClasses.length] = class'SkinDualExecutionerPickup'; class'NiceMagnumPickup'.default.VariantClasses[class'NiceMagnumPickup'.default.VariantClasses.length] = class'SkinCowboyMagnumPickup'; class'NiceDualMagnumPickup'.default.VariantClasses[class'NiceDualMagnumPickup'.default.VariantClasses.length] = class'SkinDualCowboyMagnumPickup'; class'NiceWinchesterPickup'.default.VariantClasses[class'NiceWinchesterPickup'.default.VariantClasses.length] = class'SkinRetroLARPickup'; class'NiceM14EBRPickup'.default.VariantClasses[class'NiceM14EBRPickup'.default.VariantClasses.length] = class'SkinM14EBR2ProPickup'; - class'ScrnBalanceSrv.ScrnKrissMPickup'.default.VariantClasses[class'ScrnBalanceSrv.ScrnKrissMPickup'.default.VariantClasses.length] = class'SkinGoldenKrissPickup'; + class'ScrnKrissMPickup'.default.VariantClasses[class'ScrnKrissMPickup'.default.VariantClasses.length] = class'SkinGoldenKrissPickup'; class'NiceSCARMK17Pickup'.default.VariantClasses[class'NiceSCARMK17Pickup'.default.VariantClasses.length] = class'SkinCamoSCARMK17Pickup'; // Abilities class'NiceAbilityManager'.default.events.static.AddAdapter(class'NiceSharpshooterAbilitiesAdapter', level); @@ -471,11 +471,11 @@ simulated function bool CheckReplacement(Actor Other, out byte bSuperRelevant){ local MeanReplicationInfo meanRI; local PlayerReplicationInfo pri; // Replace loot on levels - if(Other.class == class'KFRandomItemSpawn' || Other.class == class'ScrnBalanceSrv.ScrnRandomItemSpawn'){ + if(Other.class == class'KFRandomItemSpawn' || Other.class == class'ScrnRandomItemSpawn'){ ReplaceWith(Other, string(class'NiceRandomItemSpawn')); return false; } - else if(Other.class == class'KFAmmoPickup' || Other.class == class'ScrnBalanceSrv.ScrnAmmoPickup') { + else if(Other.class == class'KFAmmoPickup' || Other.class == class'ScrnAmmoPickup') { ReplaceWith(Other, string(class'NiceAmmoPickup')); return false; } @@ -1067,18 +1067,20 @@ defaultproperties bNoLateFFIncrease=True junkieNextGoal=1 bIsPreGame=True - pickupReplaceArray(0)=(vanillaClass=Class'KFMod.MAC10Pickup',scrnClass=Class'ScrnBalanceSrv.ScrnMAC10Pickup',NewClass=class'NiceMAC10Pickup') - pickupReplaceArray(1)=(vanillaClass=Class'KFMod.WinchesterPickup',scrnClass=Class'ScrnBalanceSrv.ScrnWinchesterPickup',NewClass=class'NiceWinchesterPickup') - pickupReplaceArray(2)=(vanillaClass=Class'KFMod.CrossbowPickup',scrnClass=Class'ScrnBalanceSrv.ScrnCrossbowPickup',NewClass=class'NiceCrossbowPickup') - pickupReplaceArray(3)=(vanillaClass=Class'KFMod.SPSniperPickup',scrnClass=Class'ScrnBalanceSrv.ScrnSPSniperPickup',NewClass=class'NiceMaulerPickup') - pickupReplaceArray(4)=(vanillaClass=Class'KFMod.M14EBRPickup',scrnClass=Class'ScrnBalanceSrv.ScrnM14EBRPickup',NewClass=class'NiceM14EBRPickup') - pickupReplaceArray(5)=(vanillaClass=Class'KFMod.M99Pickup',scrnClass=Class'ScrnBalanceSrv.ScrnM99Pickup',NewClass=class'NiceM99Pickup') - pickupReplaceArray(6)=(vanillaClass=Class'KFMod.ShotgunPickup',scrnClass=Class'ScrnBalanceSrv.ScrnShotgunPickup',NewClass=class'NiceShotgunPickup') - pickupReplaceArray(7)=(vanillaClass=Class'KFMod.BoomStickPickup',scrnClass=Class'ScrnBalanceSrv.ScrnBoomStickPickup',NewClass=class'NiceBoomStickPickup') - pickupReplaceArray(8)=(vanillaClass=Class'KFMod.NailGunPickup',scrnClass=Class'ScrnBalanceSrv.ScrnNailGunPickup',NewClass=class'NiceNailGunPickup') - pickupReplaceArray(9)=(vanillaClass=Class'KFMod.KSGPickup',scrnClass=Class'ScrnBalanceSrv.ScrnKSGPickup',NewClass=class'NiceKSGPickup') - pickupReplaceArray(10)=(vanillaClass=Class'KFMod.BenelliPickup',scrnClass=Class'ScrnBalanceSrv.ScrnBenelliPickup',NewClass=class'NiceBenelliPickup') - pickupReplaceArray(11)=(vanillaClass=Class'KFMod.AA12Pickup',scrnClass=Class'ScrnBalanceSrv.ScrnAA12Pickup',NewClass=class'NiceAA12Pickup') + pickupReplaceArray(0)=(vanillaClass=Class'KFMod.MAC10Pickup',scrnClass=Class'ScrnMAC10Pickup',NewClass=class'NiceMAC10Pickup') + pickupReplaceArray(1)=(vanillaClass=Class'KFMod.WinchesterPickup',scrnClass=Class'ScrnWinchesterPickup',NewClass=class'NiceWinchesterPickup') + pickupReplaceArray(2)=(vanillaClass=Class'KFMod.CrossbowPickup',scrnClass=Class'ScrnCrossbowPickup',NewClass=class'NiceCrossbowPickup') + pickupReplaceArray(3)=(vanillaClass=Class'KFMod.SPSniperPickup',scrnClass=Class'ScrnSPSniperPickup',NewClass=class'NiceMaulerPickup') + pickupReplaceArray(4)=(vanillaClass=Class'KFMod.M14EBRPickup',scrnClass=Class'ScrnM14EBRPickup',NewClass=class'NiceM14EBRPickup') + pickupReplaceArray(5)=(vanillaClass=Class'KFMod.M99Pickup',scrnClass=Class'ScrnM99Pickup',NewClass=class'NiceM99Pickup') + pickupReplaceArray(6)=(vanillaClass=Class'KFMod.ShotgunPickup',scrnClass=Class'ScrnShotgunPickup',NewClass=class'NiceShotgunPickup') + pickupReplaceArray(7)=(vanillaClass=Class'KFMod.BoomStickPickup',scrnClass=Class'ScrnBoomStickPickup',NewClass=class'NiceBoomStickPickup') + pickupReplaceArray(8)=(vanillaClass=Class'KFMod.NailGunPickup',scrnClass=Class'ScrnNailGunPickup',NewClass=class'NiceNailGunPickup') + pickupReplaceArray(9)=(vanillaClass=Class'KFMod.KSGPickup',scrnClass=Class'ScrnKSGPickup',NewClass=class'NiceKSGPickup') + pickupReplaceArray(10)=(vanillaClass=Class'KFMod.BenelliPickup',scrnClass=Class'ScrnBenelliPickup',NewClass=class'NiceBenelliPickup') + pickupReplaceArray(11)=(vanillaClass=Class'KFMod.AA12Pickup',scrnClass=Class'ScrnAA12Pickup',NewClass=class'NiceAA12Pickup') + pickupReplaceArray(12)=(vanillaClass=Class'KFMod.MachetePickup',scrnClass=Class'ScrnMachetePickup',NewClass=class'NiceAxePickup') + NiceUniversalDescriptions(0)="Survive on %m in ScrN Balance mode" NiceUniversalDescriptions(1)="Survive on %m in ScrN Balance mode with Hardcore Level 5+" NiceUniversalDescriptions(2)="Survive on %m in ScrN Balance mode with Hardcore Level 10+" diff --git a/sources/Zeds/Nice/NiceZombieClot.uc b/sources/Zeds/Nice/NiceZombieClot.uc index 0e73657..57875e8 100644 --- a/sources/Zeds/Nice/NiceZombieClot.uc +++ b/sources/Zeds/Nice/NiceZombieClot.uc @@ -1,14 +1,17 @@ // Zombie Monster for KF Invasion gametype class NiceZombieClot extends NiceZombieClotBase; + #exec OBJ LOAD FILE=KF_Freaks_Trip.ukx #exec OBJ LOAD FILE=KF_Specimens_Trip_T.utx #exec OBJ LOAD FILE=MeanZedSkins.utx + function ClawDamageTarget() { local vector PushDir; local KFPawn KFP; local float UsedMeleeDamage; + // TODO Controller fix if( MeleeDamage > 1 ) { UsedMeleeDamage = (MeleeDamage - (MeleeDamage * 0.05)) + (MeleeDamage * (FRand() * 0.1)); @@ -40,6 +43,7 @@ function ClawDamageTarget() } } } + function RangedAttack(Actor A) { if ( bShotAnim || Physics == PHYS_Swimming) From aa20f8baa34efd1d4f1611f792f55a2be37aaa91 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sun, 23 Jan 2022 00:08:06 +0400 Subject: [PATCH 15/30] backgrounds for skill menu, better logic --- sources/GUI/NicePanelSkills.uc | 117 ++++++++++++++++++++++++--------- 1 file changed, 86 insertions(+), 31 deletions(-) diff --git a/sources/GUI/NicePanelSkills.uc b/sources/GUI/NicePanelSkills.uc index fac11a5..23d6a5f 100644 --- a/sources/GUI/NicePanelSkills.uc +++ b/sources/GUI/NicePanelSkills.uc @@ -1,37 +1,92 @@ class NicePanelSkills extends UT2K4TabPanel; -// TODO add background -var automated NiceGUIPerkButton skillButtonA[5], skillButtonB[5]; -function ShowPanel(bool bShow){ + +var automated NiceGUIPerkButton skillButtonA[5], skillButtonB[5]; +var automated GUISectionBackground sb_big_left, sb_big_right; + +function ShowPanel(bool bShow) +{ local int i; local class niceVet; local NicePlayerController nicePlayer; - Super.ShowPanel(bShow); + + super.ShowPanel(bShow); + + // loops are for puss + sb_big_left.ManageComponent(skillButtonA[0]); + sb_big_left.ManageComponent(skillButtonA[1]); + sb_big_left.ManageComponent(skillButtonA[2]); + sb_big_left.ManageComponent(skillButtonA[3]); + sb_big_left.ManageComponent(skillButtonA[4]); + + sb_big_right.ManageComponent(skillButtonB[0]); + sb_big_right.ManageComponent(skillButtonB[1]); + sb_big_right.ManageComponent(skillButtonB[2]); + sb_big_right.ManageComponent(skillButtonB[3]); + sb_big_right.ManageComponent(skillButtonB[4]); + nicePlayer = NicePlayerController(PlayerOwner()); - if(nicePlayer != none) + if (nicePlayer != none) niceVet = class'NiceVeterancyTypes'.static.GetVeterancy(nicePlayer.PlayerReplicationInfo); - if(niceVet != none){ - for(i = 0;i < 5;i ++){ - skillButtonA[i].skillIndex = i; - skillButtonB[i].skillIndex = i; - skillButtonA[i].skillPerkIndex = niceVet.default.PerkIndex; - skillButtonB[i].skillPerkIndex = niceVet.default.PerkIndex; - skillButtonA[i].isAltSkill = false; - skillButtonB[i].isAltSkill = true; - skillButtonA[i].associatedSkill = niceVet.default.SkillGroupA[i]; - skillButtonB[i].associatedSkill = niceVet.default.SkillGroupB[i]; - } + if (niceVet != none) + { + for (i = 0;i < 5;i ++) + { + skillButtonA[i].skillIndex = i; + skillButtonB[i].skillIndex = i; + skillButtonA[i].skillPerkIndex = niceVet.default.PerkIndex; + skillButtonB[i].skillPerkIndex = niceVet.default.PerkIndex; + skillButtonA[i].isAltSkill = false; + skillButtonB[i].isAltSkill = true; + skillButtonA[i].associatedSkill = niceVet.default.SkillGroupA[i]; + skillButtonB[i].associatedSkill = niceVet.default.SkillGroupB[i]; + } } } + // size = (x=0.0125, y=0.0) ; (w=1.0, h=0.865) // setup caption defaultproperties { + // BACKGROUNDS + Begin Object Class=AltSectionBackground Name=skillbckgrndl + Caption="LEFT SKILLS" + LeftPadding=0.000000 + RightPadding=0.030000 + TopPadding=0.000000 + BottomPadding=0.000000 + WinTop=0.000000 + WinLeft=0.000000 + WinWidth=0.500000 + WinHeight=0.87 + bBoundToParent=True + bScaleToParent=True + OnPreDraw=skillbckgrndl.InternalPreDraw + End Object + sb_big_left=skillbckgrndl + + Begin Object Class=AltSectionBackground Name=skillbckgrndr + Caption="OBVIOUSLY RIGHT SKILLS" + LeftPadding=0.000000 + RightPadding=0.030000 + TopPadding=0.000000 + BottomPadding=0.000000 + WinTop=0.000000 + WinLeft=0.500000 + WinWidth=0.500000 + WinHeight=0.87 + bBoundToParent=True + bScaleToParent=True + OnPreDraw=skillbckgrndr.InternalPreDraw + End Object + sb_big_right=skillbckgrndr + + // buttons Begin Object Class=NiceGUIPerkButton Name=btn1A - WinTop=0.012500 + // WinTop=0.012500 WinWidth=0.495000 WinHeight=0.160000 - RenderWeight=2.000000 - TabOrder=1 + // RenderWeight=2.000000 + // TabOrder=1 bBoundToParent=True bScaleToParent=True bMouseOverSound=False @@ -41,11 +96,11 @@ defaultproperties skillButtonA(0)=btn1A Begin Object Class=NiceGUIPerkButton Name=btn2A - WinTop=0.188500 + // WinTop=0.188500 WinWidth=0.495000 WinHeight=0.160000 - RenderWeight=2.000000 - TabOrder=3 + // RenderWeight=2.000000 + // TabOrder=3 bBoundToParent=True bScaleToParent=True bMouseOverSound=False @@ -55,11 +110,11 @@ defaultproperties skillButtonA(1)=btn2A Begin Object Class=NiceGUIPerkButton Name=btn3A - WinTop=0.364500 + // WinTop=0.364500 WinWidth=0.495000 WinHeight=0.160000 - RenderWeight=2.000000 - TabOrder=5 + // RenderWeight=2.000000 + // TabOrder=5 bBoundToParent=True bScaleToParent=True bMouseOverSound=False @@ -69,11 +124,11 @@ defaultproperties skillButtonA(2)=btn3A Begin Object Class=NiceGUIPerkButton Name=btn4A - WinTop=0.540500 + // WinTop=0.540500 WinWidth=0.495000 WinHeight=0.160000 - RenderWeight=2.000000 - TabOrder=7 + // RenderWeight=2.000000 + // TabOrder=7 bBoundToParent=True bScaleToParent=True bMouseOverSound=False @@ -83,11 +138,11 @@ defaultproperties skillButtonA(3)=btn4A Begin Object Class=NiceGUIPerkButton Name=btn5A - WinTop=0.716500 + // WinTop=0.716500 WinWidth=0.495000 WinHeight=0.160000 - RenderWeight=2.000000 - TabOrder=9 + // RenderWeight=2.000000 + // TabOrder=9 bBoundToParent=True bScaleToParent=True bMouseOverSound=False From d14b2290c326191386ff34faf935714c6c02cc2f Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sun, 23 Jan 2022 00:29:31 +0400 Subject: [PATCH 16/30] removed duplicate code in crawler classes --- sources/Zeds/Nice/NiceZombieCrawler.uc | 1 + sources/Zeds/Nice/NiceZombieCrawlerBase.uc | 98 +--------------------- 2 files changed, 3 insertions(+), 96 deletions(-) diff --git a/sources/Zeds/Nice/NiceZombieCrawler.uc b/sources/Zeds/Nice/NiceZombieCrawler.uc index f70ad70..a4ce6cf 100644 --- a/sources/Zeds/Nice/NiceZombieCrawler.uc +++ b/sources/Zeds/Nice/NiceZombieCrawler.uc @@ -69,6 +69,7 @@ simulated function int DoAnimAction( name AnimName ) } return Super.DoAnimAction(AnimName); } + simulated event SetAnimAction(name NewAction) { local int meleeAnimIndex; diff --git a/sources/Zeds/Nice/NiceZombieCrawlerBase.uc b/sources/Zeds/Nice/NiceZombieCrawlerBase.uc index f21f995..87eb48b 100644 --- a/sources/Zeds/Nice/NiceZombieCrawlerBase.uc +++ b/sources/Zeds/Nice/NiceZombieCrawlerBase.uc @@ -1,7 +1,7 @@ // Zombie Monster for KF Invasion gametype class NiceZombieCrawlerBase extends NiceMonster abstract; -#exec OBJ LOAD FILE= +// #exec OBJ LOAD FILE= var() float PounceSpeed; var bool bPouncing; var(Anims) name MeleeAirAnims[3]; // Attack anims for when flying through the air @@ -9,101 +9,7 @@ var(Anims) name MeleeAirAnims[3]; // Attack anims for when flying through th // NOTE: All Code resides in the child class(this class was only created to // eliminate hitching caused by loading default properties during play) //------------------------------------------------------------------------------- -function bool DoPounce() -{ - if ( bZapped || bIsCrouched || bWantsToCrouch || (Physics != PHYS_Walking) || VSize(Location - Controller.Target.Location) > (MeleeRange * 5) ) - return false; - Velocity = Normal(Controller.Target.Location-Location)*PounceSpeed; - Velocity.Z = JumpZ; - SetPhysics(PHYS_Falling); - ZombieSpringAnim(); - bPouncing=true; - return true; -} -simulated function ZombieSpringAnim() -{ - SetAnimAction('ZombieSpring'); -} -event Landed(vector HitNormal) -{ - bPouncing=false; - super.Landed(HitNormal); -} -event Bump(actor Other) -{ - // TODO: is there a better way - if(bPouncing && KFHumanPawn(Other)!=none ) - { - KFHumanPawn(Other).TakeDamage(((MeleeDamage - (MeleeDamage * 0.05)) + (MeleeDamage * (FRand() * 0.1))), self ,self.Location,self.velocity, class'NiceZedMeleeDamageType'); - if (KFHumanPawn(Other).Health <=0) - { - //TODO - move this to humanpawn.takedamage? Also see KFMonster.MeleeDamageTarget - KFHumanPawn(Other).SpawnGibs(self.rotation, 1); - } - //After impact, there'll be no momentum for further bumps - bPouncing=false; - } -} -// Blend his attacks so he can hit you in mid air. -simulated function int DoAnimAction( name AnimName ) -{ - if( AnimName=='InAir_Attack1' || AnimName=='InAir_Attack2' ) - { - AnimBlendParams(1, 1.0, 0.0,, FireRootBone); - PlayAnim(AnimName,, 0.0, 1); - return 1; - } - if( AnimName=='HitF' ) - { - AnimBlendParams(1, 1.0, 0.0,, NeckBone); - PlayAnim(AnimName,, 0.0, 1); - return 1; - } - if( AnimName=='ZombieSpring' ) - { - PlayAnim(AnimName,,0.02); - return 0; - } - return Super.DoAnimAction(AnimName); -} -simulated event SetAnimAction(name NewAction) -{ - local int meleeAnimIndex; - if( NewAction=='' ) - Return; - if(NewAction == 'Claw') - { - meleeAnimIndex = Rand(2); - if( Physics == PHYS_Falling ) - { - NewAction = MeleeAirAnims[meleeAnimIndex]; - } - else - { - NewAction = meleeAnims[meleeAnimIndex]; - } - } - ExpectingChannel = DoAnimAction(NewAction); - if( AnimNeedsWait(NewAction) ) - { - bWaitForAnim = true; - } - if( Level.NetMode!=NM_Client ) - { - AnimAction = NewAction; - bResetAnimAct = True; - ResetAnimActTime = Level.TimeSeconds+0.3; - } -} -// The animation is full body and should set the bWaitForAnim flag -simulated function bool AnimNeedsWait(name TestAnim) -{ - if( TestAnim == 'ZombieSpring' || TestAnim == 'DoorBash' ) - { - return true; - } - return false; -} + defaultproperties { PounceSpeed=330.000000 From f6279ef65af5b06762efc821f0994d64f64dad8e Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sun, 23 Jan 2022 04:18:18 +0400 Subject: [PATCH 17/30] internal bools to disable skill captions --- sources/GUI/NicePanelSkills.uc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sources/GUI/NicePanelSkills.uc b/sources/GUI/NicePanelSkills.uc index 23d6a5f..e7302da 100644 --- a/sources/GUI/NicePanelSkills.uc +++ b/sources/GUI/NicePanelSkills.uc @@ -50,6 +50,7 @@ defaultproperties // BACKGROUNDS Begin Object Class=AltSectionBackground Name=skillbckgrndl Caption="LEFT SKILLS" + // bNoCaption=true LeftPadding=0.000000 RightPadding=0.030000 TopPadding=0.000000 @@ -66,6 +67,7 @@ defaultproperties Begin Object Class=AltSectionBackground Name=skillbckgrndr Caption="OBVIOUSLY RIGHT SKILLS" + // bNoCaption=true LeftPadding=0.000000 RightPadding=0.030000 TopPadding=0.000000 From 81347335adccb7d1c85b88bbeaa9bdff9add84e0 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sun, 23 Jan 2022 04:28:03 +0400 Subject: [PATCH 18/30] commented empty exec calls --- sources/Zeds/Nice/NiceZombieScrakeBase.uc | 2 +- sources/Zeds/Nice/NiceZombieStalkerBase.uc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/Zeds/Nice/NiceZombieScrakeBase.uc b/sources/Zeds/Nice/NiceZombieScrakeBase.uc index 75ec86a..6ccd9f6 100644 --- a/sources/Zeds/Nice/NiceZombieScrakeBase.uc +++ b/sources/Zeds/Nice/NiceZombieScrakeBase.uc @@ -2,7 +2,7 @@ // He's not quite as speedy as the other Zombies, But his attacks are TRULY damaging. class NiceZombieScrakeBase extends NiceMonster abstract; -#exec OBJ LOAD FILE= +// #exec OBJ LOAD FILE= var(Sounds) sound SawAttackLoopSound; // THe sound for the saw revved up, looping var(Sounds) sound ChainSawOffSound; //The sound of this zombie dieing without a head var bool bCharging; // Scrake charges when his health gets low diff --git a/sources/Zeds/Nice/NiceZombieStalkerBase.uc b/sources/Zeds/Nice/NiceZombieStalkerBase.uc index a16e42f..edc85c2 100644 --- a/sources/Zeds/Nice/NiceZombieStalkerBase.uc +++ b/sources/Zeds/Nice/NiceZombieStalkerBase.uc @@ -1,7 +1,7 @@ // Zombie Monster for KF Invasion gametype class NiceZombieStalkerBase extends NiceMonster abstract; -#exec OBJ LOAD FILE= +// #exec OBJ LOAD FILE= #exec OBJ LOAD FILE=KFX.utx #exec OBJ LOAD FILE=KF_BaseStalker.uax var float NextCheckTime; From 1fd77f1c15afb321beb063aaaf0803ce266d43b1 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sun, 23 Jan 2022 16:33:31 +0400 Subject: [PATCH 19/30] much better way to bleed pawns --- sources/Zeds/Mean/MeanBleedInventory.uc | 87 +++++++++++++++++++++++++ sources/Zeds/Mean/MeanZombieStalker.uc | 42 +++++++++--- 2 files changed, 120 insertions(+), 9 deletions(-) create mode 100644 sources/Zeds/Mean/MeanBleedInventory.uc diff --git a/sources/Zeds/Mean/MeanBleedInventory.uc b/sources/Zeds/Mean/MeanBleedInventory.uc new file mode 100644 index 0000000..b5d2701 --- /dev/null +++ b/sources/Zeds/Mean/MeanBleedInventory.uc @@ -0,0 +1,87 @@ +class MeanBleedInventory extends Inventory; + + +const dmtype_bleed=class'NiceDamTypeStalkerBleed'; +var private int maxBleedCount; +var private float fBleedPeriod; + +var private float fNextBleedTime; + +var float bleedLevel; +var MeanZombieCrawler stalker; + + +function Tick(float DeltaTime) +{ + fNextBleedTime = Level.TimeSeconds; + // start the timer + SetTimer(0.1, true); + // disable me, coz im too fast and resource hungry + Disable('Tick'); +} + + +event Timer() +{ + local pawn locpawn; + local bool amAlive; + local float bleedDamage; + + locpawn = Pawn(Owner); + amAlive = locpawn != none && locpawn.Health > 0; + + // if pawn owner is dead or bleed count is done - destroy + if (!amAlive || maxBleedCount < 0) + Destroy(); + + if (fNextBleedTime < Level.TimeSeconds) + { + maxBleedCount--; + fNextBleedTime += fBleedPeriod; + + bleedDamage = calcBleedDamage(bleedLevel, rand(7)); + if (bleedDamage < 1.0) + { + maxBleedCount = 0; + return; + } + + if (stalker != none) + locpawn.TakeDamage(bleedDamage, stalker, locpawn.Location, + vect(0, 0, 0), dmtype_bleed); + else + locpawn.TakeDamage(bleedDamage, locpawn, locpawn.Location, + vect(0, 0, 0), dmtype_bleed); + + if (locpawn.isA('KFPawn')) + { + KFPawn(locpawn).HealthToGive -= 2 * bleedLevel; + } + } +} + + +// Returns bleed damage, corresponding to given bleed level and damage scale. +// Rand(7) should be used as a scale. +// Separate function created to allow for lowest/highest damage value computing. +final private function int calcBleedDamage(float level, int scale) +{ + return level * (3 + scale); +} + + +// cleanup +function Destroyed() +{ + if (stalker != none) + stalker = none; + + super.Destroyed(); +} + + +defaultproperties +{ + maxBleedCount=7 + fBleedPeriod=1.500000 +} \ No newline at end of file diff --git a/sources/Zeds/Mean/MeanZombieStalker.uc b/sources/Zeds/Mean/MeanZombieStalker.uc index 53111d2..8d688e6 100644 --- a/sources/Zeds/Mean/MeanZombieStalker.uc +++ b/sources/Zeds/Mean/MeanZombieStalker.uc @@ -190,20 +190,44 @@ function bool MeleeDamageTarget(int hitdamage, vector pushdir) if (result && targetPawn != none) { - if (targetPawn.ShieldStrength > 100) - return result; - else if (targetPawn.ShieldStrength < 0) - effectStrenght = 1.0; - else - effectStrenght = (100 - targetPawn.ShieldStrength) * 0.01; + if (targetPawn.ShieldStrength > 100) + return result; + else if (targetPawn.ShieldStrength < 0) + effectStrenght = 1.0; + else + effectStrenght = (100 - targetPawn.ShieldStrength) * 0.01; - class'MeanReplicationInfo'.static - .findSZri(targetPawn.PlayerReplicationInfo) - .setBleeding(Self, effectStrenght); + MakeBleed(targetPawn, effectStrenght); } return result; } +final private function MakeBleed(NiceHumanPawn poorpawn, float effectStrenght) +{ + local Inventory I; + local bool bFoundPoison; + + if (poorpawn.Inventory != none) + { + for (I = poorpawn.Inventory; I != none; I = I.Inventory) + { + if (MeanBleedInventory(I) != none) + { + bFoundPoison = true; + MeanBleedInventory(I).stalker = self; + MeanBleedInventory(I).bleedLevel = effectStrenght; + } + } + } + if (!bFoundPoison) + { + I = Controller.Spawn(class(DynamicLoadObject(string(class'MeanBleedInventory'), class'Class'))); + MeanBleedInventory(I).stalker = self; + MeanBleedInventory(I).bleedLevel = effectStrenght; + I.GiveTo(poorpawn); + } +} + function RemoveHead() { Super(NiceMonster).RemoveHead(); From 137b90ec252f4577f0ffbe9405acf85c155187d7 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sun, 23 Jan 2022 16:37:56 +0400 Subject: [PATCH 20/30] a --- sources/Zeds/Mean/MeanBleedInventory.uc | 43 +++++++++++-------------- 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/sources/Zeds/Mean/MeanBleedInventory.uc b/sources/Zeds/Mean/MeanBleedInventory.uc index b5d2701..0e067b2 100644 --- a/sources/Zeds/Mean/MeanBleedInventory.uc +++ b/sources/Zeds/Mean/MeanBleedInventory.uc @@ -5,19 +5,15 @@ const dmtype_bleed=class'NiceDamTypeStalkerBleed'; var private int maxBleedCount; var private float fBleedPeriod; -var private float fNextBleedTime; - var float bleedLevel; var MeanZombieCrawler stalker; -function Tick(float DeltaTime) +event PostBeginPlay() { - fNextBleedTime = Level.TimeSeconds; + super.PostBeginPlay(); // start the timer - SetTimer(0.1, true); - // disable me, coz im too fast and resource hungry - Disable('Tick'); + SetTimer(fBleedPeriod, true); } @@ -34,33 +30,30 @@ event Timer() if (!amAlive || maxBleedCount < 0) Destroy(); - if (fNextBleedTime < Level.TimeSeconds) + maxBleedCount--; + + bleedDamage = calcBleedDamage(bleedLevel, rand(7)); + if (bleedDamage < 1.0) { - maxBleedCount--; - fNextBleedTime += fBleedPeriod; + maxBleedCount = 0; + return; + } - bleedDamage = calcBleedDamage(bleedLevel, rand(7)); - if (bleedDamage < 1.0) - { - maxBleedCount = 0; - return; - } - - if (stalker != none) - locpawn.TakeDamage(bleedDamage, stalker, locpawn.Location, + if (stalker != none) + locpawn.TakeDamage(bleedDamage, stalker, locpawn.Location, vect(0, 0, 0), dmtype_bleed); - else - locpawn.TakeDamage(bleedDamage, locpawn, locpawn.Location, + else + locpawn.TakeDamage(bleedDamage, locpawn, locpawn.Location, vect(0, 0, 0), dmtype_bleed); - if (locpawn.isA('KFPawn')) - { - KFPawn(locpawn).HealthToGive -= 2 * bleedLevel; - } + if (locpawn.isA('KFPawn')) + { + KFPawn(locpawn).HealthToGive -= 2 * bleedLevel; } } + // Returns bleed damage, corresponding to given bleed level and damage scale. // Rand(7) should be used as a scale. // Separate function created to allow for lowest/highest damage value computing. From 9b03198d32ea4ae897a5e4ff8b9878729a132dad Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sun, 23 Jan 2022 16:49:36 +0400 Subject: [PATCH 21/30] poison / bleed icons fix --- sources/GUI/NiceInteraction.uc | 73 +++++++++++++++++++++++----------- 1 file changed, 50 insertions(+), 23 deletions(-) diff --git a/sources/GUI/NiceInteraction.uc b/sources/GUI/NiceInteraction.uc index f6f7e11..ceb5312 100644 --- a/sources/GUI/NiceInteraction.uc +++ b/sources/GUI/NiceInteraction.uc @@ -18,14 +18,37 @@ event NotifyLevelChange(){ function RegisterMutator(NicePack activePack){ NicePackMutator = activePack; } -function bool isPoisoned(ScrnHumanPawn pwn){ - local Inventory I; - if(pwn.Inventory != none) - for(I = pwn.Inventory; I != none; I = I.Inventory) - if(I != none && MeanPoisonInventory(I) != none) - return true; - return false; + +final private function bool bIsPoisoned(ScrnHumanPawn pwn) +{ + local Inventory I; + + if (pwn.Inventory != none) + { + for (I = pwn.Inventory; I != none; I = I.Inventory) + { + if (MeanPoisonInventory(I) != none) + return true; + } + } + return false; } + +final private function bool bIsBleeding(ScrnHumanPawn pwn) +{ + local Inventory I; + + if (pwn.Inventory != none) + { + for (I = pwn.Inventory; I != none; I = I.Inventory) + { + if (MeanBleedInventory(I) != none) + return true; + } + } + return false; +} + function PostRender(Canvas C){ local int i; local NicePack niceMutator; @@ -48,24 +71,28 @@ function PostRender(Canvas C){ if(nicePlayer == none) return; scrnHUDInstance = ScrnHUD(nicePlayer.myHUD); + //// Draw bleed and poison icons - szRI = class'MeanReplicationInfo'.static.findSZri(ViewportOwner.Actor.PlayerReplicationInfo); offset = 4; - if(szRI != none){ - if(szRI.isBleeding){ - x = C.ClipX * 0.007; - y = C.ClipY * 0.93 - size * offset; - C.SetPos(x, y); - C.DrawTile(bleedIcon, size, size, 0, 0, bleedIcon.MaterialUSize(), bleedIcon.MaterialVSize()); - } - offset++; - if(isPoisoned(ScrnHumanPawn(C.ViewPort.Actor.Pawn))){ - x = C.ClipX * 0.007; - y = C.ClipY * 0.93 - size * offset; - C.SetPos(x, y); - C.DrawTile(poisonIcon, size, size, 0, 0, poisonIcon.MaterialUSize(), poisonIcon.MaterialVSize()); - } - } + // BLEED!!! + if (bIsBleeding(ScrnHumanPawn(C.ViewPort.Actor.Pawn))) + { + x = C.ClipX * 0.007; + y = C.ClipY * 0.93 - size * offset; + C.SetPos(x, y); + C.DrawTile(bleedIcon, size, size, 0, 0, bleedIcon.MaterialUSize(), bleedIcon.MaterialVSize()); + } + offset++; + // POISON!!! + if (bIsPoisoned(ScrnHumanPawn(C.ViewPort.Actor.Pawn))) + { + x = C.ClipX * 0.007; + y = C.ClipY * 0.93 - size * offset; + C.SetPos(x, y); + C.DrawTile(poisonIcon, size, size, 0, 0, poisonIcon.MaterialUSize(), poisonIcon.MaterialVSize()); + } + + if(niceWeap != none && niceWeap.bShowSecondaryCharge && scrnHUDInstance != none){ C.ColorModulate.X = 1; C.ColorModulate.Y = 1; From 5aa528995dd5e0355a5c3ecd2e33e21768a08717 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sun, 23 Jan 2022 17:03:23 +0400 Subject: [PATCH 22/30] reset bleedticks --- sources/Zeds/Mean/MeanBleedInventory.uc | 12 ++++++------ sources/Zeds/Mean/MeanZombieStalker.uc | 19 ++++++++++++------- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/sources/Zeds/Mean/MeanBleedInventory.uc b/sources/Zeds/Mean/MeanBleedInventory.uc index 0e067b2..29736bd 100644 --- a/sources/Zeds/Mean/MeanBleedInventory.uc +++ b/sources/Zeds/Mean/MeanBleedInventory.uc @@ -2,10 +2,10 @@ class MeanBleedInventory extends Inventory; const dmtype_bleed=class'NiceDamTypeStalkerBleed'; -var private int maxBleedCount; +var int maxBleedCount; var private float fBleedPeriod; -var float bleedLevel; +var int bleedLevel; var MeanZombieCrawler stalker; @@ -21,7 +21,7 @@ event Timer() { local pawn locpawn; local bool amAlive; - local float bleedDamage; + local int bleedDamage; locpawn = Pawn(Owner); amAlive = locpawn != none && locpawn.Health > 0; @@ -32,7 +32,7 @@ event Timer() maxBleedCount--; - bleedDamage = calcBleedDamage(bleedLevel, rand(7)); + bleedDamage = calcBleedDamage(); if (bleedDamage < 1.0) { maxBleedCount = 0; @@ -57,9 +57,9 @@ event Timer() // Returns bleed damage, corresponding to given bleed level and damage scale. // Rand(7) should be used as a scale. // Separate function created to allow for lowest/highest damage value computing. -final private function int calcBleedDamage(float level, int scale) +final private function int calcBleedDamage() { - return level * (3 + scale); + return bleedLevel * 7; } diff --git a/sources/Zeds/Mean/MeanZombieStalker.uc b/sources/Zeds/Mean/MeanZombieStalker.uc index 8d688e6..b68ed69 100644 --- a/sources/Zeds/Mean/MeanZombieStalker.uc +++ b/sources/Zeds/Mean/MeanZombieStalker.uc @@ -192,7 +192,7 @@ function bool MeleeDamageTarget(int hitdamage, vector pushdir) { 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; @@ -202,9 +202,10 @@ function bool MeleeDamageTarget(int hitdamage, vector pushdir) return result; } -final private function MakeBleed(NiceHumanPawn poorpawn, float effectStrenght) +final private function MakeBleed(NiceHumanPawn poorpawn, coerce int effectStrenght) { local Inventory I; + local MeanBleedInventory bleedinv; local bool bFoundPoison; if (poorpawn.Inventory != none) @@ -213,18 +214,22 @@ final private function MakeBleed(NiceHumanPawn poorpawn, float effectStrenght) { if (MeanBleedInventory(I) != none) { + bleedinv = MeanBleedInventory(I); bFoundPoison = true; - MeanBleedInventory(I).stalker = self; - MeanBleedInventory(I).bleedLevel = effectStrenght; + bleedinv.stalker = self; + bleedinv.bleedLevel = effectStrenght; + // reset bleed count + bleedinv.maxBleedCount = bleedinv.default.maxBleedCount; } } } if (!bFoundPoison) { I = Controller.Spawn(class(DynamicLoadObject(string(class'MeanBleedInventory'), class'Class'))); - MeanBleedInventory(I).stalker = self; - MeanBleedInventory(I).bleedLevel = effectStrenght; - I.GiveTo(poorpawn); + bleedinv = MeanBleedInventory(I); + bleedinv.stalker = self; + bleedinv.bleedLevel = effectStrenght; + bleedinv.GiveTo(poorpawn); } } From 45d331ab098f696766ebc721e473f553c067f923 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sun, 23 Jan 2022 17:08:46 +0400 Subject: [PATCH 23/30] shut meanrepinfo / removes bleed on heal fix --- sources/GUI/NiceInteraction.uc | 4 +- sources/NicePlayerController.uc | 8 +-- sources/NiceReplicationInfo.uc | 12 ++--- sources/Zeds/MeanReplicationInfo.uc | 84 ++--------------------------- 4 files changed, 10 insertions(+), 98 deletions(-) diff --git a/sources/GUI/NiceInteraction.uc b/sources/GUI/NiceInteraction.uc index ceb5312..c9d5f9d 100644 --- a/sources/GUI/NiceInteraction.uc +++ b/sources/GUI/NiceInteraction.uc @@ -49,12 +49,12 @@ final private function bool bIsBleeding(ScrnHumanPawn pwn) return false; } -function PostRender(Canvas C){ +function PostRender(Canvas C) +{ local int i; local NicePack niceMutator; local NiceHumanPawn nicePawn; local class niceVet; - local MeanReplicationInfo szRI; local NiceWeapon niceWeap; local NicePlayerController nicePlayer; local ScrnHUD scrnHUDInstance; diff --git a/sources/NicePlayerController.uc b/sources/NicePlayerController.uc index bc7d74f..7b67034 100644 --- a/sources/NicePlayerController.uc +++ b/sources/NicePlayerController.uc @@ -405,12 +405,12 @@ simulated event Destroyed(){ // Screw that simulated function ClientWeaponDestroyed(class WClass){} // This event is generated when new pawn spawns -function PawnSpawned(){ +function PawnSpawned() +{ local bool bFoundExp; local float convertedExp; local ClientPerkRepLink R; local SRCustomProgress exp; - local MeanReplicationInfo meanRI; local NicePack.PlayerRecord record; //local NiceHumanPawn nicePawn; // Make sure our health is at it's top @@ -498,10 +498,6 @@ function PawnSpawned(){ exp.IncrementProgress(convertedExp); } } - // Stop after-death bleeding - meanRI = class'MeanReplicationInfo'.static.findSZri(PlayerReplicationInfo); - if(meanRI != none) - meanRI.stopBleeding(); // Give necessary dosh to the player if(NicePackMutator != none) NicePackMutator.GiveProgressiveDosh(self); diff --git a/sources/NiceReplicationInfo.uc b/sources/NiceReplicationInfo.uc index 9a07d35..ad3c131 100644 --- a/sources/NiceReplicationInfo.uc +++ b/sources/NiceReplicationInfo.uc @@ -185,25 +185,19 @@ simulated function HandleNiceHealingMechanicsAndSkills simulated function RemovePoisonAndBleed(NiceHumanPawn healed) { - local Inventory I; - local MeanReplicationInfo MRI; + local Inventory I; // log spam fix if (healed == none) return; - // No bleeding - MRI = class'MeanReplicationInfo'.static. - findSZri(healed.PlayerReplicationInfo); - if (MRI != none) - MRI.stopBleeding(); - // No poison + // No poison and bleed if (healed.inventory == none) return; for (I = healed.inventory; I != none; I = I.inventory) { - if (MeanPoisonInventory(I) != none) + if (MeanPoisonInventory(I) != none || MeanBleedInventory(I) != none) I.Destroy(); } } diff --git a/sources/Zeds/MeanReplicationInfo.uc b/sources/Zeds/MeanReplicationInfo.uc index a6684a5..d25c2c7 100644 --- a/sources/Zeds/MeanReplicationInfo.uc +++ b/sources/Zeds/MeanReplicationInfo.uc @@ -1,82 +1,4 @@ -// Copy pasted from super zombies mutator with small alterations +// no use atm class MeanReplicationInfo extends ReplicationInfo; -struct BleedingState { - var float nextBleedTime; - var Pawn instigator; - var int count; -}; -var PlayerReplicationInfo ownerPRI; -var bool isBleeding; -var int maxBleedCount; -var BleedingState bleedState; -var float bleedPeriod; -var float bleedLevel; -replication { - reliable if (bNetDirty && Role == ROLE_Authority) - isBleeding, ownerPRI; -} -// Returns bleed damage, corresponding to given bleed level and damage scale. -// Rand(7) should be used as a scale. -// Separate function created to allow for lowest/highest damage value computing. -function int calcBleedDamage(float level, int scale){ - return level * (3 + scale); -} -function Tick(float DeltaTime) { - local PlayerController ownerCtrllr; - local bool amAlive; - local float bleedDamage; - ownerCtrllr = PlayerController(Owner); - amAlive = ownerCtrllr != none && ownerCtrllr.Pawn != none && ownerCtrllr.Pawn.Health > 0; - if(amAlive && bleedState.count > 0) { - if(bleedState.nextBleedTime < Level.TimeSeconds) { - bleedState.count--; - bleedState.nextBleedTime+= bleedPeriod; - // Fix bleeding when stalker dies - bleedDamage = calcBleedDamage(bleedLevel, rand(7)); - if(bleedDamage < 1.0) - stopBleeding(); - if(bleedState.instigator != none) - ownerCtrllr.Pawn.TakeDamage(bleedDamage, bleedState.instigator, ownerCtrllr.Pawn.Location, - vect(0, 0, 0), class'NiceDamTypeStalkerBleed'); - else - ownerCtrllr.Pawn.TakeDamage(bleedDamage, ownerCtrllr.Pawn, ownerCtrllr.Pawn.Location, - vect(0, 0, 0), class'NiceDamTypeStalkerBleed'); - if (ownerCtrllr.Pawn.isA('KFPawn')) { - KFPawn(ownerCtrllr.Pawn).HealthToGive -= 2 * bleedLevel; - } - } - } else { - isBleeding= false; - } -} -function stopBleeding(){ - isBleeding = false; - bleedState.count = 0; -} -function setBleeding(Pawn instigator, float effectStrenght) { - // Can max possible damage do anything? If no, then don't even bother. - if(calcBleedDamage(effectStrenght, 7) < 1.0) - return; - bleedState.instigator = instigator; - bleedState.count = maxBleedCount; - bleedLevel = effectStrenght; - if(!isBleeding){ - bleedState.nextBleedTime = Level.TimeSeconds; - isBleeding = true; - } -} -static function MeanReplicationInfo findSZri(PlayerReplicationInfo pri) { - local MeanReplicationInfo repInfo; - if(pri == none) - return none; - foreach pri.DynamicActors(Class'MeanReplicationInfo', repInfo) - if(repInfo.ownerPRI == pri) - return repInfo; - - return none; -} -defaultproperties -{ - maxBleedCount=7 - bleedPeriod=1.500000 -} + +defaultproperties{} \ No newline at end of file From 6f460b93f2ff6ccff595cdb31b63108eb2a8ba92 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sun, 23 Jan 2022 17:11:38 +0400 Subject: [PATCH 24/30] stop spawning meanrep info --- sources/NicePack.uc | 3 --- sources/Zeds/Mean/MeanBleedInventory.uc | 12 +----------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/sources/NicePack.uc b/sources/NicePack.uc index eefb7b6..97e3f38 100644 --- a/sources/NicePack.uc +++ b/sources/NicePack.uc @@ -468,7 +468,6 @@ simulated function bool CheckReplacement(Actor Other, out byte bSuperRelevant){ local NicePlayerController playerContr; local NiceRepInfoRemoteData remoteRI; local NiceReplicationInfo niceRI; - local MeanReplicationInfo meanRI; local PlayerReplicationInfo pri; // Replace loot on levels if(Other.class == class'KFRandomItemSpawn' || Other.class == class'ScrnRandomItemSpawn'){ @@ -493,8 +492,6 @@ simulated function bool CheckReplacement(Actor Other, out byte bSuperRelevant){ niceRI = spawn(class'NiceReplicationInfo', pri.Owner); niceRI.Mut = self; remoteRI = spawn(class'NiceRepInfoRemoteData', pri.Owner); - meanRI = spawn(class'MeanReplicationInfo', pri.Owner); - meanRI.ownerPRI = pri; playerContr = NicePlayerController(PlayerReplicationInfo(Other).Owner); playerContr.niceRI = niceRI; playerContr.remoteRI = remoteRI; diff --git a/sources/Zeds/Mean/MeanBleedInventory.uc b/sources/Zeds/Mean/MeanBleedInventory.uc index 29736bd..c3b813d 100644 --- a/sources/Zeds/Mean/MeanBleedInventory.uc +++ b/sources/Zeds/Mean/MeanBleedInventory.uc @@ -32,7 +32,7 @@ event Timer() maxBleedCount--; - bleedDamage = calcBleedDamage(); + bleedDamage = bleedLevel * 7; if (bleedDamage < 1.0) { maxBleedCount = 0; @@ -53,16 +53,6 @@ event Timer() } - -// Returns bleed damage, corresponding to given bleed level and damage scale. -// Rand(7) should be used as a scale. -// Separate function created to allow for lowest/highest damage value computing. -final private function int calcBleedDamage() -{ - return bleedLevel * 7; -} - - // cleanup function Destroyed() { From 8847ec0449e959832261a5ef9e15f6bc4ada5d92 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sun, 23 Jan 2022 17:26:23 +0400 Subject: [PATCH 25/30] draw bleed / poison icons for everyone --- sources/GUI/NiceInteraction.uc | 76 +++++++++++++++++++++++++++++----- 1 file changed, 66 insertions(+), 10 deletions(-) diff --git a/sources/GUI/NiceInteraction.uc b/sources/GUI/NiceInteraction.uc index c9d5f9d..c40256e 100644 --- a/sources/GUI/NiceInteraction.uc +++ b/sources/GUI/NiceInteraction.uc @@ -12,11 +12,15 @@ var float size; var float InventoryBoxWidth; var float InventoryBoxHeight; var float BorderSize; -event NotifyLevelChange(){ - Master.RemoveInteraction(self); + +event NotifyLevelChange() +{ + Master.RemoveInteraction(self); } -function RegisterMutator(NicePack activePack){ - NicePackMutator = activePack; + +function RegisterMutator(NicePack activePack) +{ + NicePackMutator = activePack; } final private function bool bIsPoisoned(ScrnHumanPawn pwn) @@ -58,10 +62,16 @@ function PostRender(Canvas C) local NiceWeapon niceWeap; local NicePlayerController nicePlayer; local ScrnHUD scrnHUDInstance; + // TODO maybe use scrnhud? + local HUDKillingFloor kfHud; local Texture barTexture; local int x, y, center, barWidth, offset; local int missesWidth, missesHeight, missesSpace; local int missesX, missesY; + local Vector CamPos, ViewDir; + local Rotator CamRot; + local float OffsetX, BarLength, BarHeight, XL, YL, posY; + if(C == none) return; if(C.ViewPort == none) return; if(C.ViewPort.Actor == none) return; @@ -72,7 +82,7 @@ function PostRender(Canvas C) return; scrnHUDInstance = ScrnHUD(nicePlayer.myHUD); - //// Draw bleed and poison icons + //// Draw bleed and poison icons for OWNER offset = 4; // BLEED!!! if (bIsBleeding(ScrnHumanPawn(C.ViewPort.Actor.Pawn))) @@ -92,8 +102,49 @@ function PostRender(Canvas C) C.DrawTile(poisonIcon, size, size, 0, 0, poisonIcon.MaterialUSize(), poisonIcon.MaterialVSize()); } + // draw bleed and poison icons for TEAMMATES + C.GetCAmeraLocation(CamPos, CamRot); + ViewDir = vector(CamRot); + kfHud = HUDKillingFloor(ViewportOwner.Actor.myHUD); + OffsetX = (36.f * kfHud.default.VeterancyMatScaleFactor * 0.6) - (kfHud.default.HealthIconSize + 2.0); + BarLength = FMin(kfHud.default.BarLength * (float(C.SizeX) / 1024.f), kfHud.default.BarLength); + BarHeight = FMin(kfHud.default.BarHeight * (float(C.SizeX) / 1024.f), kfHud.default.BarHeight); + for (i = 0; i < kfHUD.PlayerInfoPawns.Length; i++) + { + if (kfHUD.PlayerInfoPawns[i].Pawn != none && kfHUD.PlayerInfoPawns[i].Pawn.Health > 0 && + (kfHUD.PlayerInfoPawns[i].Pawn.Location - kfHUD.PawnOwner.Location) dot ViewDir > 0.8 && + kfHUD.PlayerInfoPawns[i].RendTime > ViewportOwner.Actor.Level.TimeSeconds) + { + C.StrLen(Left(kfHUD.PlayerInfoPawns[i].Pawn.PlayerReplicationInfo.PlayerName, 16), XL, YL); + if (kfHUD.PlayerInfoPawns[i].Pawn.ShieldStrength <= 0) + { + posY = (kfHUD.PlayerInfoPawns[i].PlayerInfoScreenPosY - YL) - 2.75 * BarHeight - + kfHUD.default.ArmorIconSize * 0.5; + } + else + { + posY = (kfHUD.PlayerInfoPawns[i].PlayerInfoScreenPosY - YL) - 3.8 * BarHeight - + kfHUD.default.ArmorIconSize * 0.5; + } + offset = 0; - if(niceWeap != none && niceWeap.bShowSecondaryCharge && scrnHUDInstance != none){ + if (bIsBleeding(ScrnHumanPawn(C.ViewPort.Actor.Pawn))) + { + C.SetPos(kfHUD.PlayerInfoPawns[i].PlayerInfoScreenPosX - OffsetX - 0.15 * BarLength - + kfHUD.default.ArmorIconSize - 2.0, posY); + C.DrawTileScaled(bleedIcon, 0.1875, 0.1875); + } + if (bIsPoisoned(ScrnHumanPawn(C.ViewPort.Actor.Pawn))) + { + C.SetPos(kfHUD.PlayerInfoPawns[i].PlayerInfoScreenPosX - OffsetX + 0.15 * BarLength - + kfHUD.default.ArmorIconSize - 2.0, posY); + C.DrawTileScaled(poisonIcon, 0.1875, 0.1875); + } + } + } + + if (niceWeap != none && niceWeap.bShowSecondaryCharge && scrnHUDInstance != none) + { C.ColorModulate.X = 1; C.ColorModulate.Y = 1; C.ColorModulate.Z = 1; @@ -104,11 +155,13 @@ function PostRender(Canvas C) scrnHUDInstance.SecondaryClipsDigits.value = niceWeap.secondaryCharge; scrnHUDInstance.DrawNumericWidget(C, scrnHUDInstance.SecondaryClipsDigits, scrnHUDInstance.DigitsSmall); } + niceMutator = class'NicePack'.static.Myself(C.ViewPort.Actor.Pawn.Level); - if(niceMutator == none) + if (niceMutator == none) return; //// Draw counters - if(nicePlayer != none && nicePlayer.bFlagDisplayCounters){ + if(nicePlayer != none && nicePlayer.bFlagDisplayCounters) + { x = C.ClipX * 0.5 - (64 + 2) * niceMutator.GetVisibleCountersAmount(); y = C.ClipY * 0.01; for(i = 0;i < niceMutator.niceCounterSet.Length;i ++) @@ -118,7 +171,8 @@ function PostRender(Canvas C) } } //// Draw weapons progress bars - if(nicePlayer != none && nicePlayer.bFlagDisplayWeaponProgress){ + if(nicePlayer != none && nicePlayer.bFlagDisplayWeaponProgress) + { x = C.ClipX - InventoryBoxWidth * C.ClipX - 5; y = C.ClipY * 0.5 - 0.5 * (InventoryBoxHeight * C.ClipX + 4) * niceMutator.niceWeapProgressSet.Length; for(i = 0;i < niceMutator.niceWeapProgressSet.Length;i ++){ @@ -129,7 +183,8 @@ function PostRender(Canvas C) } //// Draw invincibility bar nicePawn = NiceHumanPawn(nicePlayer.pawn); - if(nicePawn != none && nicePawn.invincibilityTimer != 0.0){ + if(nicePawn != none && nicePawn.invincibilityTimer != 0.0) + { C.SetDrawColor(255, 255, 255); if(nicePawn.invincibilityTimer > 0) barTexture = greenBar; @@ -174,6 +229,7 @@ function PostRender(Canvas C) for(i = 0;i < nicePlayer.abilityManager.currentAbilitiesAmount;i ++) DrawAbilityCooldown(C, i); } + function DrawCounter(Canvas C, NicePack.CounterDisplay counter, int x, int y, TeamInfo team){ local float borderSpace; local Texture textureToDraw; From aba3d5ec4dacdfe3d192d3d2f37554da62268b85 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sun, 23 Jan 2022 17:48:15 +0400 Subject: [PATCH 26/30] fix nade throwing --- sources/NiceHumanPawn.uc | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sources/NiceHumanPawn.uc b/sources/NiceHumanPawn.uc index a0154b3..8970d8a 100644 --- a/sources/NiceHumanPawn.uc +++ b/sources/NiceHumanPawn.uc @@ -555,16 +555,21 @@ simulated function CookGrenade(){ niceWeap.ClientGrenadeState = GN_TempDown; niceWeap.PutDown(); } -simulated function ThrowGrenade(){ +simulated function ThrowGrenade() +{ local NiceWeapon niceWeap; niceWeap = NiceWeapon(Weapon); if(niceWeap != none) niceWeap.ClientForceInterruptReload(CANCEL_NADE); if(bThrowingNade || SecondaryItem != none) return; - if( niceWeap == none - || (niceWeap.bIsReloading && !niceWeap.InterruptReload())) - return; + + if(niceWeap == none || (niceWeap.bIsReloading && !niceWeap.InterruptReload())) + { + super.ThrowGrenade(); + return; + } + if(playerGrenade == none) playerGrenade = FindPlayerGrenade(); if(playerGrenade != none && playerGrenade.HasAmmo()){ From 78dcf4515ae51c68bb56e837dad3d9714b54e20b Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sun, 23 Jan 2022 22:34:41 +0400 Subject: [PATCH 27/30] possible fix for multiple axe pickups --- sources/NicePack.uc | 4 ++-- sources/NiceRandomItemSpawn.uc | 19 +++++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/sources/NicePack.uc b/sources/NicePack.uc index 97e3f38..0490da3 100644 --- a/sources/NicePack.uc +++ b/sources/NicePack.uc @@ -1076,8 +1076,8 @@ defaultproperties pickupReplaceArray(9)=(vanillaClass=Class'KFMod.KSGPickup',scrnClass=Class'ScrnKSGPickup',NewClass=class'NiceKSGPickup') pickupReplaceArray(10)=(vanillaClass=Class'KFMod.BenelliPickup',scrnClass=Class'ScrnBenelliPickup',NewClass=class'NiceBenelliPickup') pickupReplaceArray(11)=(vanillaClass=Class'KFMod.AA12Pickup',scrnClass=Class'ScrnAA12Pickup',NewClass=class'NiceAA12Pickup') - pickupReplaceArray(12)=(vanillaClass=Class'KFMod.MachetePickup',scrnClass=Class'ScrnMachetePickup',NewClass=class'NiceAxePickup') - + pickupReplaceArray(12)=(vanillaClass=Class'KFMod.MachetePickup',scrnClass=Class'ScrnMachetePickup',NewClass=class'NiceMachetePickup') + NiceUniversalDescriptions(0)="Survive on %m in ScrN Balance mode" NiceUniversalDescriptions(1)="Survive on %m in ScrN Balance mode with Hardcore Level 5+" NiceUniversalDescriptions(2)="Survive on %m in ScrN Balance mode with Hardcore Level 10+" diff --git a/sources/NiceRandomItemSpawn.uc b/sources/NiceRandomItemSpawn.uc index 24cf52b..5d8a7a8 100644 --- a/sources/NiceRandomItemSpawn.uc +++ b/sources/NiceRandomItemSpawn.uc @@ -1,11 +1,14 @@ class NiceRandomItemSpawn extends ScrnRandomItemSpawn; + defaultproperties { - PickupClasses(0)=class'NiceWinchesterPickup' - PickupClasses(1)=class'NiceShotgunPickup' - PickupClasses(2)=class'NiceBullpupPickup' - PickupClasses(3)=class'NiceMagnumPickup' - PickupClasses(4)=class'NiceWinchesterPickup' - PickupClasses(5)=class'NiceM79Pickup' - PickupClasses(8)=class'NiceMAC10Pickup' -} + PickupClasses(0)=Class'NiceWinchesterPickup' + PickupClasses(1)=Class'NiceShotgunPickup' + PickupClasses(2)=Class'NiceBullpupPickup' + PickupClasses(3)=Class'NiceMagnumPickup' + PickupClasses(4)=Class'NiceWinchesterPickup' + PickupClasses(5)=Class'NiceM79Pickup' + PickupClasses(6)=Class'NiceAxePickup' + PickupClasses(7)=Class'ScrnVestPickup' + PickupClasses(8)=class'NiceMAC10Pickup' +} \ No newline at end of file From 3d6b61971477350e2c53288c522e8f7da5181d3b Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sun, 23 Jan 2022 22:51:48 +0400 Subject: [PATCH 28/30] bundle link fix --- README.md | 2 +- sources/GUI/NiceInteraction.uc | 76 +++++++++++++++++----------------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 4ce1668..2e00cb6 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ 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 diff --git a/sources/GUI/NiceInteraction.uc b/sources/GUI/NiceInteraction.uc index c40256e..bbdac18 100644 --- a/sources/GUI/NiceInteraction.uc +++ b/sources/GUI/NiceInteraction.uc @@ -103,45 +103,45 @@ function PostRender(Canvas C) } // draw bleed and poison icons for TEAMMATES - C.GetCAmeraLocation(CamPos, CamRot); - ViewDir = vector(CamRot); - kfHud = HUDKillingFloor(ViewportOwner.Actor.myHUD); - OffsetX = (36.f * kfHud.default.VeterancyMatScaleFactor * 0.6) - (kfHud.default.HealthIconSize + 2.0); - BarLength = FMin(kfHud.default.BarLength * (float(C.SizeX) / 1024.f), kfHud.default.BarLength); - BarHeight = FMin(kfHud.default.BarHeight * (float(C.SizeX) / 1024.f), kfHud.default.BarHeight); - for (i = 0; i < kfHUD.PlayerInfoPawns.Length; i++) - { - if (kfHUD.PlayerInfoPawns[i].Pawn != none && kfHUD.PlayerInfoPawns[i].Pawn.Health > 0 && - (kfHUD.PlayerInfoPawns[i].Pawn.Location - kfHUD.PawnOwner.Location) dot ViewDir > 0.8 && - kfHUD.PlayerInfoPawns[i].RendTime > ViewportOwner.Actor.Level.TimeSeconds) - { - C.StrLen(Left(kfHUD.PlayerInfoPawns[i].Pawn.PlayerReplicationInfo.PlayerName, 16), XL, YL); - if (kfHUD.PlayerInfoPawns[i].Pawn.ShieldStrength <= 0) - { - posY = (kfHUD.PlayerInfoPawns[i].PlayerInfoScreenPosY - YL) - 2.75 * BarHeight - - kfHUD.default.ArmorIconSize * 0.5; - } - else - { - posY = (kfHUD.PlayerInfoPawns[i].PlayerInfoScreenPosY - YL) - 3.8 * BarHeight - - kfHUD.default.ArmorIconSize * 0.5; - } - offset = 0; +// C.GetCAmeraLocation(CamPos, CamRot); +// ViewDir = vector(CamRot); +// kfHud = HUDKillingFloor(ViewportOwner.Actor.myHUD); +// OffsetX = (36.f * kfHud.default.VeterancyMatScaleFactor * 0.6) - (kfHud.default.HealthIconSize + 2.0); +// BarLength = FMin(kfHud.default.BarLength * (float(C.SizeX) / 1024.f), kfHud.default.BarLength); +// BarHeight = FMin(kfHud.default.BarHeight * (float(C.SizeX) / 1024.f), kfHud.default.BarHeight); +// for (i = 0; i < kfHUD.PlayerInfoPawns.Length; i++) +// { +// if (kfHUD.PlayerInfoPawns[i].Pawn != none && kfHUD.PlayerInfoPawns[i].Pawn.Health > 0 && +// (kfHUD.PlayerInfoPawns[i].Pawn.Location - kfHUD.PawnOwner.Location) dot ViewDir > 0.8 && +// kfHUD.PlayerInfoPawns[i].RendTime > ViewportOwner.Actor.Level.TimeSeconds) +// { +// C.StrLen(Left(kfHUD.PlayerInfoPawns[i].Pawn.PlayerReplicationInfo.PlayerName, 16), XL, YL); +// if (kfHUD.PlayerInfoPawns[i].Pawn.ShieldStrength <= 0) +// { +// posY = (kfHUD.PlayerInfoPawns[i].PlayerInfoScreenPosY - YL) - 2.75 * BarHeight - +// kfHUD.default.ArmorIconSize * 0.5; +// } +// else +// { +// posY = (kfHUD.PlayerInfoPawns[i].PlayerInfoScreenPosY - YL) - 3.8 * BarHeight - +// kfHUD.default.ArmorIconSize * 0.5; +// } +// offset = 0; - if (bIsBleeding(ScrnHumanPawn(C.ViewPort.Actor.Pawn))) - { - C.SetPos(kfHUD.PlayerInfoPawns[i].PlayerInfoScreenPosX - OffsetX - 0.15 * BarLength - - kfHUD.default.ArmorIconSize - 2.0, posY); - C.DrawTileScaled(bleedIcon, 0.1875, 0.1875); - } - if (bIsPoisoned(ScrnHumanPawn(C.ViewPort.Actor.Pawn))) - { - C.SetPos(kfHUD.PlayerInfoPawns[i].PlayerInfoScreenPosX - OffsetX + 0.15 * BarLength - - kfHUD.default.ArmorIconSize - 2.0, posY); - C.DrawTileScaled(poisonIcon, 0.1875, 0.1875); - } - } - } +// if (bIsBleeding(ScrnHumanPawn(kfHUD.PlayerInfoPawns[i].Pawn))) +// { +// C.SetPos(kfHUD.PlayerInfoPawns[i].PlayerInfoScreenPosX - OffsetX - 0.15 * BarLength - +// kfHUD.default.ArmorIconSize - 2.0, posY); +// C.DrawTileScaled(bleedIcon, 0.1875, 0.1875); +// } +// if (bIsPoisoned(ScrnHumanPawn(kfHUD.PlayerInfoPawns[i].Pawn))) +// { +// C.SetPos(kfHUD.PlayerInfoPawns[i].PlayerInfoScreenPosX - OffsetX + 0.15 * BarLength - +// kfHUD.default.ArmorIconSize - 2.0, posY); +// C.DrawTileScaled(poisonIcon, 0.1875, 0.1875); +// } +// } +// } if (niceWeap != none && niceWeap.bShowSecondaryCharge && scrnHUDInstance != none) { From e26b420656753ac2af7501b017dfc32b89c2b612 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sun, 23 Jan 2022 23:05:33 +0400 Subject: [PATCH 29/30] changelog updated --- Docs/CHANGELOG.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/Docs/CHANGELOG.md b/Docs/CHANGELOG.md index 8cb2de1..48050eb 100644 --- a/Docs/CHANGELOG.md +++ b/Docs/CHANGELOG.md @@ -6,6 +6,44 @@ All notable changes to this project will be documented in this file. List of changes for version 0.2.0 may be incomplete. Weapon and perk changes are described relative to ScrN versions. +## [Update 404] - 00.00.2022 + +### General + +- NicePakc bundle is now in 7z. +- Code break: `meanreplicationinfo` disabled. +- Less scrnbalance hardcode. +- TSC and all it's classes removed. +- README, changelog, file directory updates. +- HUGE amount of accessed none fixes. +- Tabs -> x4 spaces. +- All hardcoded classes / subobjects removed. Now Kaio can compile his fpp 😂 + +#### Zeds + +- Disable all zed collisions on death. Now jumping crawlers, running gorefasts won't interupt your movement. +- Siren has faster iterator. +- Siren won't spawn emitter on death. +- Siren won't scream at low hp zeds, will try to melee instead. +- Husk doesn't shoot if headless, dying, falling, being moved by other husks. +- Husk ignores zeds that the he can't actually see. +- Husk's projectile won't detonate multiple times during slomo. + +### GUI + +- New lobby footer from base class. New fancy buttons! +- New lobby menu! Much cleaner and doesn't have ad square. +- Skill menu has new backgrounds. +- NiceGUISettings: New dropdown list to control Commando's zed health bars: + - All zeds. + - Only big zeds (>1000hp). + - Disabled. + +### Weapons + +- Fix for nade throwing if you hold non nice weapon. +- Machete pickup removed, axe spawns instead. + ## [Update 008] - 14.01.2022 ### Changed From 941991e7997936cbb683ed4a415f5df88d5d65b8 Mon Sep 17 00:00:00 2001 From: Shtoyan Date: Sun, 23 Jan 2022 23:07:51 +0400 Subject: [PATCH 30/30] bleed inv stuck fix --- sources/Zeds/Mean/MeanBleedInventory.uc | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/sources/Zeds/Mean/MeanBleedInventory.uc b/sources/Zeds/Mean/MeanBleedInventory.uc index c3b813d..796923b 100644 --- a/sources/Zeds/Mean/MeanBleedInventory.uc +++ b/sources/Zeds/Mean/MeanBleedInventory.uc @@ -26,19 +26,16 @@ event Timer() locpawn = Pawn(Owner); amAlive = locpawn != none && locpawn.Health > 0; - // if pawn owner is dead or bleed count is done - destroy - if (!amAlive || maxBleedCount < 0) - Destroy(); - - maxBleedCount--; - bleedDamage = bleedLevel * 7; - if (bleedDamage < 1.0) + // if pawn owner is dead or bleed count is done - destroy + if (!amAlive || maxBleedCount < 0 || bleedDamage < 1.0) { - maxBleedCount = 0; + Destroy(); return; } + maxBleedCount--; + if (stalker != none) locpawn.TakeDamage(bleedDamage, stalker, locpawn.Location, vect(0, 0, 0), dmtype_bleed);