From dfb012226303991d5f1758e83ab61b3ec6ff27dd Mon Sep 17 00:00:00 2001 From: inklesspen1scripter Date: Mon, 6 Jul 2020 19:28:35 +0300 Subject: [PATCH] Added medic pistol as default weapon of Medic Perk + disabled bugged code from ServerExtMut --- ServerExt/Classes/Ext_PerkFieldMedic.uc | 14 +++++++--- ServerExtMut/Classes/ServerExtMut.uc | 35 +++++++++++++++---------- 2 files changed, 32 insertions(+), 17 deletions(-) diff --git a/ServerExt/Classes/Ext_PerkFieldMedic.uc b/ServerExt/Classes/Ext_PerkFieldMedic.uc index 177711e..582d0dc 100644 --- a/ServerExt/Classes/Ext_PerkFieldMedic.uc +++ b/ServerExt/Classes/Ext_PerkFieldMedic.uc @@ -112,6 +112,13 @@ simulated function float GetSnarePower( optional class DamageType, o return 0.f; } +function AddDefaultInventory( KFPawn P ) +{ + P.DefaultInventory.RemoveItem(class'ExtWeap_Pistol_9mm'); + P.DefaultInventory.AddItem(class'ExtWeap_Pistol_MedicS'); + super.AddDefaultInventory(P); +} + simulated function bool GetHealingSpeedBoostActive() { return bHealingBoost; @@ -206,13 +213,14 @@ defaultproperties DefPerkStats(17)=(bHiddenConfig=false) // Fire resistance PrimaryMelee=class'KFWeap_Knife_FieldMedic' - PrimaryWeapon=class'KFWeap_Pistol_Medic' + PrimaryWeapon=None PerkGrenade=class'KFProj_MedicGrenade' SuperGrenade=class'ExtProj_SUPERMedGrenade' + SecondaryWeaponDef=class'ExtWeapDef_MedicPistol' - PrimaryWeaponDef=class'KFWeapDef_MedicPistol' + PrimaryWeaponDef=None KnifeWeaponDef=class'KFWeapDef_Knife_Medic' GrenadeWeaponDef=class'KFWeapDef_Grenade_Medic' - AutoBuyLoadOutPath=(class'KFWeapDef_MedicPistol', class'KFWeapDef_MedicSMG', class'KFWeapDef_MedicShotgun', class'KFWeapDef_MedicRifle') + AutoBuyLoadOutPath=(class'KFWeapDef_MedicSMG', class'KFWeapDef_MedicShotgun', class'KFWeapDef_MedicRifle') } \ No newline at end of file diff --git a/ServerExtMut/Classes/ServerExtMut.uc b/ServerExtMut/Classes/ServerExtMut.uc index 727ae1c..fb34fe7 100644 --- a/ServerExtMut/Classes/ServerExtMut.uc +++ b/ServerExtMut/Classes/ServerExtMut.uc @@ -66,7 +66,6 @@ function PostBeginPlay() local Object O; local string S; local bool bLock; - local KFPickupFactory_Item ItemFactory; Super.PostBeginPlay(); if( WorldInfo.Game.BaseMutator==None ) @@ -243,21 +242,29 @@ function PostBeginPlay() if( bDumpXMLStats ) FileOutput = Spawn(class'ExtXMLOutput'); - // Disable 9mm and medpistol in all PickupFactories - foreach AllActors(class'KFPickupFactory_Item', ItemFactory) - { - for(i=0;i