diff --git a/ServerExt/Classes/ExtDT_Ballistic_9mm.uc b/ServerExt/Classes/ExtDT_Ballistic_9mm.uc index 671ffa4..4224876 100644 --- a/ServerExt/Classes/ExtDT_Ballistic_9mm.uc +++ b/ServerExt/Classes/ExtDT_Ballistic_9mm.uc @@ -1,3 +1,9 @@ class ExtDT_Ballistic_9mm extends KFDT_Ballistic_9mm abstract - hidedropdown; \ No newline at end of file + hidedropdown; + +DefaultProperties +{ + ModifierPerkList(0) = class'KFPerk_Sharpshooter' + ModifierPerkList(1) = class'KFPerk_Gunslinger' +} \ No newline at end of file diff --git a/ServerExt/Classes/ExtDT_Ballistic_Pistol_Medic.uc b/ServerExt/Classes/ExtDT_Ballistic_Pistol_Medic.uc index 6bac424..39f1d4c 100644 --- a/ServerExt/Classes/ExtDT_Ballistic_Pistol_Medic.uc +++ b/ServerExt/Classes/ExtDT_Ballistic_Pistol_Medic.uc @@ -1,3 +1,9 @@ class ExtDT_Ballistic_Pistol_Medic extends KFDT_Ballistic_Pistol_Medic abstract - hidedropdown; \ No newline at end of file + hidedropdown; + +DefaultProperties +{ + ModifierPerkList(0) = class'KFPerk_Sharpshooter' + ModifierPerkList(1) = class'KFPerk_Gunslinger' +} \ No newline at end of file diff --git a/ServerExt/Classes/Ext_PerkRhythmPerkBase.uc b/ServerExt/Classes/Ext_PerkRhythmPerkBase.uc index 3b6f55b..4c9e2b1 100644 --- a/ServerExt/Classes/Ext_PerkRhythmPerkBase.uc +++ b/ServerExt/Classes/Ext_PerkRhythmPerkBase.uc @@ -1,6 +1,6 @@ Class Ext_PerkRhythmPerkBase extends Ext_PerkBase; -var byte HeadShotComboCount,MaxRhythmCombo,MissComboCount; +var byte HeadShotComboCount,MaxRhythmCombo; var float RhythmComboDmg; var private const float HeadShotCountdownIntervall; @@ -20,75 +20,51 @@ final function ResetRhythm() MaxRhythmCombo = 0; HeadShotComboCount = 0; RhythmComboDmg = 0; - MissComboCount = 0; HeadShotMessage(0,true,1); } function SubstractHeadShotCombo() { if( HeadShotComboCount > 0 ) - { - --HeadShotComboCount; - HeadShotMessage( HeadShotComboCount, true, MaxRhythmCombo ); - } - else if( HeadShotComboCount <= 0 ) - { + UpdateDmgScale(false); + else ClearTimer( nameOf( SubstractHeadShotCombo ) ); - } } final function UpdateDmgScale( bool bUp ) { if( bUp ) { - MissComboCount = 0; - if (HeadShotComboCount < MaxRhythmCombo) - HeadShotComboCount = Min(HeadShotComboCount+1,255); + HeadShotComboCount = Min(HeadShotComboCount+1,MaxRhythmCombo); HeadShotMessage(HeadShotComboCount,false,MaxRhythmCombo); SetTimer( HeadShotCountdownIntervall, true, nameOf( SubstractHeadShotCombo ) ); } - else if( HeadShotComboCount>0 && ++MissComboCount==3 ) + else if( HeadShotComboCount>0) { --HeadShotComboCount; HeadShotMessage(HeadShotComboCount,true,MaxRhythmCombo); - MissComboCount = 0; } else return; - RhythmComboDmg = FMin(HeadShotComboCount,MaxRhythmCombo)*0.075; + RhythmComboDmg = HeadShotComboCount*0.075; } function UpdatePerkHeadShots( ImpactInfo Impact, class DamageType, int NumHit ) { local int HitZoneIdx; local KFPawn_Monster KFPM; - - // `log("RACKEMUP" @ GetScriptTrace()); if( MaxRhythmCombo<=0 ) return; KFPM = KFPawn_Monster(Impact.HitActor); if( KFPM==none || KFPM.GetTeamNum()==0 ) - { - if( NumHit < 1 && HeadShotComboCount>0 ) - UpdateDmgScale(false); return; - } HitZoneIdx = KFPM.HitZones.Find('ZoneName', Impact.HitInfo.BoneName); if( HitZoneIdx == HZI_Head && KFPM.IsAliveAndWell() ) { - if( class(DamageType)!=None - && (class(DamageType).Default.ModifierPerkList.Find(BasePerk)>=0 - || DamageType == class'ExtDT_Ballistic_9mm' - || DamageType == class'ExtDT_Ballistic_Pistol_Medic' - || DamageType == class'KFDT_Ballistic_9mm' - || DamageType == class'KFDT_Ballistic_Pistol_Medic')) + if( class(DamageType)!=None && (class(DamageType).Default.ModifierPerkList.Find(BasePerk)>=0)) UpdateDmgScale(true); - else if( HeadShotComboCount>0 ) - UpdateDmgScale(false); } - else if( NumHit < 1 && HeadShotComboCount>0 ) - UpdateDmgScale(false); } reliable client function HeadShotMessage( byte HeadShotNum, bool bMissed, byte MaxHits ) { diff --git a/ServerExt/Classes/Ext_TraitMedicPistol.uc b/ServerExt/Classes/Ext_TraitMedicPistol.uc index 9ec9ab6..9aafb6f 100644 --- a/ServerExt/Classes/Ext_TraitMedicPistol.uc +++ b/ServerExt/Classes/Ext_TraitMedicPistol.uc @@ -2,8 +2,10 @@ Class Ext_TraitMedicPistol extends Ext_TraitBase; static function AddDefaultInventory( KFPawn Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) { - Player.DefaultInventory.RemoveItem(class'ExtWeap_Pistol_9mm'); - Player.DefaultInventory.AddItem(class'ExtWeap_Pistol_MedicS'); + local int i; + i = Player.DefaultInventory.Find(class'ExtWeap_Pistol_9mm'); + if(i != -1) + Player.DefaultInventory[i] = class'ExtWeap_Pistol_MedicS'; } static function ApplyEffectOn( KFPawn_Human Player, Ext_PerkBase Perk, byte Level, optional Ext_TraitDataStore Data ) diff --git a/ServerExtMut/Classes/ServerExtMut.uc b/ServerExtMut/Classes/ServerExtMut.uc index ce8f21f..5d17f96 100644 --- a/ServerExtMut/Classes/ServerExtMut.uc +++ b/ServerExtMut/Classes/ServerExtMut.uc @@ -83,7 +83,6 @@ function PostBeginPlay() local Object O; local string S; local bool bLock; - local CustomZedXPStruct zedxp; Super.PostBeginPlay(); if( WorldInfo.Game.BaseMutator==None ) @@ -260,13 +259,15 @@ function PostBeginPlay() if( bDumpXMLStats ) FileOutput = Spawn(class'ExtXMLOutput'); - UpdateCustomZedXPArray() + UpdateCustomZedXPArray(); // Causes bugs // SetTimer(0.1,'CheckPickupFactories') } function UpdateCustomZedXPArray() { + local int i; + local CustomZedXPStruct zedxp; CustomZedXPArray.Length = 0; // Custom XP for custom zeds for(i=0;i