Added medic pistol as default weapon of Medic Perk

+ disabled bugged code from ServerExtMut
This commit is contained in:
inklesspen1scripter 2020-07-06 19:28:35 +03:00
parent 7458785d7a
commit dfb0122263
2 changed files with 32 additions and 17 deletions

View File

@ -112,6 +112,13 @@ simulated function float GetSnarePower( optional class<DamageType> DamageType, o
return 0.f; 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() simulated function bool GetHealingSpeedBoostActive()
{ {
return bHealingBoost; return bHealingBoost;
@ -206,13 +213,14 @@ defaultproperties
DefPerkStats(17)=(bHiddenConfig=false) // Fire resistance DefPerkStats(17)=(bHiddenConfig=false) // Fire resistance
PrimaryMelee=class'KFWeap_Knife_FieldMedic' PrimaryMelee=class'KFWeap_Knife_FieldMedic'
PrimaryWeapon=class'KFWeap_Pistol_Medic' PrimaryWeapon=None
PerkGrenade=class'KFProj_MedicGrenade' PerkGrenade=class'KFProj_MedicGrenade'
SuperGrenade=class'ExtProj_SUPERMedGrenade' SuperGrenade=class'ExtProj_SUPERMedGrenade'
SecondaryWeaponDef=class'ExtWeapDef_MedicPistol'
PrimaryWeaponDef=class'KFWeapDef_MedicPistol' PrimaryWeaponDef=None
KnifeWeaponDef=class'KFWeapDef_Knife_Medic' KnifeWeaponDef=class'KFWeapDef_Knife_Medic'
GrenadeWeaponDef=class'KFWeapDef_Grenade_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')
} }

View File

@ -66,7 +66,6 @@ function PostBeginPlay()
local Object O; local Object O;
local string S; local string S;
local bool bLock; local bool bLock;
local KFPickupFactory_Item ItemFactory;
Super.PostBeginPlay(); Super.PostBeginPlay();
if( WorldInfo.Game.BaseMutator==None ) if( WorldInfo.Game.BaseMutator==None )
@ -243,21 +242,29 @@ function PostBeginPlay()
if( bDumpXMLStats ) if( bDumpXMLStats )
FileOutput = Spawn(class'ExtXMLOutput'); FileOutput = Spawn(class'ExtXMLOutput');
// Disable 9mm and medpistol in all PickupFactories // Causes bugs
foreach AllActors(class'KFPickupFactory_Item', ItemFactory) // SetTimer(0.1,'CheckPickupFactories')
{
for(i=0;i<ItemFactory.ItemPickups.Length;i++)
{
if(ItemFactory.ItemPickups[i].ItemClass == class'KFGameContent.KFWeap_Pistol_9mm'
|| ItemFactory.ItemPickups[i].ItemClass == class'KFGameContent.KFWeap_Pistol_Medic')
{
ItemFactory.ItemPickups.Remove(i, 1);
break;
}
}
}
} }
// function CheckPickupFactories()
// {
// local KFPickupFactory_Item ItemFactory;
// // Disable 9mm and medpistol in all PickupFactories
// foreach AllActors(class'KFPickupFactory_Item', ItemFactory)
// {
// for(i=0;i<ItemFactory.ItemPickups.Length;i++)
// {
// if(ItemFactory.ItemPickups[i].ItemClass == class'KFGameContent.KFWeap_Pistol_9mm'
// || ItemFactory.ItemPickups[i].ItemClass == class'KFGameContent.KFWeap_Pistol_Medic')
// {
// ItemFactory.ItemPickups.Remove(i, 1);
// break;
// }
// }
// }
// }
function EditTraiderItems() function EditTraiderItems()
{ {
local int i; local int i;