zedtest3 #3
							
								
								
									
										54
									
								
								Configs/NicePack.ini
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								Configs/NicePack.ini
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,54 @@
 | 
				
			|||||||
 | 
					[NicePack.NicePack]
 | 
				
			||||||
 | 
					bScaleZedHealth=True
 | 
				
			||||||
 | 
					bReplacePickups=True
 | 
				
			||||||
 | 
					bInitialTrader=True
 | 
				
			||||||
 | 
					bStillDuringInitTrader=False
 | 
				
			||||||
 | 
					initialTraderTime=10
 | 
				
			||||||
 | 
					bUseProgresiveCash=True
 | 
				
			||||||
 | 
					startupCashBeg=500
 | 
				
			||||||
 | 
					startupCashNormal=500
 | 
				
			||||||
 | 
					startupCashHard=500
 | 
				
			||||||
 | 
					startupCashSui=400
 | 
				
			||||||
 | 
					startupCashHOE=400
 | 
				
			||||||
 | 
					waveCashBeg=350
 | 
				
			||||||
 | 
					waveCashNormal=300
 | 
				
			||||||
 | 
					waveCashHard=200
 | 
				
			||||||
 | 
					waveCashSui=150
 | 
				
			||||||
 | 
					waveCashHOE=150
 | 
				
			||||||
 | 
					bConvertExp=True
 | 
				
			||||||
 | 
					vetFieldMedicExpCost=2.000000
 | 
				
			||||||
 | 
					vetFieldMedicDmgExpCost=0.025000
 | 
				
			||||||
 | 
					vetSharpHeadshotExpCost=10.000000
 | 
				
			||||||
 | 
					vetSupportDamageExpCost=0.050000
 | 
				
			||||||
 | 
					vetCommandoDamageExpCost=0.050000
 | 
				
			||||||
 | 
					vetDemoDamageExpCost=0.050000
 | 
				
			||||||
 | 
					vetZerkDamageExpCost=0.050000
 | 
				
			||||||
 | 
					vetHeavyMGDamageExpCost=0.050000
 | 
				
			||||||
 | 
					vetGunslingerKillExpCost=20.000000
 | 
				
			||||||
 | 
					bAlwaysAllowSkillChange=False
 | 
				
			||||||
 | 
					minSpawnRate=0.200000
 | 
				
			||||||
 | 
					maxSpawnRate=0.200000
 | 
				
			||||||
 | 
					minimalSpawnDistance=1200
 | 
				
			||||||
 | 
					bOneFFIncOnly=False
 | 
				
			||||||
 | 
					bNoLateFFIncrease=True
 | 
				
			||||||
 | 
					bReplaceCrawler=True
 | 
				
			||||||
 | 
					bReplaceStalker=True
 | 
				
			||||||
 | 
					bReplaceClot=True
 | 
				
			||||||
 | 
					bReplaceGorefast=True
 | 
				
			||||||
 | 
					bReplaceBloat=True
 | 
				
			||||||
 | 
					bReplaceSiren=True
 | 
				
			||||||
 | 
					bReplaceHusk=True
 | 
				
			||||||
 | 
					bReplaceScrake=True
 | 
				
			||||||
 | 
					bReplaceFleshpound=True
 | 
				
			||||||
 | 
					lateMultiplier=0.500000
 | 
				
			||||||
 | 
					BigZedMinHealth=1000
 | 
				
			||||||
 | 
					MediumZedMinHealth=500
 | 
				
			||||||
 | 
					waveCash=800
 | 
				
			||||||
 | 
					waveCash=750
 | 
				
			||||||
 | 
					waveCash=600
 | 
				
			||||||
 | 
					waveCash=500
 | 
				
			||||||
 | 
					waveCash=450
 | 
				
			||||||
 | 
					waveCash=350
 | 
				
			||||||
 | 
					waveCash=250
 | 
				
			||||||
 | 
					waveCash=100000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -2,7 +2,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
Title=Compilation
 | 
					Title=Compilation
 | 
				
			||||||
set PACKAGE="NicePack"
 | 
					set PACKAGE="NicePack"
 | 
				
			||||||
@REM set SOURCES="C:\Users\Shtoyan\Documents\NicePack"
 | 
					@REM set SOURCES="D:\Games\SteamLibrary\steamapps\common\KillingFloor\NicePack"
 | 
				
			||||||
set SOURCES="C:\Users\dkanu\OneDrive\Documents\Programming projects\Killing floor\NicePack\project"
 | 
					set SOURCES="C:\Users\dkanu\OneDrive\Documents\Programming projects\Killing floor\NicePack\project"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
set DIR_COMPILE="C:\Program Files (x86)\Steam\steamapps\common\KillingFloor"
 | 
					set DIR_COMPILE="C:\Program Files (x86)\Steam\steamapps\common\KillingFloor"
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,11 @@ 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.
 | 
					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: <http://www.insultplayers.ru/killingfloor/downloads/nicepack/NiceBundle.7z>
 | 
					The link to the compiled NicePack, along with all necessary files, is here: <http://www.insultplayers.ru/killingfloor/downloads/nicepack/NiceBundle.zip>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Config Files
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Only 1 file atm: [NicePack.ini](Configs/NicePack.ini)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Changelog
 | 
					## Changelog
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1,23 +1,437 @@
 | 
				
			|||||||
class NiceLobbyFooter extends ScrnLobbyFooter;
 | 
					// base class, not vanilla
 | 
				
			||||||
function bool OnFooterClick(GUIComponent Sender)
 | 
					class NiceLobbyFooter extends ButtonFooter;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const MidGameMenuString="NicePack.NiceInvasionLoginMenu";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					var automated GUIButton b_Menu, b_MapVote, b_KickVote, b_Ready, b_ViewMap, b_Cancel;
 | 
				
			||||||
 | 
					var string ReadyString, UnreadyString;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function bool InternalOnPreDraw(Canvas C)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if (Sender == b_Perks){
 | 
					  if (PlayerOwner().GameReplicationInfo != none)
 | 
				
			||||||
       PlayerOwner().ClientOpenMenu(string(Class'NicePack.NiceInvasionLoginMenu'), false);
 | 
					  {
 | 
				
			||||||
       return false;
 | 
					    // disable view map if its not a lobby state
 | 
				
			||||||
 | 
					    if (!PlayerOwner().GameReplicationInfo.bMatchHasBegun)
 | 
				
			||||||
 | 
					      b_ViewMap.EnableMe();
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					      b_ViewMap.DisableMe();
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
    else if(Sender == b_ViewMap){
 | 
					
 | 
				
			||||||
       if(KF_StoryGRI(PlayerOwner().Level.GRI) == none){
 | 
					  // ready-unready text switch
 | 
				
			||||||
           LobbyMenu(PageOwner).bAllowClose = true;
 | 
					  if (PlayerOwner().PlayerReplicationInfo != none && PlayerOwner().PlayerReplicationInfo.bReadyToPlay)
 | 
				
			||||||
           PlayerOwner().ClientCloseMenu(true, false);    
 | 
					    b_Ready.Caption = UnreadyString;
 | 
				
			||||||
           LobbyMenu(PageOwner).bAllowClose = false;
 | 
					  else
 | 
				
			||||||
 | 
					    b_Ready.Caption = ReadyString;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return super.InternalOnPreDraw(C);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// took poosh ScrnLobbyFooter as a reference
 | 
				
			||||||
 | 
					// 1. overrided to position buttons by TabOrder
 | 
				
			||||||
 | 
					// 2. moved some buttons to left side
 | 
				
			||||||
 | 
					function PositionButtons(Canvas C)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  local int j;
 | 
				
			||||||
 | 
					  local GUIButton b;
 | 
				
			||||||
 | 
					  local array<GUIButton> buttonsLEFT, buttonsRIGHT;
 | 
				
			||||||
 | 
					  local float x, s, m;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  s = GetSpacer();
 | 
				
			||||||
 | 
					  m = GetMargin() / 2;
 | 
				
			||||||
 | 
					  x = ActualLeft() + ActualWidth() - m;
 | 
				
			||||||
 | 
					  // position the Disconnect button on the left, others on the right
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // right buttons
 | 
				
			||||||
 | 
					  buttonsRIGHT = GetButtons(false);
 | 
				
			||||||
 | 
					  for (j = buttonsRIGHT.length - 1; j >= 0; --j)
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    b = buttonsRIGHT[j];
 | 
				
			||||||
 | 
					    x -= b.ActualWidth();
 | 
				
			||||||
 | 
					    b.WinLeft = b.RelativeLeft(x, true);
 | 
				
			||||||
 | 
					    x -= s;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // left buttons
 | 
				
			||||||
 | 
					  buttonsLEFT = GetButtons(true);
 | 
				
			||||||
 | 
					  for (j = 0; j < buttonsLEFT.length; j++)
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    b = buttonsLEFT[j];
 | 
				
			||||||
 | 
					    b.WinLeft = b.RelativeLeft(m, true);
 | 
				
			||||||
 | 
					    m += b.ActualWidth();
 | 
				
			||||||
 | 
					    m += s;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					final private function array<GUIButton> GetButtons(optional bool bLEFTSIDED)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  local int i, j;
 | 
				
			||||||
 | 
					  local GUIButton b;
 | 
				
			||||||
 | 
					  local array<GUIButton> buttons;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (bLEFTSIDED)
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    for (i = 0; i < Controls.Length; ++i)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      b = GUIButton(Controls[i]);
 | 
				
			||||||
 | 
					      if (b != none && bIsButtonLeft(b) && b.bVisible)
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        // compare tab orders and kepp the array sorted
 | 
				
			||||||
 | 
					        for (j = 0; j < buttons.length; ++j) 
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          if (buttons[j].TabOrder >= b.TabOrder)
 | 
				
			||||||
 | 
					            break;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        // fill the array
 | 
				
			||||||
 | 
					        buttons.insert(j, 1);
 | 
				
			||||||
 | 
					        buttons[j] = b;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    else if(Sender == b_Ready){
 | 
					 | 
				
			||||||
       return super(LobbyFooter).OnFooterClick(Sender); // bypass serverperks
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
       return super.OnFooterClick(Sender);
 | 
					  {
 | 
				
			||||||
 | 
					    for (i = 0; i < Controls.Length; ++i)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      b = GUIButton(Controls[i]);
 | 
				
			||||||
 | 
					      if (b != none && !bIsButtonLeft(b) && b.bVisible)
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        // compare tab orders and kepp the array sorted
 | 
				
			||||||
 | 
					        for (j = 0; j < buttons.length; ++j) 
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          if (buttons[j].TabOrder >= b.TabOrder)
 | 
				
			||||||
 | 
					            break;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        // fill the array
 | 
				
			||||||
 | 
					        buttons.insert(j, 1);
 | 
				
			||||||
 | 
					        buttons[j] = b;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return buttons;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// which buttons are left sided
 | 
				
			||||||
 | 
					final private function bool bIsButtonLeft(GUIButton b)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  // mapvote, kickvote and main menu must be on left side
 | 
				
			||||||
 | 
					  if (b == b_MapVote || b == b_KickVote || b == b_Menu)
 | 
				
			||||||
 | 
					    return true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return false;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function bool ButtonsSized(Canvas C)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  local int i;
 | 
				
			||||||
 | 
					  local GUIButton b;
 | 
				
			||||||
 | 
					  local bool bResult;
 | 
				
			||||||
 | 
					  local string str;
 | 
				
			||||||
 | 
					  local float T, AH, AT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (!bPositioned)
 | 
				
			||||||
 | 
					    return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  bResult = true;
 | 
				
			||||||
 | 
					  str = GetLongestCaption(C);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  AH = ActualHeight();
 | 
				
			||||||
 | 
					  AT = ActualTop();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  for (i = 0; i < Controls.Length; i++)
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    b = GUIButton(Controls[i]);
 | 
				
			||||||
 | 
					    if (b != none)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      if (bAutoSize && bFixedWidth)
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        if (b.Caption == "")
 | 
				
			||||||
 | 
					          b.SizingCaption = Left(str, Len(str) / 2);
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					          b.SizingCaption = str;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      else
 | 
				
			||||||
 | 
					        b.SizingCaption = "";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      bResult = bResult && b.bPositioned;
 | 
				
			||||||
 | 
					      if (bFullHeight)
 | 
				
			||||||
 | 
					        b.WinHeight = b.RelativeHeight(AH, true);
 | 
				
			||||||
 | 
					      else
 | 
				
			||||||
 | 
					        b.WinHeight = b.RelativeHeight(ActualHeight(ButtonHeight), true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      switch (Justification)
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        case TXTA_Left:
 | 
				
			||||||
 | 
					          T = ClientBounds[1];
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        case TXTA_Center:
 | 
				
			||||||
 | 
					          T = (AT + AH / 2) - (b.ActualHeight() / 2);
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        case TXTA_Right:
 | 
				
			||||||
 | 
					          T = ClientBounds[3] - b.ActualHeight();
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      //b.WinTop = AT + ((AH - ActualHeight(ButtonHeight)) / 2);
 | 
				
			||||||
 | 
					      b.WinTop = b.RelativeTop(T, true) + ((WinHeight - ButtonHeight) / 2);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return bResult;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function float GetButtonLeft()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  local int i;
 | 
				
			||||||
 | 
					  local GUIButton b;
 | 
				
			||||||
 | 
					  local float TotalWidth, AW, AL;
 | 
				
			||||||
 | 
					  local float FooterMargin;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  AL = ActualLeft();
 | 
				
			||||||
 | 
					  AW = ActualWidth();
 | 
				
			||||||
 | 
					  FooterMargin = GetMargin();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  for (i = 0; i < Controls.Length; i++)
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    b = GUIButton(Controls[i]);
 | 
				
			||||||
 | 
					    if (b != none)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      if (TotalWidth > 0)
 | 
				
			||||||
 | 
					        TotalWidth += GetSpacer();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      TotalWidth += b.ActualWidth();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (Alignment == TXTA_Center)
 | 
				
			||||||
 | 
					    return (AL + AW) / 2 - FooterMargin / 2 - TotalWidth / 2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (Alignment == TXTA_Right)
 | 
				
			||||||
 | 
					    return (AL + AW - FooterMargin / 2) - TotalWidth;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return AL + (FooterMargin / 2);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Finds the longest caption of all the buttons
 | 
				
			||||||
 | 
					function string GetLongestCaption(Canvas C)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  local int i;
 | 
				
			||||||
 | 
					  local float XL, YL, LongestW;
 | 
				
			||||||
 | 
					  local string str;
 | 
				
			||||||
 | 
					  local GUIButton b;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (C == none)
 | 
				
			||||||
 | 
					    return "";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  for (i = 0; i < Controls.Length; i++)
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    b = GUIButton(Controls[i]);
 | 
				
			||||||
 | 
					    if (b != none)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      if (b.Style != none)
 | 
				
			||||||
 | 
					        b.Style.TextSize(C, b.MenuState, b.Caption, XL, YL, b.FontScale);
 | 
				
			||||||
 | 
					      else
 | 
				
			||||||
 | 
					        C.StrLen( b.Caption, XL, YL );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      if (LongestW == 0 || XL > LongestW)
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        str = b.Caption;
 | 
				
			||||||
 | 
					        LongestW = XL;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return str;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function bool OnFooterClick(GUIComponent Sender)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  local GUIController C;
 | 
				
			||||||
 | 
					  local PlayerController PC;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  PC = PlayerOwner();
 | 
				
			||||||
 | 
					  C = Controller;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // midgame menu
 | 
				
			||||||
 | 
					  if (Sender == b_Menu)
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    PC.ClientOpenMenu(MidGameMenuString, false);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  // ready-unready us
 | 
				
			||||||
 | 
					  else if (Sender == b_Ready)
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    if (PC.Level.NetMode == NM_Standalone || !PC.PlayerReplicationInfo.bReadyToPlay)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      if (KFPlayerController(PC) != none)
 | 
				
			||||||
 | 
					        KFPlayerController(PC).SendSelectedVeterancyToServer(true);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      // Set Ready
 | 
				
			||||||
 | 
					      PC.ServerRestartPlayer();
 | 
				
			||||||
 | 
					      PC.PlayerReplicationInfo.bReadyToPlay = True;
 | 
				
			||||||
 | 
					      if (PC.Level.GRI.bMatchHasBegun)
 | 
				
			||||||
 | 
					        PC.ClientCloseMenu(true, false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      b_Ready.Caption = UnreadyString;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      if (KFPlayerController(PC) != none)
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        KFPlayerController(PC).ServerUnreadyPlayer();
 | 
				
			||||||
 | 
					        PC.PlayerReplicationInfo.bReadyToPlay = false;
 | 
				
			||||||
 | 
					        b_Ready.Caption = ReadyString;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  // Kill Window and exit game / disconnect from server
 | 
				
			||||||
 | 
					  else if (Sender == b_Cancel)
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    // change class to ours
 | 
				
			||||||
 | 
					    NiceLobbyMenu(PageOwner).bAllowClose = true;
 | 
				
			||||||
 | 
					    C.ViewportOwner.Console.ConsoleCommand("DISCONNECT");
 | 
				
			||||||
 | 
					    // Marco SP
 | 
				
			||||||
 | 
					    PC.ClientCloseMenu(true, false);
 | 
				
			||||||
 | 
					    C.AutoLoadMenus();
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  // Spectate map while waiting for players to get ready
 | 
				
			||||||
 | 
					  else if (Sender == b_ViewMap)
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    // change class to ours
 | 
				
			||||||
 | 
					    NiceLobbyMenu(PageOwner).bAllowClose = true;
 | 
				
			||||||
 | 
					    PC.ClientCloseMenu(true, false);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  // open kick vote
 | 
				
			||||||
 | 
					  else if (Sender == b_KickVote)
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    Controller.OpenMenu(Controller.KickVotingMenu);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  // open map vote
 | 
				
			||||||
 | 
					  else if (Sender == b_MapVote)
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    PC.ShowVoteMenu();
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  return false;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function OnSteamStatsAndAchievementsReady()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  PlayerOwner().ClientOpenMenu("KFGUI.KFProfilePage", false);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
defaultproperties
 | 
					defaultproperties
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					  ReadyString="Ready"
 | 
				
			||||||
 | 
					  UnreadyString="Unready"
 | 
				
			||||||
 | 
					  OnPreDraw=NiceLobbyFooter.InternalOnPreDraw
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // LEFT buttons
 | 
				
			||||||
 | 
					  Begin Object Class=GUIButton Name=MenuButton
 | 
				
			||||||
 | 
					    Caption="Main Menu"
 | 
				
			||||||
 | 
					    Hint="Open midgame menu."
 | 
				
			||||||
 | 
					    WinTop=0.966146
 | 
				
			||||||
 | 
					    WinLeft=0.280000
 | 
				
			||||||
 | 
					    WinWidth=0.120000
 | 
				
			||||||
 | 
					    WinHeight=0.033203
 | 
				
			||||||
 | 
					    RenderWeight=2.000000
 | 
				
			||||||
 | 
					    TabOrder=0
 | 
				
			||||||
 | 
					    bBoundToParent=true
 | 
				
			||||||
 | 
					    ToolTip=none
 | 
				
			||||||
 | 
					    OnClick=NiceLobbyFooter.OnFooterClick
 | 
				
			||||||
 | 
					    OnKeyEvent=Cancel.InternalOnKeyEvent
 | 
				
			||||||
 | 
					  End Object
 | 
				
			||||||
 | 
					  b_Menu=MenuButton
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  Begin Object Class=GUIButton Name=MapVote
 | 
				
			||||||
 | 
					    Caption="Map Vote"
 | 
				
			||||||
 | 
					    Hint="Shortcut to map vote."
 | 
				
			||||||
 | 
					    WinTop=0.966146
 | 
				
			||||||
 | 
					    WinLeft=1.500000 //-0.500000
 | 
				
			||||||
 | 
					    WinWidth=0.120000
 | 
				
			||||||
 | 
					    WinHeight=0.033203
 | 
				
			||||||
 | 
					    RenderWeight=2.000000
 | 
				
			||||||
 | 
					    TabOrder=1
 | 
				
			||||||
 | 
					    bBoundToParent=true
 | 
				
			||||||
 | 
					    ToolTip=none
 | 
				
			||||||
 | 
					    OnClick=NiceLobbyFooter.OnFooterClick
 | 
				
			||||||
 | 
					    OnKeyEvent=Cancel.InternalOnKeyEvent
 | 
				
			||||||
 | 
					  End Object
 | 
				
			||||||
 | 
					  b_MapVote=MapVote
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  Begin Object Class=GUIButton Name=KickVote
 | 
				
			||||||
 | 
					    Caption="Kick Vote"
 | 
				
			||||||
 | 
					    Hint="Shortcut to kick vote."
 | 
				
			||||||
 | 
					    WinTop=0.966146
 | 
				
			||||||
 | 
					    WinLeft=-0.500000
 | 
				
			||||||
 | 
					    WinWidth=0.120000
 | 
				
			||||||
 | 
					    WinHeight=0.033203
 | 
				
			||||||
 | 
					    RenderWeight=2.000000
 | 
				
			||||||
 | 
					    TabOrder=2
 | 
				
			||||||
 | 
					    bBoundToParent=true
 | 
				
			||||||
 | 
					    ToolTip=none
 | 
				
			||||||
 | 
					    OnClick=NiceLobbyFooter.OnFooterClick
 | 
				
			||||||
 | 
					    OnKeyEvent=Cancel.InternalOnKeyEvent
 | 
				
			||||||
 | 
					  End Object
 | 
				
			||||||
 | 
					  b_KickVote=KickVote
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // RIGHT buttons
 | 
				
			||||||
 | 
					  Begin Object Class=GUIButton Name=ReadyButton
 | 
				
			||||||
 | 
					    Caption="Ready"
 | 
				
			||||||
 | 
					    Hint="Click to indicate you are ready to play"
 | 
				
			||||||
 | 
					    WinTop=0.966146
 | 
				
			||||||
 | 
					    WinLeft=0.280000
 | 
				
			||||||
 | 
					    WinWidth=0.120000
 | 
				
			||||||
 | 
					    WinHeight=0.033203
 | 
				
			||||||
 | 
					    RenderWeight=2.000000
 | 
				
			||||||
 | 
					    TabOrder=3
 | 
				
			||||||
 | 
					    bBoundToParent=true
 | 
				
			||||||
 | 
					    ToolTip=none
 | 
				
			||||||
 | 
					    OnClick=NiceLobbyFooter.OnFooterClick
 | 
				
			||||||
 | 
					    OnKeyEvent=ReadyButton.InternalOnKeyEvent
 | 
				
			||||||
 | 
					  End Object
 | 
				
			||||||
 | 
					  b_Ready=ReadyButton
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  Begin Object Class=GUIButton Name=ViewMap
 | 
				
			||||||
 | 
					    Caption="View Map"
 | 
				
			||||||
 | 
					    Hint="Hover around while other players afk to death."
 | 
				
			||||||
 | 
					    WinTop=0.966146
 | 
				
			||||||
 | 
					    WinLeft=-0.500000
 | 
				
			||||||
 | 
					    WinWidth=0.120000
 | 
				
			||||||
 | 
					    WinHeight=0.033203
 | 
				
			||||||
 | 
					    RenderWeight=2.000000
 | 
				
			||||||
 | 
					    TabOrder=4
 | 
				
			||||||
 | 
					    bBoundToParent=true
 | 
				
			||||||
 | 
					    ToolTip=none
 | 
				
			||||||
 | 
					    OnClick=NiceLobbyFooter.OnFooterClick
 | 
				
			||||||
 | 
					    OnKeyEvent=Cancel.InternalOnKeyEvent
 | 
				
			||||||
 | 
					  End Object
 | 
				
			||||||
 | 
					  b_ViewMap=ViewMap
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  Begin Object Class=GUIButton Name=Cancel
 | 
				
			||||||
 | 
					    Caption="Disconnect"
 | 
				
			||||||
 | 
					    Hint="Disconnect From This Server"
 | 
				
			||||||
 | 
					    WinTop=0.966146
 | 
				
			||||||
 | 
					    WinLeft=-0.500000
 | 
				
			||||||
 | 
					    WinWidth=0.120000
 | 
				
			||||||
 | 
					    WinHeight=0.033203
 | 
				
			||||||
 | 
					    RenderWeight=2.000000
 | 
				
			||||||
 | 
					    TabOrder=5
 | 
				
			||||||
 | 
					    bBoundToParent=true
 | 
				
			||||||
 | 
					    ToolTip=none
 | 
				
			||||||
 | 
					    OnClick=NiceLobbyFooter.OnFooterClick
 | 
				
			||||||
 | 
					    OnKeyEvent=Cancel.InternalOnKeyEvent
 | 
				
			||||||
 | 
					  End Object
 | 
				
			||||||
 | 
					  b_Cancel=Cancel
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -182,21 +182,32 @@ simulated function HandleNiceHealingMechanicsAndSkills
 | 
				
			|||||||
       healed.bZedTimeInvincible = true;
 | 
					       healed.bZedTimeInvincible = true;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
simulated function RemovePoisonAndBleed(NiceHumanPawn healed){
 | 
					
 | 
				
			||||||
 | 
					simulated function RemovePoisonAndBleed(NiceHumanPawn healed)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
    local Inventory             I;
 | 
					    local Inventory             I;
 | 
				
			||||||
    local MeanReplicationInfo   MRI;
 | 
					    local MeanReplicationInfo   MRI;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // log spam fix
 | 
				
			||||||
 | 
					    if (healed == none)
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // No bleeding
 | 
					    // No bleeding
 | 
				
			||||||
    MRI = class'MeanReplicationInfo'.static.
 | 
					    MRI = class'MeanReplicationInfo'.static.
 | 
				
			||||||
           findSZri(healed.PlayerReplicationInfo);
 | 
					           findSZri(healed.PlayerReplicationInfo);
 | 
				
			||||||
    if (MRI != none)
 | 
					    if (MRI != none)
 | 
				
			||||||
       MRI.stopBleeding();
 | 
					       MRI.stopBleeding();
 | 
				
			||||||
    // No poison
 | 
					    // No poison
 | 
				
			||||||
    if(healed.inventory == none) return;
 | 
					    if (healed.inventory == none)
 | 
				
			||||||
    for(I = healed.inventory; I != none; I = I.inventory){
 | 
					        return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    for (I = healed.inventory; I != none; I = I.inventory)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
       if (MeanPoisonInventory(I) != none)
 | 
					       if (MeanPoisonInventory(I) != none)
 | 
				
			||||||
           I.Destroy();
 | 
					           I.Destroy();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//  Tells server to heal given human pawn.
 | 
					//  Tells server to heal given human pawn.
 | 
				
			||||||
simulated function ServerHealTarget(NiceHumanPawn healed, float charPotency,
 | 
					simulated function ServerHealTarget(NiceHumanPawn healed, float charPotency,
 | 
				
			||||||
                                   Pawn instigator){
 | 
					                                   Pawn instigator){
 | 
				
			||||||
 | 
				
			|||||||
@ -50,24 +50,35 @@ static function bool HasSkill(NicePlayerController nicePlayer, class<NiceSkill>
 | 
				
			|||||||
           return true;
 | 
					           return true;
 | 
				
			||||||
    return false;
 | 
					    return false;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
static function bool SomeoneHasSkill(NicePlayerController player, class<NiceSkill> skill){
 | 
					
 | 
				
			||||||
 | 
					static function bool SomeoneHasSkill(NicePlayerController player, class<NiceSkill> skill)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
    local int i;
 | 
					    local int i;
 | 
				
			||||||
    local Controller P;
 | 
					    local Controller P;
 | 
				
			||||||
    local NicePlayerController nicePlayer;
 | 
					    local NicePlayerController nicePlayer;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (player == none)
 | 
					    if (player == none)
 | 
				
			||||||
       return false;
 | 
					       return false;
 | 
				
			||||||
    if(player.Pawn.Role == ROLE_Authority)
 | 
					    // added pawn check coz of log spam
 | 
				
			||||||
       for(P = player.Level.ControllerList; P != none; P = P.nextController){
 | 
					    if (player.Pawn != none && player.Pawn.Role == ROLE_Authority)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        for(P = player.Level.ControllerList; P != none; P = P.nextController)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
           nicePlayer = NicePlayerController(P);
 | 
					           nicePlayer = NicePlayerController(P);
 | 
				
			||||||
           if (nicePlayer != none && HasSkill(nicePlayer, skill) && nicePlayer.Pawn.Health > 0 && !nicePlayer.Pawn.bPendingDelete
 | 
					           if (nicePlayer != none && HasSkill(nicePlayer, skill) && nicePlayer.Pawn.Health > 0 && !nicePlayer.Pawn.bPendingDelete
 | 
				
			||||||
               && nicePlayer.PlayerReplicationInfo.Team == player.PlayerReplicationInfo.Team)
 | 
					               && nicePlayer.PlayerReplicationInfo.Team == player.PlayerReplicationInfo.Team)
 | 
				
			||||||
               return true;
 | 
					               return true;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    else for(i = 0;i < player.broadcastedSkills.Length;i ++)
 | 
					    }
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					        for (i = 0;i < player.broadcastedSkills.Length;i ++)
 | 
				
			||||||
           if (player.broadcastedSkills[i] == skill)
 | 
					           if (player.broadcastedSkills[i] == skill)
 | 
				
			||||||
               return true;
 | 
					               return true;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
    return false;
 | 
					    return false;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Checks if player will automatically chose given skill at the next opportunity
 | 
					// Checks if player will automatically chose given skill at the next opportunity
 | 
				
			||||||
static function bool IsSkillPending(NicePlayerController nicePlayer, class<NiceSkill> skill){
 | 
					static function bool IsSkillPending(NicePlayerController nicePlayer, class<NiceSkill> skill){
 | 
				
			||||||
    local int i;
 | 
					    local int i;
 | 
				
			||||||
 | 
				
			|||||||
@ -42,10 +42,11 @@ defaultproperties
 | 
				
			|||||||
    FireCrouchAltAnims(1)="CHFire_M14"
 | 
					    FireCrouchAltAnims(1)="CHFire_M14"
 | 
				
			||||||
    FireCrouchAltAnims(2)="CHFire_M14"
 | 
					    FireCrouchAltAnims(2)="CHFire_M14"
 | 
				
			||||||
    FireCrouchAltAnims(3)="CHFire_M14"
 | 
					    FireCrouchAltAnims(3)="CHFire_M14"
 | 
				
			||||||
    HitAnims(0)="HitF_M14"
 | 
					    // was "HitF_M14" and was log spamming like hell
 | 
				
			||||||
    HitAnims(1)="HitB_M14"
 | 
					    HitAnims(0)="HitR_M14_EBR"
 | 
				
			||||||
    HitAnims(2)="HitL_M14"
 | 
					    HitAnims(1)="HitR_M14_EBR"
 | 
				
			||||||
    HitAnims(3)="HitR_M14"
 | 
					    HitAnims(2)="HitR_M14_EBR"
 | 
				
			||||||
 | 
					    HitAnims(3)="HitR_M14_EBR"
 | 
				
			||||||
    PostFireBlendStandAnim="Blend_M14"
 | 
					    PostFireBlendStandAnim="Blend_M14"
 | 
				
			||||||
    PostFireBlendCrouchAnim="CHBlend_M14"
 | 
					    PostFireBlendCrouchAnim="CHBlend_M14"
 | 
				
			||||||
    MeshRef="KF_Weapons3rd2_Trip.M14_EBR_3rd"
 | 
					    MeshRef="KF_Weapons3rd2_Trip.M14_EBR_3rd"
 | 
				
			||||||
 | 
				
			|||||||
@ -23,12 +23,19 @@ simulated function Tick(float DeltaTime) {
 | 
				
			|||||||
       }
 | 
					       }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
function Touch(Actor Other) {
 | 
					
 | 
				
			||||||
 | 
					function Touch(Actor Other)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    if (Other == none)
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    super.Touch(Other);
 | 
					    super.Touch(Other);
 | 
				
			||||||
    if (Other.IsA('ShotgunBullet')) {
 | 
					    if (Other.IsA('ShotgunBullet'))
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
       ShotgunBullet(Other).Damage = 0;
 | 
					       ShotgunBullet(Other).Damage = 0;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function RangedAttack(Actor A) {
 | 
					function RangedAttack(Actor A) {
 | 
				
			||||||
    local int LastFireTime;
 | 
					    local int LastFireTime;
 | 
				
			||||||
    if ( bShotAnim )
 | 
					    if ( bShotAnim )
 | 
				
			||||||
 | 
				
			|||||||
@ -77,6 +77,7 @@ simulated function CloakStalker()
 | 
				
			|||||||
       SetOverlayMaterial(Material'KFX.FBDecloakShader', 0.25, true);
 | 
					       SetOverlayMaterial(Material'KFX.FBDecloakShader', 0.25, true);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
simulated function UnCloakStalker()
 | 
					simulated function UnCloakStalker()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if (bZapped)
 | 
					    if (bZapped)
 | 
				
			||||||
@ -92,7 +93,8 @@ simulated function UnCloakStalker()
 | 
				
			|||||||
       bUnlit = false;
 | 
					       bUnlit = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
       // 25% chance of our Enemy saying something about us being invisible
 | 
					       // 25% chance of our Enemy saying something about us being invisible
 | 
				
			||||||
       if( Level.NetMode!=NM_Client && !KFGameType(Level.Game).bDidStalkerInvisibleMessage && FRand()<0.25 && Controller.Enemy!=none &&
 | 
					       // added Controller check here
 | 
				
			||||||
 | 
					       if (Level.NetMode!=NM_Client && !KFGameType(Level.Game).bDidStalkerInvisibleMessage && FRand()<0.25 && Controller != none && Controller.Enemy!=none &&
 | 
				
			||||||
        PlayerController(Controller.Enemy.Controller)!=none)
 | 
					        PlayerController(Controller.Enemy.Controller)!=none)
 | 
				
			||||||
       {
 | 
					       {
 | 
				
			||||||
           PlayerController(Controller.Enemy.Controller).Speech('AUTO', 17, "");
 | 
					           PlayerController(Controller.Enemy.Controller).Speech('AUTO', 17, "");
 | 
				
			||||||
@ -115,6 +117,7 @@ simulated function UnCloakStalker()
 | 
				
			|||||||
       }
 | 
					       }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
simulated function SetZappedBehavior()
 | 
					simulated function SetZappedBehavior()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    super(NiceMonster).SetZappedBehavior();
 | 
					    super(NiceMonster).SetZappedBehavior();
 | 
				
			||||||
@ -173,25 +176,34 @@ simulated function int AttackAndMoveDoAnimAction( name AnimName ) {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    return super.DoAnimAction( AnimName );
 | 
					    return super.DoAnimAction( AnimName );
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
function bool MeleeDamageTarget(int hitdamage, vector pushdir) {
 | 
					
 | 
				
			||||||
 | 
					function bool MeleeDamageTarget(int hitdamage, vector pushdir)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
    local bool result;
 | 
					    local bool result;
 | 
				
			||||||
    local float effectStrenght;
 | 
					    local float effectStrenght;
 | 
				
			||||||
    local NiceHumanPawn targetPawn;
 | 
					    local NiceHumanPawn targetPawn;
 | 
				
			||||||
    result = Super(NiceMonster).MeleeDamageTarget(hitdamage, pushdir);
 | 
					
 | 
				
			||||||
 | 
					    result = super(NiceMonster).MeleeDamageTarget(hitdamage, pushdir);
 | 
				
			||||||
 | 
					    // if true means we checked ctlr and ctrl.target != none
 | 
				
			||||||
 | 
					    if (result)
 | 
				
			||||||
        targetPawn = NiceHumanPawn(Controller.Target);
 | 
					        targetPawn = NiceHumanPawn(Controller.Target);
 | 
				
			||||||
    if(result && targetPawn != none){
 | 
					
 | 
				
			||||||
 | 
					    if (result && targetPawn != none)
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
       if (targetPawn.ShieldStrength > 100)
 | 
					       if (targetPawn.ShieldStrength > 100)
 | 
				
			||||||
           return result;
 | 
					           return result;
 | 
				
			||||||
       else if (targetPawn.ShieldStrength < 0)
 | 
					       else if (targetPawn.ShieldStrength < 0)
 | 
				
			||||||
           effectStrenght = 1.0;
 | 
					           effectStrenght = 1.0;
 | 
				
			||||||
       else
 | 
					       else
 | 
				
			||||||
           effectStrenght = (100 - targetPawn.ShieldStrength) * 0.01;
 | 
					           effectStrenght = (100 - targetPawn.ShieldStrength) * 0.01;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
       class'MeanReplicationInfo'.static
 | 
					       class'MeanReplicationInfo'.static
 | 
				
			||||||
               .findSZri(targetPawn.PlayerReplicationInfo)
 | 
					               .findSZri(targetPawn.PlayerReplicationInfo)
 | 
				
			||||||
               .setBleeding(Self, effectStrenght);
 | 
					               .setBleeding(Self, effectStrenght);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return result;
 | 
					    return result;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function RemoveHead()
 | 
					function RemoveHead()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    Super(NiceMonster).RemoveHead();
 | 
					    Super(NiceMonster).RemoveHead();
 | 
				
			||||||
 | 
				
			|||||||
@ -232,6 +232,7 @@ function ClawDamageTarget()
 | 
				
			|||||||
           PlaySound(MeleeAttackHitSound, SLOT_Interact, 1.25);
 | 
					           PlaySound(MeleeAttackHitSound, SLOT_Interact, 1.25);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function bool ClawDamageSingleTarget(float UsedMeleeDamage, Actor ThisTarget)
 | 
					function bool ClawDamageSingleTarget(float UsedMeleeDamage, Actor ThisTarget)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    local Pawn HumanTarget;
 | 
					    local Pawn HumanTarget;
 | 
				
			||||||
@ -239,6 +240,11 @@ function bool ClawDamageSingleTarget(float UsedMeleeDamage, Actor ThisTarget)
 | 
				
			|||||||
    local bool bHitSomeone;
 | 
					    local bool bHitSomeone;
 | 
				
			||||||
    local float EnemyAngle;
 | 
					    local float EnemyAngle;
 | 
				
			||||||
    local vector PushForceVar;
 | 
					    local vector PushForceVar;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // fix log spam
 | 
				
			||||||
 | 
					    if (Controller == none || ThisTarget == none)
 | 
				
			||||||
 | 
					        return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    EnemyAngle = Normal(ThisTarget.Location - Location) dot vector(Rotation);
 | 
					    EnemyAngle = Normal(ThisTarget.Location - Location) dot vector(Rotation);
 | 
				
			||||||
    if (EnemyAngle > 0)
 | 
					    if (EnemyAngle > 0)
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
@ -272,6 +278,7 @@ function bool ClawDamageSingleTarget(float UsedMeleeDamage, Actor ThisTarget)
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    return bHitSomeone;
 | 
					    return bHitSomeone;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function StartCharging()
 | 
					function StartCharging()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    // How many times should we hit before we cool down?
 | 
					    // How many times should we hit before we cool down?
 | 
				
			||||||
 | 
				
			|||||||
@ -156,16 +156,31 @@ defaultproperties
 | 
				
			|||||||
    WalkAnims(1)="ZombieScuttleB"
 | 
					    WalkAnims(1)="ZombieScuttleB"
 | 
				
			||||||
    WalkAnims(2)="ZombieScuttleL"
 | 
					    WalkAnims(2)="ZombieScuttleL"
 | 
				
			||||||
    WalkAnims(3)="ZombieScuttleR"
 | 
					    WalkAnims(3)="ZombieScuttleR"
 | 
				
			||||||
    AirAnims(0)="ZombieSpring"
 | 
					    // steves dont have "jump" animation
 | 
				
			||||||
    AirAnims(1)="ZombieSpring"
 | 
					    // https://github.com/poosh/KF-ScrnZedPack/blob/master/Classes/ZedBaseCrawler.uc
 | 
				
			||||||
    AirAnims(2)="ZombieSpring"
 | 
					    AirAnims(0)="ZombieLeapIdle"
 | 
				
			||||||
    AirAnims(3)="ZombieSpring"
 | 
					    AirAnims(1)="ZombieLeapIdle"
 | 
				
			||||||
 | 
					    AirAnims(2)="ZombieLeapIdle"
 | 
				
			||||||
 | 
					    AirAnims(3)="ZombieLeapIdle"
 | 
				
			||||||
    TakeoffAnims(0)="ZombieSpring"
 | 
					    TakeoffAnims(0)="ZombieSpring"
 | 
				
			||||||
    TakeoffAnims(1)="ZombieSpring"
 | 
					    TakeoffAnims(1)="ZombieSpring"
 | 
				
			||||||
    TakeoffAnims(2)="ZombieSpring"
 | 
					    TakeoffAnims(2)="ZombieSpring"
 | 
				
			||||||
    TakeoffAnims(3)="ZombieSpring"
 | 
					    TakeoffAnims(3)="ZombieSpring"
 | 
				
			||||||
    AirStillAnim="ZombieSpring"
 | 
					    LandAnims(0)="Landed"
 | 
				
			||||||
    TakeoffStillAnim="ZombieLeapIdle"
 | 
					    LandAnims(1)="Landed"
 | 
				
			||||||
 | 
					    LandAnims(2)="Landed"
 | 
				
			||||||
 | 
					    LandAnims(3)="Landed"
 | 
				
			||||||
 | 
					    // these should not use but just in case
 | 
				
			||||||
 | 
					    DoubleJumpAnims(0)="ZombieSpring"
 | 
				
			||||||
 | 
					    DoubleJumpAnims(1)="ZombieSpring"
 | 
				
			||||||
 | 
					    DoubleJumpAnims(2)="ZombieSpring"
 | 
				
			||||||
 | 
					    DoubleJumpAnims(3)="ZombieSpring"
 | 
				
			||||||
 | 
					    DodgeAnims(0)="ZombieSpring"
 | 
				
			||||||
 | 
					    DodgeAnims(1)="ZombieSpring"
 | 
				
			||||||
 | 
					    DodgeAnims(2)="ZombieSpring"
 | 
				
			||||||
 | 
					    DodgeAnims(3)="ZombieSpring"
 | 
				
			||||||
 | 
					    AirStillAnim="Jump2"
 | 
				
			||||||
 | 
					    TakeoffStillAnim="ZombieSpring"
 | 
				
			||||||
    IdleCrouchAnim="ZombieLeapIdle"
 | 
					    IdleCrouchAnim="ZombieLeapIdle"
 | 
				
			||||||
    IdleWeaponAnim="ZombieLeapIdle"
 | 
					    IdleWeaponAnim="ZombieLeapIdle"
 | 
				
			||||||
    IdleRestAnim="ZombieLeapIdle"
 | 
					    IdleRestAnim="ZombieLeapIdle"
 | 
				
			||||||
 | 
				
			|||||||
@ -445,6 +445,32 @@ static simulated function PreCacheMaterials(LevelInfo myLevel)
 | 
				
			|||||||
    myLevel.AddPrecacheMaterial(Texture'KF_Specimens_Trip_T.siren_hair');
 | 
					    myLevel.AddPrecacheMaterial(Texture'KF_Specimens_Trip_T.siren_hair');
 | 
				
			||||||
    myLevel.AddPrecacheMaterial(Material'KF_Specimens_Trip_T.siren_hair_fb');
 | 
					    myLevel.AddPrecacheMaterial(Material'KF_Specimens_Trip_T.siren_hair_fb');
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DEAD sirens can NOT spawn scream emitter 
 | 
				
			||||||
 | 
					simulated function PlayDying(class<DamageType> DamageType, vector HitLoc)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  super.PlayDying(DamageType, HitLoc);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  // yea, stop all animations on dead zed
 | 
				
			||||||
 | 
					  StopAnimating();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					state ZombieDying
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					ignores AnimEnd, Trigger, Bump, HitWall, HeadVolumeChange, PhysicsVolumeChange, Falling, BreathTimer, Died, RangedAttack;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  simulated function BeginState()
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    // yea, stop all animations on dead zed
 | 
				
			||||||
 | 
					    StopAnimating();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    super.BeginState();
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
defaultproperties
 | 
					defaultproperties
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    screamTimings(0)=0.420000
 | 
					    screamTimings(0)=0.420000
 | 
				
			||||||
 | 
				
			|||||||
@ -115,6 +115,7 @@ simulated function CloakStalker()
 | 
				
			|||||||
       SetOverlayMaterial(Material'KFX.FBDecloakShader', 0.25, true);
 | 
					       SetOverlayMaterial(Material'KFX.FBDecloakShader', 0.25, true);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
simulated function UnCloakStalker()
 | 
					simulated function UnCloakStalker()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    if (bZapped)
 | 
					    if (bZapped)
 | 
				
			||||||
@ -130,7 +131,8 @@ simulated function UnCloakStalker()
 | 
				
			|||||||
       bUnlit = false;
 | 
					       bUnlit = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
       // 25% chance of our Enemy saying something about us being invisible
 | 
					       // 25% chance of our Enemy saying something about us being invisible
 | 
				
			||||||
       if( Level.NetMode!=NM_Client && !KFGameType(Level.Game).bDidStalkerInvisibleMessage && FRand()<0.25 && Controller.Enemy!=none &&
 | 
					       // added Controller check here
 | 
				
			||||||
 | 
					       if (Level.NetMode!=NM_Client && !KFGameType(Level.Game).bDidStalkerInvisibleMessage && FRand()<0.25 && Controller != none && Controller.Enemy!=none &&
 | 
				
			||||||
        PlayerController(Controller.Enemy.Controller) != none )
 | 
					        PlayerController(Controller.Enemy.Controller) != none )
 | 
				
			||||||
       {
 | 
					       {
 | 
				
			||||||
           PlayerController(Controller.Enemy.Controller).Speech('AUTO', 17, "");
 | 
					           PlayerController(Controller.Enemy.Controller).Speech('AUTO', 17, "");
 | 
				
			||||||
@ -153,6 +155,7 @@ simulated function UnCloakStalker()
 | 
				
			|||||||
       }
 | 
					       }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Set the zed to the zapped behavior
 | 
					// Set the zed to the zapped behavior
 | 
				
			||||||
simulated function SetZappedBehavior()
 | 
					simulated function SetZappedBehavior()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
				
			|||||||
@ -536,16 +536,23 @@ simulated function NonRelevantSpeedupTick(float deltaTime){
 | 
				
			|||||||
       SetGroundSpeed(GetOriginalGroundSpeed());
 | 
					       SetGroundSpeed(GetOriginalGroundSpeed());
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Kill zed if it has been bleeding long enough
 | 
					// Kill zed if it has been bleeding long enough
 | 
				
			||||||
simulated function BleedOutTick(float deltaTick){
 | 
					simulated function BleedOutTick(float deltaTick)
 | 
				
			||||||
    if(Role < ROLE_Authority || !bDecapitated) return;
 | 
					{
 | 
				
			||||||
    if(BleedOutTime <= 0 || Level.TimeSeconds < BleedOutTime) return;
 | 
					   if (Role < ROLE_Authority || !bDecapitated)
 | 
				
			||||||
 | 
					      return;
 | 
				
			||||||
 | 
					   if (BleedOutTime <= 0 || Level.TimeSeconds < BleedOutTime)
 | 
				
			||||||
 | 
					      return;
 | 
				
			||||||
   if (LastDamagedBy != none)
 | 
					   if (LastDamagedBy != none)
 | 
				
			||||||
      Died(LastDamagedBy.Controller, class'DamTypeBleedOut', Location);
 | 
					      Died(LastDamagedBy.Controller, class'DamTypeBleedOut', Location);
 | 
				
			||||||
 | 
					   // else we can say we killed ourselves, none -> controller (self)
 | 
				
			||||||
 | 
					   // P.S. we really need to use Suicide here D:
 | 
				
			||||||
   else
 | 
					   else
 | 
				
			||||||
       Died(none, class'DamTypeBleedOut', Location);
 | 
					      Died(controller, class'DamTypeBleedOut', Location);
 | 
				
			||||||
   BleedOutTime = 0;
 | 
					   BleedOutTime = 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// FX-stuff TWI did in the tick, unchanged
 | 
					// FX-stuff TWI did in the tick, unchanged
 | 
				
			||||||
simulated function TWIFXTick(float deltaTime){
 | 
					simulated function TWIFXTick(float deltaTime){
 | 
				
			||||||
    if(Level.netMode == NM_DedicatedServer) return;
 | 
					    if(Level.netMode == NM_DedicatedServer) return;
 | 
				
			||||||
@ -1077,19 +1084,27 @@ function DealBodyDamage(int damage,
 | 
				
			|||||||
                   damageType, headshotLevel);
 | 
					                   damageType, headshotLevel);
 | 
				
			||||||
    MakeNoise(1.0);
 | 
					    MakeNoise(1.0);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function Died(  Controller killer,
 | 
					function Died(  Controller killer,
 | 
				
			||||||
               class<DamageType> damageType,
 | 
					               class<DamageType> damageType,
 | 
				
			||||||
               vector HitLocation){
 | 
					               vector HitLocation)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
   local bool          bHasManiac;
 | 
					   local bool          bHasManiac;
 | 
				
			||||||
   local NiceHumanPawn nicePawn;
 | 
					   local NiceHumanPawn nicePawn;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   if (killer != none || (Controller != none && killer != Controller))
 | 
				
			||||||
 | 
					   {
 | 
				
			||||||
      bHasManiac = class'NiceVeterancyTypes'.static.
 | 
					      bHasManiac = class'NiceVeterancyTypes'.static.
 | 
				
			||||||
         HasSkill(NicePlayerController(killer), class'NiceSkillDemoManiac');
 | 
					         HasSkill(NicePlayerController(killer), class'NiceSkillDemoManiac');
 | 
				
			||||||
      nicePawn = NiceHumanPawn(killer.pawn);
 | 
					      nicePawn = NiceHumanPawn(killer.pawn);
 | 
				
			||||||
      if (bHasManiac && nicePawn != none)
 | 
					      if (bHasManiac && nicePawn != none)
 | 
				
			||||||
         nicePawn.maniacTimeout = 
 | 
					         nicePawn.maniacTimeout = 
 | 
				
			||||||
            class'NiceSkillDemoManiac'.default.reloadBoostTime;
 | 
					            class'NiceSkillDemoManiac'.default.reloadBoostTime;
 | 
				
			||||||
 | 
					   }
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
   super.Died(killer, damageType, HitLocation);
 | 
					   super.Died(killer, damageType, HitLocation);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
simulated function SetTearOffMomemtum(vector NewMomentum){
 | 
					simulated function SetTearOffMomemtum(vector NewMomentum){
 | 
				
			||||||
    TearOffMomentum     = NewMomentum;
 | 
					    TearOffMomentum     = NewMomentum;
 | 
				
			||||||
    TearOffMomentumX    = NewMomentum.X;
 | 
					    TearOffMomentumX    = NewMomentum.X;
 | 
				
			||||||
@ -2130,6 +2145,27 @@ simulated function DisableCollisions()
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Setters for extra collision cylinders
 | 
				
			||||||
 | 
					simulated function ToggleAuxCollision(bool newbCollision)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					   if (MyExtCollision == none)
 | 
				
			||||||
 | 
					   {
 | 
				
			||||||
 | 
					      log(">> NiceMonster -> ToggleAuxCollision(" $ newbCollision $ ") -> MyExtCollision was none!!!");
 | 
				
			||||||
 | 
					      return;
 | 
				
			||||||
 | 
					   }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   if (!newbCollision)
 | 
				
			||||||
 | 
					   {
 | 
				
			||||||
 | 
					      SavedExtCollision = MyExtCollision.bCollideActors;
 | 
				
			||||||
 | 
					      MyExtCollision.SetCollision(false);
 | 
				
			||||||
 | 
					   }
 | 
				
			||||||
 | 
					   else
 | 
				
			||||||
 | 
					   {
 | 
				
			||||||
 | 
					      MyExtCollision.SetCollision(SavedExtCollision);
 | 
				
			||||||
 | 
					   }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
defaultproperties
 | 
					defaultproperties
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    stunDurationMultiplier=0.5
 | 
					    stunDurationMultiplier=0.5
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user