Small Fixes #22
@ -1,8 +1,10 @@
 | 
				
			|||||||
class NiceInteraction extends Interaction
 | 
					class NiceInteraction extends Interaction
 | 
				
			||||||
    dependson(NicePack)
 | 
					    dependson(NicePack)
 | 
				
			||||||
    dependson(NiceAbilityManager);
 | 
					    dependson(NiceAbilityManager);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#exec OBJ LOAD FILE=KillingFloorHUD.utx
 | 
					#exec OBJ LOAD FILE=KillingFloorHUD.utx
 | 
				
			||||||
#exec OBJ LOAD FILE=KillingFloor2HUD.utx
 | 
					#exec OBJ LOAD FILE=KillingFloor2HUD.utx
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var NicePack NicePackMutator;
 | 
					var NicePack NicePackMutator;
 | 
				
			||||||
var Material bleedIcon, poisonIcon;
 | 
					var Material bleedIcon, poisonIcon;
 | 
				
			||||||
var Texture greenBar, redBar;
 | 
					var Texture greenBar, redBar;
 | 
				
			||||||
@ -13,6 +15,16 @@ var float   InventoryBoxWidth;
 | 
				
			|||||||
var float   InventoryBoxHeight;
 | 
					var float   InventoryBoxHeight;
 | 
				
			||||||
var float   BorderSize;
 | 
					var float   BorderSize;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// weapons list for `MultiTasker` skill
 | 
				
			||||||
 | 
					struct WeaponProgressDisplay
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    var class<NiceWeapon>   weapClass;
 | 
				
			||||||
 | 
					    var float               progress;
 | 
				
			||||||
 | 
					    var bool                bShowCounter;
 | 
				
			||||||
 | 
					    var int                 counter;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					var array<WeaponProgressDisplay> niceWeapProgressSet;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
event NotifyLevelChange()
 | 
					event NotifyLevelChange()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
   Master.RemoveInteraction(self);
 | 
					   Master.RemoveInteraction(self);
 | 
				
			||||||
@ -23,7 +35,7 @@ function RegisterMutator(NicePack activePack)
 | 
				
			|||||||
   NicePackMutator = activePack;
 | 
					   NicePackMutator = activePack;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
final private function bool bIsPoisoned(ScrnHumanPawn pwn)
 | 
					final private function bool bIsPoisoned(NiceHumanPawn pwn)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
   local Inventory I;
 | 
					   local Inventory I;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -31,14 +43,14 @@ final private function bool bIsPoisoned(ScrnHumanPawn pwn)
 | 
				
			|||||||
   {
 | 
					   {
 | 
				
			||||||
      for (I = pwn.Inventory; I != none; I = I.Inventory)
 | 
					      for (I = pwn.Inventory; I != none; I = I.Inventory)
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
         if (MeanPoisonInventory(I) != none)
 | 
					         if (I.IsA('MeanPoisonInventory'))
 | 
				
			||||||
            return true;
 | 
					            return true;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
   return false;
 | 
					   return false;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
final private function bool bIsBleeding(ScrnHumanPawn pwn)
 | 
					final private function bool bIsBleeding(NiceHumanPawn pwn)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
   local Inventory I;
 | 
					   local Inventory I;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -46,13 +58,40 @@ final private function bool bIsBleeding(ScrnHumanPawn pwn)
 | 
				
			|||||||
   {
 | 
					   {
 | 
				
			||||||
      for (I = pwn.Inventory; I != none; I = I.Inventory)
 | 
					      for (I = pwn.Inventory; I != none; I = I.Inventory)
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
         if (MeanBleedInventory(I) != none)
 | 
					         if (I.IsA('MeanBleedInventory'))
 | 
				
			||||||
            return true;
 | 
					            return true;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
   }
 | 
					   }
 | 
				
			||||||
   return false;
 | 
					   return false;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					final private function UpdateNiceWeapProgressSet(NiceHumanPawn pwn)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    local Inventory I;
 | 
				
			||||||
 | 
					    local NiceWeapon niceWeap;
 | 
				
			||||||
 | 
					    local WeaponProgressDisplay newProgress;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // clean this!
 | 
				
			||||||
 | 
					    niceWeapProgressSet.Length = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (pwn.Inventory != none)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        for (I = pwn.Inventory; I != none; I = I.Inventory)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            niceWeap = NiceWeapon(I);
 | 
				
			||||||
 | 
					            if (niceWeap != none && niceWeap != pwn.weapon && !niceWeap.IsMagazineFull())
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                newProgress.weapClass = niceWeap.class;
 | 
				
			||||||
 | 
					                newProgress.progress = niceWeap.holsteredCompletition;
 | 
				
			||||||
 | 
					                newProgress.bShowCounter = true;
 | 
				
			||||||
 | 
					                newProgress.counter = niceWeap.GetMagazineAmmo();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                niceWeapProgressSet[niceWeapProgressSet.Length] = newProgress;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function PostRender(Canvas C)
 | 
					function PostRender(Canvas C)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    local int i;
 | 
					    local int i;
 | 
				
			||||||
@ -63,175 +102,181 @@ function PostRender(Canvas C)
 | 
				
			|||||||
    local NicePlayerController nicePlayer;
 | 
					    local NicePlayerController nicePlayer;
 | 
				
			||||||
    local ScrnHUD scrnHUDInstance;
 | 
					    local ScrnHUD scrnHUDInstance;
 | 
				
			||||||
    // TODO maybe use scrnhud?
 | 
					    // TODO maybe use scrnhud?
 | 
				
			||||||
   //  local HUDKillingFloor kfHud;
 | 
					    //  local HUDKillingFloor kfHud;
 | 
				
			||||||
    local Texture barTexture;
 | 
					    local Texture barTexture;
 | 
				
			||||||
    local int x, y, center, barWidth, offset;
 | 
					    local int x, y, center, barWidth, offset;
 | 
				
			||||||
    local int missesWidth, missesHeight, missesSpace;
 | 
					    local int missesWidth, missesHeight, missesSpace;
 | 
				
			||||||
    local int missesX, missesY;
 | 
					    local int missesX, missesY;
 | 
				
			||||||
   //  local Vector CamPos, ViewDir;
 | 
					    //  local Vector CamPos, ViewDir;
 | 
				
			||||||
   //  local Rotator CamRot;
 | 
					    //  local Rotator CamRot;
 | 
				
			||||||
   //  local float OffsetX, BarLength, BarHeight, XL, YL, posY;
 | 
					    //  local float OffsetX, BarLength, BarHeight, XL, YL, posY;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (C == none || C.ViewPort == none || C.ViewPort.Actor == none || C.ViewPort.Actor.Pawn == none)
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if(C == none) return;
 | 
					 | 
				
			||||||
    if(C.ViewPort == none) return;
 | 
					 | 
				
			||||||
    if(C.ViewPort.Actor == none) return;
 | 
					 | 
				
			||||||
    if(C.ViewPort.Actor.Pawn == none) return;
 | 
					 | 
				
			||||||
    nicePlayer = NicePlayerController(C.ViewPort.Actor.Pawn.Controller);
 | 
					    nicePlayer = NicePlayerController(C.ViewPort.Actor.Pawn.Controller);
 | 
				
			||||||
    niceWeap = NiceWeapon(C.ViewPort.Actor.Pawn.Weapon);
 | 
					    niceWeap = NiceWeapon(C.ViewPort.Actor.Pawn.Weapon);
 | 
				
			||||||
    if(nicePlayer == none)
 | 
					    if (nicePlayer == none)
 | 
				
			||||||
       return;
 | 
					       return;
 | 
				
			||||||
    scrnHUDInstance = ScrnHUD(nicePlayer.myHUD);
 | 
					
 | 
				
			||||||
 | 
					    nicePawn = NiceHumanPawn(nicePlayer.pawn);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //// Draw bleed and poison icons for OWNER
 | 
					    //// Draw bleed and poison icons for OWNER
 | 
				
			||||||
    offset = 4;
 | 
					    offset = 4;
 | 
				
			||||||
   // BLEED!!!
 | 
					    // BLEED!!!
 | 
				
			||||||
   if (bIsBleeding(ScrnHumanPawn(C.ViewPort.Actor.Pawn)))
 | 
					    if (bIsBleeding(nicePawn))
 | 
				
			||||||
   {
 | 
					 | 
				
			||||||
      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());
 | 
					 | 
				
			||||||
   }
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
   // 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 (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)
 | 
					 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
       C.ColorModulate.X = 1;
 | 
					        x = C.ClipX * 0.007;
 | 
				
			||||||
       C.ColorModulate.Y = 1;
 | 
					        y = C.ClipY * 0.93 - size * offset;
 | 
				
			||||||
       C.ColorModulate.Z = 1;
 | 
					        C.SetPos(x, y);
 | 
				
			||||||
       C.ColorModulate.W = scrnHUDInstance.HudOpacity / 255;
 | 
					        C.DrawTile(bleedIcon, size, size, 0, 0, bleedIcon.MaterialUSize(), bleedIcon.MaterialVSize());
 | 
				
			||||||
       if(!scrnHUDInstance.bLightHud)
 | 
					    }
 | 
				
			||||||
           scrnHUDInstance.DrawSpriteWidget(C, scrnHUDInstance.SecondaryClipsBG);
 | 
					    offset++;
 | 
				
			||||||
       scrnHUDInstance.DrawSpriteWidget(C, scrnHUDInstance.SecondaryClipsIcon);
 | 
					    // POISON!!!
 | 
				
			||||||
       scrnHUDInstance.SecondaryClipsDigits.value = niceWeap.secondaryCharge;
 | 
					    if (bIsPoisoned(nicePawn))
 | 
				
			||||||
       scrnHUDInstance.DrawNumericWidget(C, scrnHUDInstance.SecondaryClipsDigits, scrnHUDInstance.DigitsSmall);
 | 
					    {
 | 
				
			||||||
 | 
					        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());
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    niceMutator = class'NicePack'.static.Myself(C.ViewPort.Actor.Pawn.Level);
 | 
					    // TODO draw bleed and poison icons for TEAMMATES
 | 
				
			||||||
    if (niceMutator == none)
 | 
					    // C.GetCAmeraLocation(CamPos, CamRot);
 | 
				
			||||||
           return;
 | 
					    // ViewDir = vector(CamRot);
 | 
				
			||||||
    //// Draw counters
 | 
					    // kfHud = HUDKillingFloor(ViewportOwner.Actor.myHUD);
 | 
				
			||||||
    if(nicePlayer != none && nicePlayer.bFlagDisplayCounters)
 | 
					    // 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);
 | 
				
			||||||
       x = C.ClipX * 0.5 - (64 + 2) * niceMutator.GetVisibleCountersAmount();
 | 
					    // BarHeight = FMin(kfHud.default.BarHeight * (float(C.SizeX) / 1024.f), kfHud.default.BarHeight);
 | 
				
			||||||
       y = C.ClipY * 0.01;
 | 
					    // for (i = 0; i < kfHUD.PlayerInfoPawns.Length; i++)
 | 
				
			||||||
       for(i = 0;i < niceMutator.niceCounterSet.Length;i ++)
 | 
					    // {
 | 
				
			||||||
           if(niceMutator.niceCounterSet[i].value != 0 || niceMutator.niceCounterSet[i].bShowZeroValue){
 | 
					    //     if (kfHUD.PlayerInfoPawns[i].Pawn != none && kfHUD.PlayerInfoPawns[i].Pawn.Health > 0 && 
 | 
				
			||||||
               DrawCounter(C, niceMutator.niceCounterSet[i], x, y, C.ViewPort.Actor.Pawn.PlayerReplicationInfo.Team);
 | 
					    //                 (kfHUD.PlayerInfoPawns[i].Pawn.Location - kfHUD.PawnOwner.Location) dot ViewDir > 0.8 &&
 | 
				
			||||||
               x += 128 + 4;
 | 
					    //                 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(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);
 | 
				
			||||||
 | 
					    //     }
 | 
				
			||||||
 | 
					    //     }
 | 
				
			||||||
 | 
					    // }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //// Draw weapons progress bars
 | 
					    //// Draw weapons progress bars
 | 
				
			||||||
    if (class'NiceVeterancyTypes'.static.hasSkill(nicePlayer, class'NiceSkillEnforcerMultitasker')
 | 
					    // at first update weapon info
 | 
				
			||||||
        && nicePlayer.bFlagDisplayWeaponProgress && niceMutator.niceWeapProgressSet.length > 0)
 | 
					    UpdateNiceWeapProgressSet(nicePawn);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (nicePawn != none && class'NiceVeterancyTypes'.static.hasSkill(nicePlayer, class'NiceSkillEnforcerMultitasker')
 | 
				
			||||||
 | 
					        && nicePlayer.bFlagDisplayWeaponProgress && niceWeapProgressSet.length > 0)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        x = C.ClipX - InventoryBoxWidth * C.ClipX - 5;
 | 
					        x = C.ClipX - InventoryBoxWidth * C.ClipX - 5;
 | 
				
			||||||
        y = C.ClipY * 0.5 - 0.5 * (InventoryBoxHeight * C.ClipX + 4) * niceMutator.niceWeapProgressSet.Length;
 | 
					        y = C.ClipY * 0.5 - 0.5 * (InventoryBoxHeight * C.ClipX + 4) * niceWeapProgressSet.Length;
 | 
				
			||||||
        for (i = 0;i < niceMutator.niceWeapProgressSet.Length;i ++)
 | 
					
 | 
				
			||||||
 | 
					        for (i = 0; i < niceWeapProgressSet.Length; i++)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            DrawWeaponProgress(C, niceMutator.niceWeapProgressSet[i], x, y,
 | 
					            DrawWeaponProgress(C, niceWeapProgressSet[i], x, y, nicePawn.PlayerReplicationInfo.Team);
 | 
				
			||||||
              C.ViewPort.Actor.Pawn.PlayerReplicationInfo.Team);
 | 
					 | 
				
			||||||
            y += (InventoryBoxHeight * C.ClipX + 4);
 | 
					            y += (InventoryBoxHeight * C.ClipX + 4);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					
 | 
				
			||||||
    //// Draw invincibility bar
 | 
					    scrnHUDInstance = ScrnHUD(nicePlayer.myHUD);
 | 
				
			||||||
    nicePawn = NiceHumanPawn(nicePlayer.pawn);
 | 
					
 | 
				
			||||||
    if(nicePawn != none && nicePawn.invincibilityTimer != 0.0)
 | 
					    if (niceWeap != none && niceWeap.bShowSecondaryCharge && scrnHUDInstance != none)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
       C.SetDrawColor(255, 255, 255);
 | 
					        C.ColorModulate.X = 1;
 | 
				
			||||||
       if(nicePawn.invincibilityTimer > 0)
 | 
					        C.ColorModulate.Y = 1;
 | 
				
			||||||
           barTexture = greenBar;
 | 
					        C.ColorModulate.Z = 1;
 | 
				
			||||||
       else
 | 
					        C.ColorModulate.W = scrnHUDInstance.HudOpacity / 255;
 | 
				
			||||||
           barTexture = redBar;
 | 
					        if (!scrnHUDInstance.bLightHud)
 | 
				
			||||||
       center = C.ClipX * 0.5;
 | 
					            scrnHUDInstance.DrawSpriteWidget(C, scrnHUDInstance.SecondaryClipsBG);
 | 
				
			||||||
       y = C.ClipY * 0.75;
 | 
					        scrnHUDInstance.DrawSpriteWidget(C, scrnHUDInstance.SecondaryClipsIcon);
 | 
				
			||||||
       barWidth = C.ClipX * 0.2;
 | 
					        scrnHUDInstance.SecondaryClipsDigits.value = niceWeap.secondaryCharge;
 | 
				
			||||||
       niceVet = class'NiceVeterancyTypes'.static.
 | 
					        scrnHUDInstance.DrawNumericWidget(C, scrnHUDInstance.SecondaryClipsDigits, scrnHUDInstance.DigitsSmall);
 | 
				
			||||||
           GetVeterancy(nicePawn.PlayerReplicationInfo);
 | 
					 | 
				
			||||||
       if(niceVet != none){
 | 
					 | 
				
			||||||
           if(nicePawn.invincibilityTimer > 0){
 | 
					 | 
				
			||||||
               barWidth *= nicePawn.invincibilityTimer
 | 
					 | 
				
			||||||
                   / niceVet.static.GetInvincibilityDuration(nicePawn.KFPRI);
 | 
					 | 
				
			||||||
           }
 | 
					 | 
				
			||||||
           else{
 | 
					 | 
				
			||||||
               barWidth *= nicePawn.invincibilityTimer /
 | 
					 | 
				
			||||||
                   class'NiceSkillZerkGunzerker'.default.cooldown;
 | 
					 | 
				
			||||||
           }
 | 
					 | 
				
			||||||
       }
 | 
					 | 
				
			||||||
       else
 | 
					 | 
				
			||||||
           barWidth = 0;
 | 
					 | 
				
			||||||
       x = center - (barWidth / 2);
 | 
					 | 
				
			||||||
       C.SetPos(x, y);
 | 
					 | 
				
			||||||
       C.DrawTile(barTexture, barWidth, 32, 0, 0, barTexture.MaterialUSize(), barTexture.MaterialVSize());
 | 
					 | 
				
			||||||
       if(nicePawn.safeMeleeMisses <= 0)
 | 
					 | 
				
			||||||
           return;
 | 
					 | 
				
			||||||
       missesSpace = 10;//64x64 => 16x16
 | 
					 | 
				
			||||||
       missesHeight = 16;
 | 
					 | 
				
			||||||
       missesWidth =   nicePawn.safeMeleeMisses * 16
 | 
					 | 
				
			||||||
                   +   (nicePawn.safeMeleeMisses - 1) * missesSpace;
 | 
					 | 
				
			||||||
       missesX = center - (missesWidth / 2);
 | 
					 | 
				
			||||||
       missesY = y + (32 - missesHeight) * 0.5;
 | 
					 | 
				
			||||||
       for(i = 0;i < nicePawn.safeMeleeMisses;i ++){
 | 
					 | 
				
			||||||
           C.SetPos(missesX + i * (16 + missesSpace), missesY);
 | 
					 | 
				
			||||||
           C.DrawTile(shield, 16, 16, 0, 0, shield.MaterialUSize(), shield.MaterialVSize());
 | 
					 | 
				
			||||||
       }
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    //  Draw cooldowns
 | 
					
 | 
				
			||||||
    if(nicePlayer.abilityManager == none)
 | 
					    //// Draw invincibility bar
 | 
				
			||||||
 | 
					    if (nicePawn != none && nicePawn.invincibilityTimer != 0.0)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        C.SetDrawColor(255, 255, 255);
 | 
				
			||||||
 | 
					        if (nicePawn.invincibilityTimer > 0)
 | 
				
			||||||
 | 
					            barTexture = greenBar;
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					            barTexture = redBar;
 | 
				
			||||||
 | 
					        center = C.ClipX * 0.5;
 | 
				
			||||||
 | 
					        y = C.ClipY * 0.75;
 | 
				
			||||||
 | 
					        barWidth = C.ClipX * 0.2;
 | 
				
			||||||
 | 
					        niceVet = class'NiceVeterancyTypes'.static.
 | 
				
			||||||
 | 
					            GetVeterancy(nicePawn.PlayerReplicationInfo);
 | 
				
			||||||
 | 
					        if (niceVet != none)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if (nicePawn.invincibilityTimer > 0)
 | 
				
			||||||
 | 
					                barWidth *= nicePawn.invincibilityTimer / niceVet.static.GetInvincibilityDuration(nicePawn.KFPRI);
 | 
				
			||||||
 | 
					            else
 | 
				
			||||||
 | 
					               barWidth *= nicePawn.invincibilityTimer / class'NiceSkillZerkGunzerker'.default.cooldown;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					            barWidth = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        x = center - (barWidth / 2);
 | 
				
			||||||
 | 
					        C.SetPos(x, y);
 | 
				
			||||||
 | 
					        C.DrawTile(barTexture, barWidth, 32, 0, 0, barTexture.MaterialUSize(), barTexture.MaterialVSize());
 | 
				
			||||||
 | 
					        if (nicePawn.safeMeleeMisses <= 0)
 | 
				
			||||||
 | 
					            return;
 | 
				
			||||||
 | 
					        missesSpace = 10; // 64x64 => 16x16
 | 
				
			||||||
 | 
					        missesHeight = 16;
 | 
				
			||||||
 | 
					        missesWidth = nicePawn.safeMeleeMisses * 16 + (nicePawn.safeMeleeMisses - 1) * missesSpace;
 | 
				
			||||||
 | 
					        missesX = center - (missesWidth / 2);
 | 
				
			||||||
 | 
					        missesY = y + (32 - missesHeight) * 0.5;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        for (i = 0; i < nicePawn.safeMeleeMisses; i++)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            C.SetPos(missesX + i * (16 + missesSpace), missesY);
 | 
				
			||||||
 | 
					            C.DrawTile(shield, 16, 16, 0, 0, shield.MaterialUSize(), shield.MaterialVSize());
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ////  Draw cooldowns
 | 
				
			||||||
 | 
					    if (nicePlayer.abilityManager == none)
 | 
				
			||||||
       return;
 | 
					       return;
 | 
				
			||||||
    for(i = 0;i < nicePlayer.abilityManager.currentAbilitiesAmount;i ++)
 | 
					    for (i = 0; i < nicePlayer.abilityManager.currentAbilitiesAmount; i++)
 | 
				
			||||||
       DrawAbilityCooldown(C, i);
 | 
					       DrawAbilityCooldown(C, i);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //// Draw counters
 | 
				
			||||||
 | 
					    niceMutator = class'NicePack'.static.Myself(nicePawn.Level);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (niceMutator != none && 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++)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            if (niceMutator.niceCounterSet[i].value != 0 || niceMutator.niceCounterSet[i].bShowZeroValue)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                DrawCounter(C, niceMutator.niceCounterSet[i], x, y, C.ViewPort.Actor.Pawn.PlayerReplicationInfo.Team);
 | 
				
			||||||
 | 
					                x += 128 + 4;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function DrawCounter(Canvas C, NicePack.CounterDisplay counter, int x, int y, TeamInfo team){
 | 
					function DrawCounter(Canvas C, NicePack.CounterDisplay counter, int x, int y, TeamInfo team){
 | 
				
			||||||
@ -360,9 +405,9 @@ function DrawCalibrationStars(Canvas C){
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function DrawWeaponProgress(Canvas C, NicePack.WeaponProgressDisplay weapProgress, int x, int y, TeamInfo team)
 | 
					function DrawWeaponProgress(Canvas C, WeaponProgressDisplay weapProgress, int x, int y, TeamInfo team)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    local float textWidth, textHeight; 
 | 
					    local float textWidth, textHeight;
 | 
				
			||||||
    local string textToDraw;
 | 
					    local string textToDraw;
 | 
				
			||||||
    local float TempWidth, TempHeight, TempBorder;
 | 
					    local float TempWidth, TempHeight, TempBorder;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -404,51 +449,60 @@ function DrawWeaponProgress(Canvas C, NicePack.WeaponProgressDisplay weapProgres
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function bool KeyEvent(EInputKey Key, EInputAction Action, float Delta){
 | 
					function bool KeyEvent(EInputKey Key, EInputAction Action, float Delta)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
    local bool bNeedsReload;
 | 
					    local bool bNeedsReload;
 | 
				
			||||||
    local string Alias, LeftPart, RigthPart;
 | 
					    local string Alias, LeftPart, RigthPart;
 | 
				
			||||||
    local NiceWeapon niceWeap;
 | 
					    local NiceWeapon niceWeap;
 | 
				
			||||||
    local NicePlayerController nicePlayer;
 | 
					    local NicePlayerController nicePlayer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Find controller and current weapon
 | 
					    // Find controller and current weapon
 | 
				
			||||||
    nicePlayer = NicePlayerController(ViewportOwner.Actor);
 | 
					    nicePlayer = NicePlayerController(ViewportOwner.Actor);
 | 
				
			||||||
    if(nicePlayer == none)
 | 
					    if (nicePlayer == none)
 | 
				
			||||||
       return false;
 | 
					       return false;
 | 
				
			||||||
    if(nicePlayer.Pawn != none)
 | 
					    if (nicePlayer.Pawn != none)
 | 
				
			||||||
       niceWeap = NiceWeapon(nicePlayer.Pawn.Weapon);
 | 
					       niceWeap = NiceWeapon(nicePlayer.Pawn.Weapon);
 | 
				
			||||||
    // If this is a button press - detect alias
 | 
					    // If this is a button press - detect alias
 | 
				
			||||||
    if(Action == IST_Press){
 | 
					    if (Action == IST_Press)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
       // Check for reload command
 | 
					       // Check for reload command
 | 
				
			||||||
       Alias = nicePlayer.ConsoleCommand("KEYBINDING" @ nicePlayer.ConsoleCommand("KEYNAME" @ Key));
 | 
					       Alias = nicePlayer.ConsoleCommand("KEYBINDING" @ nicePlayer.ConsoleCommand("KEYNAME" @ Key));
 | 
				
			||||||
       if(nicePlayer.bAdvReloadCheck)
 | 
					       if (nicePlayer.bAdvReloadCheck)
 | 
				
			||||||
           bNeedsReload = InStr(Caps(Alias), "RELOADMENOW") > -1 || InStr(Caps(Alias), "RELOADWEAPON") > -1;
 | 
					           bNeedsReload = InStr(Caps(Alias), "RELOADMENOW") > -1 || InStr(Caps(Alias), "RELOADWEAPON") > -1;
 | 
				
			||||||
       if(Divide(Alias, " ", LeftPart, RigthPart))
 | 
					       if (Divide(Alias, " ", LeftPart, RigthPart))
 | 
				
			||||||
           Alias = LeftPart;
 | 
					           Alias = LeftPart;
 | 
				
			||||||
       if(Key == IK_MouseWheelUp || Key == IK_MouseWheelDown){
 | 
					       if (Key == IK_MouseWheelUp || Key == IK_MouseWheelDown)
 | 
				
			||||||
 | 
					       {
 | 
				
			||||||
           nicePlayer.UpdateSelectors();
 | 
					           nicePlayer.UpdateSelectors();
 | 
				
			||||||
           if(nicePlayer.hasZeroSelector && nicePlayer.bUsesMouseWheel && nicePlayer.bNiceWeaponManagement){
 | 
					           if (nicePlayer.hasZeroSelector && nicePlayer.bUsesMouseWheel && nicePlayer.bNiceWeaponManagement)
 | 
				
			||||||
 | 
					           {
 | 
				
			||||||
               nicePlayer.ScrollSelector(0, nicePlayer.bMouseWheelLoops, Key == IK_MouseWheelUp);
 | 
					               nicePlayer.ScrollSelector(0, nicePlayer.bMouseWheelLoops, Key == IK_MouseWheelUp);
 | 
				
			||||||
               return true;
 | 
					               return true;
 | 
				
			||||||
           }
 | 
					           }
 | 
				
			||||||
       }
 | 
					       }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    // Open trader on movement
 | 
					 | 
				
			||||||
    if(Alias ~= "MoveForward" || Alias ~= "MoveBackward" || Alias ~= "TurnLeft" || Alias ~= "TurnRight"
 | 
					 | 
				
			||||||
       || Alias ~= "StrafeLeft" || Alias ~= "StrafeRight" || Alias ~= "Axis"){
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
       // Open trader if it's a pre-game
 | 
					    // Open trader on movement if it's a pre-game
 | 
				
			||||||
       if(NicePackMutator.bIsPreGame && NicePackMutator.bInitialTrader && (NicePackMutator.bStillDuringInitTrader || !nicePlayer.bOpenedInitTrader) && nicePlayer.Pawn != none){
 | 
					    if (NicePackMutator.bIsPreGame && NicePackMutator.bInitialTrader && (NicePackMutator.bStillDuringInitTrader || !nicePlayer.bOpenedInitTrader) && nicePlayer.Pawn != none)
 | 
				
			||||||
           nicePlayer.ShowBuyMenu("Initial trader", KFHumanPawn(nicePlayer.Pawn).MaxCarryWeight);
 | 
					    {
 | 
				
			||||||
           nicePlayer.bOpenedInitTrader = true;
 | 
					        if (Alias ~= "MoveForward" || Alias ~= "MoveBackward" || Alias ~= "TurnLeft" || Alias ~= "TurnRight"
 | 
				
			||||||
           return true;
 | 
					            || Alias ~= "StrafeLeft" || Alias ~= "StrafeRight" || Alias ~= "Axis")
 | 
				
			||||||
       }
 | 
					        {
 | 
				
			||||||
       //nicePlayer.ClientOpenMenu("NicePack.NiceGUIBuyMenu",,"Test stuff",string(15));
 | 
					            // nicePlayer.ClientOpenMenu("NicePack.NiceGUIBuyMenu",,"Test stuff",string(15));
 | 
				
			||||||
 | 
					            nicePlayer.ShowBuyMenu("Initial trader", KFHumanPawn(nicePlayer.Pawn).MaxCarryWeight);
 | 
				
			||||||
 | 
					            nicePlayer.bOpenedInitTrader = true;
 | 
				
			||||||
 | 
					            return true;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Reload if we've detected a reload alias in this button's command
 | 
					    // Reload if we've detected a reload alias in this button's command
 | 
				
			||||||
    if(niceWeap != none && !nicePlayer.bUseServerReload &&
 | 
					    if (niceWeap != none && !nicePlayer.bUseServerReload &&
 | 
				
			||||||
       (bNeedsReload || Alias ~= "ReloadMeNow" || Alias ~= "ReloadWeapon"))
 | 
					        (bNeedsReload || Alias ~= "ReloadMeNow" || Alias ~= "ReloadWeapon"))
 | 
				
			||||||
       niceWeap.ClientReloadMeNow();
 | 
					       niceWeap.ClientReloadMeNow();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return false;
 | 
					    return false;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
defaultproperties
 | 
					defaultproperties
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    bleedIcon=Texture'NicePackT.MeanZeds.bleedIcon'
 | 
					    bleedIcon=Texture'NicePackT.MeanZeds.bleedIcon'
 | 
				
			||||||
@ -461,4 +515,4 @@ defaultproperties
 | 
				
			|||||||
    InventoryBoxHeight=0.075000
 | 
					    InventoryBoxHeight=0.075000
 | 
				
			||||||
    BorderSize=0.005000
 | 
					    BorderSize=0.005000
 | 
				
			||||||
    bVisible=True
 | 
					    bVisible=True
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -221,16 +221,20 @@ function ServerCooldownAbility(string abilityID){
 | 
				
			|||||||
    if(index >= 0)
 | 
					    if(index >= 0)
 | 
				
			||||||
       nicePlayer.abilityManager.SetAbilityState(index, ASTATE_COOLDOWN);
 | 
					       nicePlayer.abilityManager.SetAbilityState(index, ASTATE_COOLDOWN);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
simulated function Tick(float deltaTime){
 | 
					
 | 
				
			||||||
 | 
					simulated function Tick(float deltaTime)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
    local int                   index;
 | 
					    local int                   index;
 | 
				
			||||||
    local Inventory             Item;
 | 
					    local Inventory             Item;
 | 
				
			||||||
    local NiceWeapon            niceWeap;
 | 
					    local NiceWeapon            niceWeap;
 | 
				
			||||||
    local WeaponTimePair        newPair;
 | 
					    local WeaponTimePair        newPair;
 | 
				
			||||||
    local array<WeaponTimePair> newWTPList;
 | 
					    local array<WeaponTimePair> newWTPList;
 | 
				
			||||||
    local NicePack              niceMutator;
 | 
					 | 
				
			||||||
    local NicePlayerController  nicePlayer;
 | 
					    local NicePlayerController  nicePlayer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    nicePlayer = NicePlayerController(Controller);
 | 
					    nicePlayer = NicePlayerController(Controller);
 | 
				
			||||||
    if(Role == Role_AUTHORITY){
 | 
					
 | 
				
			||||||
 | 
					    if (Role == Role_AUTHORITY)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
        //  Brutal carnage
 | 
					        //  Brutal carnage
 | 
				
			||||||
        if (brutalCranageTimer > 0)
 | 
					        if (brutalCranageTimer > 0)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
@ -329,33 +333,10 @@ simulated function Tick(float deltaTime){
 | 
				
			|||||||
       forcedZedTimeCountDown -= deltaTime;
 | 
					       forcedZedTimeCountDown -= deltaTime;
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
       forcedZedTimeCountDown = 0.0;
 | 
					       forcedZedTimeCountDown = 0.0;
 | 
				
			||||||
    niceMutator = class'NicePack'.static.Myself(Level);
 | 
					
 | 
				
			||||||
    if(niceMutator != none)
 | 
					 | 
				
			||||||
       niceMutator.ClearWeapProgress();
 | 
					 | 
				
			||||||
    if(!class'NiceVeterancyTypes'.static.hasSkill(NicePlayerController(Controller), class'NiceSkillEnforcerMultitasker'))
 | 
					    if(!class'NiceVeterancyTypes'.static.hasSkill(NicePlayerController(Controller), class'NiceSkillEnforcerMultitasker'))
 | 
				
			||||||
       return;
 | 
					       return;
 | 
				
			||||||
    if (    Role < ROLE_Authority && nicePlayer != none
 | 
					
 | 
				
			||||||
        &&  nicePlayer.bFlagDisplayWeaponProgress)
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
       // Update weapon progress for this skill
 | 
					 | 
				
			||||||
       if(niceMutator == none) {
 | 
					 | 
				
			||||||
           Log("Failed to update holstered progress, because no mut! :(");
 | 
					 | 
				
			||||||
           return;
 | 
					 | 
				
			||||||
       }
 | 
					 | 
				
			||||||
       for(Item = Inventory; Item != none; Item = Item.Inventory){
 | 
					 | 
				
			||||||
           niceWeap = NiceWeapon(Item);
 | 
					 | 
				
			||||||
           if(niceWeap != none && niceWeap != weapon && !niceWeap.IsMagazineFull()){
 | 
					 | 
				
			||||||
               niceMutator.AddWeapProgress(niceWeap.class, niceWeap.holsteredCompletition,
 | 
					 | 
				
			||||||
                   true, niceWeap.GetMagazineAmmo());
 | 
					 | 
				
			||||||
           }
 | 
					 | 
				
			||||||
       }
 | 
					 | 
				
			||||||
       return;
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    else if (Role < ROLE_Authority)
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        Log(    "Failed to update holstered progress, checked variables:"
 | 
					 | 
				
			||||||
            @   nicePlayer @ nicePlayer.bFlagDisplayWeaponProgress);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    // Auto-reload holstered weapons
 | 
					    // Auto-reload holstered weapons
 | 
				
			||||||
    holsteredReloadCountDown -= deltaTime;
 | 
					    holsteredReloadCountDown -= deltaTime;
 | 
				
			||||||
    if(holsteredReloadCountDown <= 0.0){
 | 
					    if(holsteredReloadCountDown <= 0.0){
 | 
				
			||||||
 | 
				
			|||||||
@ -35,10 +35,10 @@ var config bool     bNoLateFFIncrease;          // Disables FF increase through
 | 
				
			|||||||
// Configuration variables that store whether or not to replace the specimen with it's mean counterpart
 | 
					// Configuration variables that store whether or not to replace the specimen with it's mean counterpart
 | 
				
			||||||
var config bool     bReplaceCrawler, bReplaceStalker, bReplaceClot, bReplaceGorefast, bReplaceBloat, bReplaceSiren, bReplaceHusk, bReplaceScrake, bReplaceFleshpound;
 | 
					var config bool     bReplaceCrawler, bReplaceStalker, bReplaceClot, bReplaceGorefast, bReplaceBloat, bReplaceSiren, bReplaceHusk, bReplaceScrake, bReplaceFleshpound;
 | 
				
			||||||
var config int      bigZedMinHealth;            // If zed's base Health >= this value, zed counts as Big
 | 
					var config int      bigZedMinHealth;            // If zed's base Health >= this value, zed counts as Big
 | 
				
			||||||
var config int      mediumZedMinHealth;  
 | 
					var config int      mediumZedMinHealth;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var int     maxPlayersInGame;
 | 
					var int     maxPlayersInGame;
 | 
				
			||||||
   
 | 
					
 | 
				
			||||||
// 'Adrenaline junkie' zed-time extensions
 | 
					// 'Adrenaline junkie' zed-time extensions
 | 
				
			||||||
var int junkieDoneGoals;        // How many times we collected enough head-shots to trigger zed-time extension
 | 
					var int junkieDoneGoals;        // How many times we collected enough head-shots to trigger zed-time extension
 | 
				
			||||||
var int junkieNextGoal;         // How many head-shots we need for next zed-time extension
 | 
					var int junkieNextGoal;         // How many head-shots we need for next zed-time extension
 | 
				
			||||||
@ -95,13 +95,7 @@ struct CounterDisplay{
 | 
				
			|||||||
    var class<NiceSkill>    ownerSkill;
 | 
					    var class<NiceSkill>    ownerSkill;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
var array<CounterDisplay> niceCounterSet;
 | 
					var array<CounterDisplay> niceCounterSet;
 | 
				
			||||||
struct WeaponProgressDisplay{
 | 
					
 | 
				
			||||||
    var class<NiceWeapon>   weapClass;
 | 
					 | 
				
			||||||
    var float               progress;
 | 
					 | 
				
			||||||
    var bool                bShowCounter;
 | 
					 | 
				
			||||||
    var int                 counter;
 | 
					 | 
				
			||||||
};
 | 
					 | 
				
			||||||
var array<WeaponProgressDisplay> niceWeapProgressSet;
 | 
					 | 
				
			||||||
// Replication of config between player and server
 | 
					// Replication of config between player and server
 | 
				
			||||||
var int SrvFlags;
 | 
					var int SrvFlags;
 | 
				
			||||||
var array<NicePlayerController> playersList;
 | 
					var array<NicePlayerController> playersList;
 | 
				
			||||||
@ -131,7 +125,7 @@ static final function NicePack Myself(LevelInfo Level){
 | 
				
			|||||||
    local Mutator M;
 | 
					    local Mutator M;
 | 
				
			||||||
    local NicePack NicePackMutator;
 | 
					    local NicePack NicePackMutator;
 | 
				
			||||||
    if(default.Mut != none)
 | 
					    if(default.Mut != none)
 | 
				
			||||||
       return default.Mut; 
 | 
					       return default.Mut;
 | 
				
			||||||
    // server-side
 | 
					    // server-side
 | 
				
			||||||
    if(Level != none && Level.Game != none){
 | 
					    if(Level != none && Level.Game != none){
 | 
				
			||||||
       for(M = Level.Game.BaseMutator;M != none;M = M.NextMutator){
 | 
					       for(M = Level.Game.BaseMutator;M != none;M = M.NextMutator){
 | 
				
			||||||
@ -186,7 +180,7 @@ simulated function PostBeginPlay()
 | 
				
			|||||||
    default.serverStorage = serverStorage;
 | 
					    default.serverStorage = serverStorage;
 | 
				
			||||||
    serverStorage.events.static.AddAdapter(class'NiceRemoteDataAdapter', Level);
 | 
					    serverStorage.events.static.AddAdapter(class'NiceRemoteDataAdapter', Level);
 | 
				
			||||||
    // Find game type and ScrN mutator
 | 
					    // Find game type and ScrN mutator
 | 
				
			||||||
    ScrnGT = ScrnGameType(Level.Game); 
 | 
					    ScrnGT = ScrnGameType(Level.Game);
 | 
				
			||||||
    NiceGT = NiceGameType(Level.Game);
 | 
					    NiceGT = NiceGameType(Level.Game);
 | 
				
			||||||
    if (NiceGT == none)
 | 
					    if (NiceGT == none)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
@ -195,7 +189,7 @@ simulated function PostBeginPlay()
 | 
				
			|||||||
       return;
 | 
					       return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    // FIXME poosh forces this variable in his mutator...
 | 
					    // FIXME poosh forces this variable in his mutator...
 | 
				
			||||||
    NiceGT.LoginMenuClass = "NicePack.NiceInvasionLoginMenu";
 | 
					    NiceGT.LoginMenuClass = string(class'NiceInvasionLoginMenu');
 | 
				
			||||||
    NiceGT.RegisterMutator(self);
 | 
					    NiceGT.RegisterMutator(self);
 | 
				
			||||||
    ScrnMut = NiceGT.ScrnBalanceMut;
 | 
					    ScrnMut = NiceGT.ScrnBalanceMut;
 | 
				
			||||||
    if(bReplacePickups)
 | 
					    if(bReplacePickups)
 | 
				
			||||||
@ -244,7 +238,7 @@ simulated function PostBeginPlay()
 | 
				
			|||||||
       if(FFVO != none)
 | 
					       if(FFVO != none)
 | 
				
			||||||
           FFVO.Mut = self;
 | 
					           FFVO.Mut = self;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    else 
 | 
					    else
 | 
				
			||||||
       log("Unable to spawn voting handler mutator", class.outer.name);
 | 
					       log("Unable to spawn voting handler mutator", class.outer.name);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -438,7 +432,7 @@ simulated function bool CheckReplacement(Actor Other, out byte bSuperRelevant){
 | 
				
			|||||||
               currNumPlayers++;
 | 
					               currNumPlayers++;
 | 
				
			||||||
       if(boss == none) {
 | 
					       if(boss == none) {
 | 
				
			||||||
           niceMonster.Health *= hpScale(niceMonster.PlayerCountHealthScale) / niceMonster.NumPlayersHealthModifer();
 | 
					           niceMonster.Health *= hpScale(niceMonster.PlayerCountHealthScale) / niceMonster.NumPlayersHealthModifer();
 | 
				
			||||||
           niceMonster.HealthMax = niceMonster.Health; 
 | 
					           niceMonster.HealthMax = niceMonster.Health;
 | 
				
			||||||
           niceMonster.HeadHealth *= hpScale(niceMonster.PlayerNumHeadHealthScale) / niceMonster.NumPlayersHeadHealthModifer();
 | 
					           niceMonster.HeadHealth *= hpScale(niceMonster.PlayerNumHeadHealthScale) / niceMonster.NumPlayersHeadHealthModifer();
 | 
				
			||||||
           niceMonster.HeadHealthMax = niceMonster.HeadHealth;
 | 
					           niceMonster.HeadHealthMax = niceMonster.HeadHealth;
 | 
				
			||||||
           if(Level.Game.NumPlayers == 1){
 | 
					           if(Level.Game.NumPlayers == 1){
 | 
				
			||||||
@ -456,7 +450,7 @@ function int FindPickupReplacementIndex(Pickup item)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    local int i;
 | 
					    local int i;
 | 
				
			||||||
    for(i=0; i < pickupReplaceArray.length;i ++){
 | 
					    for(i=0; i < pickupReplaceArray.length;i ++){
 | 
				
			||||||
       if(pickupReplaceArray[i].vanillaClass == item.class || pickupReplaceArray[i].scrnClass == item.class) 
 | 
					       if(pickupReplaceArray[i].vanillaClass == item.class || pickupReplaceArray[i].scrnClass == item.class)
 | 
				
			||||||
           return i;
 | 
					           return i;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return -1;
 | 
					    return -1;
 | 
				
			||||||
@ -502,18 +496,7 @@ simulated function int GetVisibleCountersAmount(){
 | 
				
			|||||||
simulated function int UpdateCounterValue(string cName){
 | 
					simulated function int UpdateCounterValue(string cName){
 | 
				
			||||||
    return 0;
 | 
					    return 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
simulated function AddWeapProgress(class<NiceWeapon> weapClass, float progress,
 | 
					
 | 
				
			||||||
    optional bool bShowCounter, optional int counter){
 | 
					 | 
				
			||||||
    local WeaponProgressDisplay newProgress;
 | 
					 | 
				
			||||||
    newProgress.weapClass = weapClass;
 | 
					 | 
				
			||||||
    newProgress.progress = progress;
 | 
					 | 
				
			||||||
    newProgress.bShowCounter = bShowCounter;
 | 
					 | 
				
			||||||
    newProgress.counter = counter;
 | 
					 | 
				
			||||||
    niceWeapProgressSet[niceWeapProgressSet.Length] = newProgress;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
simulated function ClearWeapProgress(){
 | 
					 | 
				
			||||||
    niceWeapProgressSet.Length = 0;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
// Returns cash per wave based on current difficulty
 | 
					// Returns cash per wave based on current difficulty
 | 
				
			||||||
// Returns cash per wave based on current difficulty
 | 
					// Returns cash per wave based on current difficulty
 | 
				
			||||||
function int GetWaveCash(int lastCashWave, int nextWave){
 | 
					function int GetWaveCash(int lastCashWave, int nextWave){
 | 
				
			||||||
 | 
				
			|||||||
@ -601,23 +601,32 @@ simulated function ClientLog(String logStr){
 | 
				
			|||||||
    if(bFlagDebug)
 | 
					    if(bFlagDebug)
 | 
				
			||||||
       Log("NiceDebug:"$logStr);
 | 
					       Log("NiceDebug:"$logStr);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
function ServerUse(){
 | 
					
 | 
				
			||||||
 | 
					function ServerUse()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
    local NiceHumanPawn myPawn;
 | 
					    local NiceHumanPawn myPawn;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    myPawn = NiceHumanPawn(Pawn);
 | 
					    myPawn = NiceHumanPawn(Pawn);
 | 
				
			||||||
    if(myPawn == none){
 | 
					    if (myPawn == none)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
       super.ServerUse();
 | 
					       super.ServerUse();
 | 
				
			||||||
       return;
 | 
					       return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Handle initial shop / medic drugs
 | 
					    // Handle initial shop / medic drugs
 | 
				
			||||||
    if(NicePackMutator != none && NicePackMutator.bIsPreGame && NicePackMutator.bInitialTrader){
 | 
					    if (NicePackMutator != none && NicePackMutator.bIsPreGame && NicePackMutator.bInitialTrader)
 | 
				
			||||||
       if(VSize(Pawn.Velocity) <= 0.0){
 | 
					    {
 | 
				
			||||||
 | 
					       if (VSize(Pawn.Velocity) <= 0.0)
 | 
				
			||||||
 | 
					       {
 | 
				
			||||||
           ShowBuyMenu("Initial trader", myPawn.MaxCarryWeight);
 | 
					           ShowBuyMenu("Initial trader", myPawn.MaxCarryWeight);
 | 
				
			||||||
           bOpenedInitTrader = true;
 | 
					           bOpenedInitTrader = true;
 | 
				
			||||||
       }
 | 
					       }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    else
 | 
					
 | 
				
			||||||
       super.ServerUse();
 | 
					    // call this anyways, so we can use doors!
 | 
				
			||||||
 | 
					    super.ServerUse();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
simulated function ClientUpdatePawnMaxHealth(NiceHumanPawn updatePawn, int newHealthMax){
 | 
					simulated function ClientUpdatePawnMaxHealth(NiceHumanPawn updatePawn, int newHealthMax){
 | 
				
			||||||
    updatePawn.HealthMax = newHealthMax;
 | 
					    updatePawn.HealthMax = newHealthMax;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -1264,7 +1273,7 @@ state Spectating{
 | 
				
			|||||||
       A = Trace(HitLocation, HitNormal, TraceEnd, TraceStart, true);
 | 
					       A = Trace(HitLocation, HitNormal, TraceEnd, TraceStart, true);
 | 
				
			||||||
       if(Pawn(A) != none)
 | 
					       if(Pawn(A) != none)
 | 
				
			||||||
           ServerSetViewTarget(A);
 | 
					           ServerSetViewTarget(A);
 | 
				
			||||||
    }    
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
simulated function ClientSpawnGhostProjectile(Vector Start, int pitch, int yaw, int roll, NiceFire.ShotType shotParams, NiceFire.FireModeContext fireContext, bool bForceComplexTraj){
 | 
					simulated function ClientSpawnGhostProjectile(Vector Start, int pitch, int yaw, int roll, NiceFire.ShotType shotParams, NiceFire.FireModeContext fireContext, bool bForceComplexTraj){
 | 
				
			||||||
    local Rotator projectileDir;
 | 
					    local Rotator projectileDir;
 | 
				
			||||||
 | 
				
			|||||||
@ -6,7 +6,7 @@ var int maxBleedCount;
 | 
				
			|||||||
var private float fBleedPeriod;
 | 
					var private float fBleedPeriod;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var int bleedLevel;
 | 
					var int bleedLevel;
 | 
				
			||||||
var MeanZombieCrawler stalker;
 | 
					var MeanZombieStalker stalker;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
event PostBeginPlay()
 | 
					event PostBeginPlay()
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user