This commit is contained in:
Anton Tarasenko 2022-01-21 18:29:44 +07:00
commit dfdfad1f9e
24 changed files with 2421 additions and 250 deletions

54
Configs/NicePack.ini Normal file
View 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

1554
Docs/CHANGELOG.md Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,27 @@
@echo off
Title=Compilation
set PACKAGE="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 DIR_COMPILE="C:\Program Files (x86)\Steam\steamapps\common\KillingFloor"
@REM set DIR_COMPILE="D:\Games\KF Dedicated Server - Copy"
set DIR_KFSYS=%DIR_COMPILE%\System
set UCC=%DIR_KFSYS%\UCC.exe
set DIR_SERVER="D:\Servers\kf_server\System"
@REM set DIR_SERVER="D:\Games\KF Dedicated Server\System"
rd /s /q %DIR_COMPILE%\%PACKAGE%\Classes
md %DIR_COMPILE%\%PACKAGE%\Classes\
for /r %SOURCES% %%a in (*.uc) do copy /y "%%a" %DIR_COMPILE%\%PACKAGE%\Classes
del %DIR_KFSYS%\%PACKAGE%.u
%UCC% make
del %DIR_KFSYS%\steam_appid.txt
copy %DIR_KFSYS%\%PACKAGE%.ucl %SERVERDIR%
copy %DIR_KFSYS%\%PACKAGE%.u %SERVERDIR%
pause

View File

@ -5,3 +5,30 @@ 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.
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
Complete changelog lies [here](Docs/CHANGELOG.md).
## Build Info
> N.B. `NiceNameHack` is required for scrn testmap only!
```ini
EditPackages=ServerPerks
EditPackages=ServerPerksMut
EditPackages=ScrnSP
EditPackages=ScrnBalanceSrv
EditPackages=ScrnWeaponPack
EditPackages=ScrnHTec
EditPackages=ScrnHMG
EditPackages=ScrnZedPack
EditPackages=NicePack
EditPackages=NiceNameHack
```
You can use [this](Docs/Compile%20Scripts/Compilation.bat) bat file for basic compilation.

View File

@ -1,7 +1,7 @@
// ScrN copy
class NiceFreezeParticlesDirectional extends NiceFreezeParticlesBase;
simulated function Trigger(Actor other, Pawn eventInstigator){
emitters[0].SpawnParticle(1);
emitters[0].SpawnParticle(1);
}
defaultproperties
{

View File

@ -1,8 +1,8 @@
class NiceIceChunkEmitter extends Emitter;
var() array<Sound> ImpactSounds;
simulated function PostBeginPlay(){
if(ImpactSounds.Length > 0)
PlaySound(ImpactSounds[Rand(ImpactSounds.Length)]);
if(ImpactSounds.Length > 0)
PlaySound(ImpactSounds[Rand(ImpactSounds.Length)]);
}
// NICETODO: change linksfrom HTeac_A to NicePackSM (and change that file)
defaultproperties

View File

@ -1,87 +1,87 @@
class NiceGUIBuyMenu extends UT2k4MainPage;
//The "Header"
var automated GUIImage HeaderBG_Left;
var automated GUIImage HeaderBG_Center;
var automated GUIImage HeaderBG_Right;
var automated GUILabel CurrentPerkLabel;
var automated GUILabel TimeLeftLabel;
var automated GUILabel WaveLabel;
var automated GUILabel HeaderBG_Left_Label;
var automated KFQuickPerkSelect QuickPerkSelect;
var automated GUIImage HeaderBG_Left;
var automated GUIImage HeaderBG_Center;
var automated GUIImage HeaderBG_Right;
var automated GUILabel CurrentPerkLabel;
var automated GUILabel TimeLeftLabel;
var automated GUILabel WaveLabel;
var automated GUILabel HeaderBG_Left_Label;
var automated KFQuickPerkSelect QuickPerkSelect;
var automated KFBuyMenuFilter BuyMenuFilter;
var automated GUIButton StoreTabButton;
var automated GUIButton PerkTabButton;
var automated GUIButton StoreTabButton;
var automated GUIButton PerkTabButton;
//The "Footer"
var automated GUIImage WeightBG;
var automated GUIImage WeightIcon;
var automated GUIImage WeightIconBG;
var automated KFWeightBar WeightBar;
var automated GUIImage WeightBG;
var automated GUIImage WeightIcon;
var automated GUIImage WeightIconBG;
var automated KFWeightBar WeightBar;
//const BUYLIST_CATS =7;
var() editconst noexport float SavedPitch;
var color RedColor;
var color GreenGreyColor;
var() UT2K4TabPanel ActivePanel;
var localized string CurrentPerk;
var localized string NoActivePerk;
var localized string TraderClose;
var localized string WaveString;
var localized string LvAbbrString;
var() editconst noexport float SavedPitch;
var color RedColor;
var color GreenGreyColor;
var() UT2K4TabPanel ActivePanel;
var localized string CurrentPerk;
var localized string NoActivePerk;
var localized string TraderClose;
var localized string WaveString;
var localized string LvAbbrString;
function InitComponent(GUIController MyC, GUIComponent MyO)
{
local int i;
super.InitComponent(MyC, MyO);
c_Tabs.BackgroundImage = none;
c_Tabs.BackgroundStyle = none;
InitTabs();
for ( i = 0; i < c_Tabs.TabStack.Length; i++ )
{
c_Tabs.TabStack[i].bVisible = false;
}
UpdateWeightBar();
local int i;
super.InitComponent(MyC, MyO);
c_Tabs.BackgroundImage = none;
c_Tabs.BackgroundStyle = none;
InitTabs();
for ( i = 0; i < c_Tabs.TabStack.Length; i++ )
{
c_Tabs.TabStack[i].bVisible = false;
}
UpdateWeightBar();
}
function InitTabs()
{
local int i;
for ( i = 0; i < PanelCaption.Length && i < PanelClass.Length && i < PanelHint.Length; i++ )
{
c_Tabs.AddTab(PanelCaption[i], PanelClass[i],, PanelHint[i]);
}
local int i;
for ( i = 0; i < PanelCaption.Length && i < PanelClass.Length && i < PanelHint.Length; i++ )
{
c_Tabs.AddTab(PanelCaption[i], PanelClass[i],, PanelHint[i]);
}
}
function UpdateWeightBar()
{
if ( KFHumanPawn(PlayerOwner().Pawn) != none )
{
WeightBar.MaxBoxes = KFHumanPawn(PlayerOwner().Pawn).MaxCarryWeight;
WeightBar.CurBoxes = KFHumanPawn(PlayerOwner().Pawn).CurrentWeight;
}
if ( KFHumanPawn(PlayerOwner().Pawn) != none )
{
WeightBar.MaxBoxes = KFHumanPawn(PlayerOwner().Pawn).MaxCarryWeight;
WeightBar.CurBoxes = KFHumanPawn(PlayerOwner().Pawn).CurrentWeight;
}
}
event Opened(GUIComponent Sender)
{
local rotator PlayerRot;
super.Opened(Sender);
c_Tabs.ActivateTabByName(PanelCaption[0], true);
// Tell the controller that he is on a shopping spree
local rotator PlayerRot;
super.Opened(Sender);
c_Tabs.ActivateTabByName(PanelCaption[0], true);
// Tell the controller that he is on a shopping spree
if ( KFPlayerController(PlayerOwner()) != none )
{
{
KFPlayerController(PlayerOwner()).bShopping = true;
}
if ( KFWeapon(KFHumanPawn(PlayerOwner().Pawn).Weapon).bAimingRifle )
{
KFWeapon(KFHumanPawn(PlayerOwner().Pawn).Weapon).IronSightZoomOut();
}
// Set camera's pitch to zero when menu initialised (otherwise spinny weap goes kooky)
PlayerRot = PlayerOwner().Rotation;
SavedPitch = PlayerRot.Pitch;
PlayerRot.Yaw = PlayerRot.Yaw % 65536;
PlayerRot.Pitch = 0;
PlayerRot.Roll = 0;
PlayerOwner().SetRotation(PlayerRot);
SetTimer(0.05f, true);
{
KFWeapon(KFHumanPawn(PlayerOwner().Pawn).Weapon).IronSightZoomOut();
}
// Set camera's pitch to zero when menu initialised (otherwise spinny weap goes kooky)
PlayerRot = PlayerOwner().Rotation;
SavedPitch = PlayerRot.Pitch;
PlayerRot.Yaw = PlayerRot.Yaw % 65536;
PlayerRot.Pitch = 0;
PlayerRot.Roll = 0;
PlayerOwner().SetRotation(PlayerRot);
SetTimer(0.05f, true);
}
function Timer()
{
UpdateHeader();
UpdateWeightBar();
UpdateHeader();
UpdateWeightBar();
}
function InternalOnClose(optional bool bCanceled)
{
@ -94,81 +94,81 @@ function InternalOnClose(optional bool bCanceled)
}
function UpdateHeader()
{
local int TimeLeftMin, TimeLeftSec;
local string TimeString;
if ( KFPlayerController(PlayerOwner()) == none || PlayerOwner().PlayerReplicationInfo == none ||
PlayerOwner().GameReplicationInfo == none )
{
return;
}
// Current Perk
if ( KFPlayerController(PlayerOwner()).SelectedVeterancy != none )
local int TimeLeftMin, TimeLeftSec;
local string TimeString;
if ( KFPlayerController(PlayerOwner()) == none || PlayerOwner().PlayerReplicationInfo == none ||
PlayerOwner().GameReplicationInfo == none )
{
CurrentPerkLabel.Caption = CurrentPerk$":" @ KFPlayerController(PlayerOwner()).SelectedVeterancy.default.VeterancyName @ LvAbbrString$KFPlayerReplicationInfo(PlayerOwner().PlayerReplicationInfo).ClientVeteranSkillLevel;
}
return;
}
// Current Perk
if ( KFPlayerController(PlayerOwner()).SelectedVeterancy != none )
{
CurrentPerkLabel.Caption = CurrentPerk$":" @ KFPlayerController(PlayerOwner()).SelectedVeterancy.default.VeterancyName @ LvAbbrString$KFPlayerReplicationInfo(PlayerOwner().PlayerReplicationInfo).ClientVeteranSkillLevel;
}
else
{
CurrentPerkLabel.Caption = CurrentPerk$":" @ NoActivePerk;
}
// Trader time left
TimeLeftMin = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave / 60;
TimeLeftSec = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave % 60;
if ( TimeLeftMin < 1 )
{
TimeString = "00:";
}
else
{
TimeString = "0" $ TimeLeftMin $ ":";
}
if ( TimeLeftSec >= 10 )
{
TimeString = TimeString $ TimeLeftSec;
}
else
{
TimeString = TimeString $ "0" $ TimeLeftSec;
}
TimeLeftLabel.Caption = TraderClose @ TimeString;
if ( KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave < 10 )
{
TimeLeftLabel.TextColor = RedColor;
}
else
{
TimeLeftLabel.TextColor = GreenGreyColor;
}
// Wave Counter
WaveLabel.Caption = WaveString$":" @ (KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).WaveNumber + 1)$"/"$KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).FinalWave;
{
CurrentPerkLabel.Caption = CurrentPerk$":" @ NoActivePerk;
}
// Trader time left
TimeLeftMin = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave / 60;
TimeLeftSec = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave % 60;
if ( TimeLeftMin < 1 )
{
TimeString = "00:";
}
else
{
TimeString = "0" $ TimeLeftMin $ ":";
}
if ( TimeLeftSec >= 10 )
{
TimeString = TimeString $ TimeLeftSec;
}
else
{
TimeString = TimeString $ "0" $ TimeLeftSec;
}
TimeLeftLabel.Caption = TraderClose @ TimeString;
if ( KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave < 10 )
{
TimeLeftLabel.TextColor = RedColor;
}
else
{
TimeLeftLabel.TextColor = GreenGreyColor;
}
// Wave Counter
WaveLabel.Caption = WaveString$":" @ (KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).WaveNumber + 1)$"/"$KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).FinalWave;
}
function KFBuyMenuClosed(optional bool bCanceled)
{
local rotator NewRot;
// Reset player
NewRot = PlayerOwner().Rotation;
NewRot.Pitch = SavedPitch;
PlayerOwner().SetRotation(NewRot);
Super.OnClose(bCanceled);
if ( KFPlayerController(PlayerOwner()) != none )
{
local rotator NewRot;
// Reset player
NewRot = PlayerOwner().Rotation;
NewRot.Pitch = SavedPitch;
PlayerOwner().SetRotation(NewRot);
Super.OnClose(bCanceled);
if ( KFPlayerController(PlayerOwner()) != none )
{
KFPlayerController(PlayerOwner()).bShopping = false;
}
}
function CloseSale(bool savePurchases)
{
Controller.CloseMenu(!savePurchases);
Controller.CloseMenu(!savePurchases);
}
function bool ButtonClicked(GUIComponent Sender)
{
if ( Sender == PerkTabButton )
if ( Sender == PerkTabButton )
{
HandleParameters(PanelCaption[1], "OhHi!");
}
if ( Sender == StoreTabButton )
HandleParameters(PanelCaption[1], "OhHi!");
}
if ( Sender == StoreTabButton )
{
HandleParameters(PanelCaption[0], "OhHi!");
}
return true;
HandleParameters(PanelCaption[0], "OhHi!");
}
return true;
}
defaultproperties
{

View File

@ -1,23 +1,437 @@
class NiceLobbyFooter extends ScrnLobbyFooter;
// base class, not vanilla
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 (PlayerOwner().GameReplicationInfo != none)
{
// disable view map if its not a lobby state
if (!PlayerOwner().GameReplicationInfo.bMatchHasBegun)
b_ViewMap.EnableMe();
else
b_ViewMap.DisableMe();
}
// ready-unready text switch
if (PlayerOwner().PlayerReplicationInfo != none && PlayerOwner().PlayerReplicationInfo.bReadyToPlay)
b_Ready.Caption = UnreadyString;
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
{
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)
{
if (Sender == b_Perks){
PlayerOwner().ClientOpenMenu(string(Class'NicePack.NiceInvasionLoginMenu'), false);
return false;
}
else if(Sender == b_ViewMap){
if(KF_StoryGRI(PlayerOwner().Level.GRI) == none){
LobbyMenu(PageOwner).bAllowClose = true;
PlayerOwner().ClientCloseMenu(true, false);
LobbyMenu(PageOwner).bAllowClose = false;
}
}
else if(Sender == b_Ready){
return super(LobbyFooter).OnFooterClick(Sender); // bypass serverperks
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
return super.OnFooterClick(Sender);
{
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
{
}
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
}

View File

@ -182,21 +182,32 @@ simulated function HandleNiceHealingMechanicsAndSkills
healed.bZedTimeInvincible = true;
}
}
simulated function RemovePoisonAndBleed(NiceHumanPawn healed){
simulated function RemovePoisonAndBleed(NiceHumanPawn healed)
{
local Inventory I;
local MeanReplicationInfo MRI;
// log spam fix
if (healed == none)
return;
// No bleeding
MRI = class'MeanReplicationInfo'.static.
findSZri(healed.PlayerReplicationInfo);
if(MRI != none)
if (MRI != none)
MRI.stopBleeding();
// No poison
if(healed.inventory == none) return;
for(I = healed.inventory; I != none; I = I.inventory){
if(MeanPoisonInventory(I) != none)
if (healed.inventory == none)
return;
for (I = healed.inventory; I != none; I = I.inventory)
{
if (MeanPoisonInventory(I) != none)
I.Destroy();
}
}
// Tells server to heal given human pawn.
simulated function ServerHealTarget(NiceHumanPawn healed, float charPotency,
Pawn instigator){

View File

@ -5,7 +5,7 @@ static function UpdateWeight(NicePlayerController nicePlayer){
local NiceHumanPawn nicePawn;
if(nicePawn == none || nicePawn.KFPRI == none) return;
nicePawn.maxCarryWeight = nicePawn.default.maxCarryWeight;
if(nicePawn.KFPRI.clientVeteranSkill != none)
if(nicePawn.KFPRI.clientVeteranSkill != none)
nicePawn.maxCarryWeight += nicePawn.KFPRI.clientVeteranSkill.static.AddCarryMaxWeight(nicePawn.KFPRI);
}
function static SkillSelected(NicePlayerController nicePlayer){

View File

@ -50,24 +50,35 @@ static function bool HasSkill(NicePlayerController nicePlayer, class<NiceSkill>
return true;
return false;
}
static function bool SomeoneHasSkill(NicePlayerController player, class<NiceSkill> skill){
static function bool SomeoneHasSkill(NicePlayerController player, class<NiceSkill> skill)
{
local int i;
local Controller P;
local NicePlayerController nicePlayer;
if(player == none)
if (player == none)
return false;
if(player.Pawn.Role == ROLE_Authority)
for(P = player.Level.ControllerList; P != none; P = P.nextController){
// added pawn check coz of log spam
if (player.Pawn != none && player.Pawn.Role == ROLE_Authority)
{
for(P = player.Level.ControllerList; P != none; P = P.nextController)
{
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)
return true;
}
else for(i = 0;i < player.broadcastedSkills.Length;i ++)
if(player.broadcastedSkills[i] == skill)
}
}
else
{
for (i = 0;i < player.broadcastedSkills.Length;i ++)
if (player.broadcastedSkills[i] == skill)
return true;
}
return false;
}
// Checks if player will automatically chose given skill at the next opportunity
static function bool IsSkillPending(NicePlayerController nicePlayer, class<NiceSkill> skill){
local int i;

View File

@ -1,11 +1,11 @@
class NiceDamTypePipeBomb extends NiceWeaponDamageType;
static function GetHitEffects(out class<xEmitter> HitEffects[4], int VictimHealth)
{
HitEffects[0] = class'HitSmoke';
if(VictimHealth <= 0)
HitEffects[1] = class'KFHitFlame';
else if (FRand() < 0.8)
HitEffects[1] = class'KFHitFlame';
HitEffects[0] = class'HitSmoke';
if(VictimHealth <= 0)
HitEffects[1] = class'KFHitFlame';
else if (FRand() < 0.8)
HitEffects[1] = class'KFHitFlame';
}
defaultproperties
{

View File

@ -2,22 +2,22 @@
class NiceCryoNadeCloud extends Emitter;
var bool bFlashed;
simulated function PostBeginPlay(){
super.PostBeginPlay();
NadeLight();
super.PostBeginPlay();
NadeLight();
}
simulated function NadeLight(){
if(instigator == none) return;
if(Level.bDropDetail) return;
if( (Level.TimeSeconds - LastRenderTime < 0.2)
if( (Level.TimeSeconds - LastRenderTime < 0.2)
|| (PlayerController(instigator.controller) != none)){
bDynamicLight = true;
SetTimer(0.25, false);
}
else
bDynamicLight = true;
SetTimer(0.25, false);
}
else
Timer();
}
simulated function Timer(){
bDynamicLight = false;
bDynamicLight = false;
}
defaultproperties
{

View File

@ -42,10 +42,11 @@ defaultproperties
FireCrouchAltAnims(1)="CHFire_M14"
FireCrouchAltAnims(2)="CHFire_M14"
FireCrouchAltAnims(3)="CHFire_M14"
HitAnims(0)="HitF_M14"
HitAnims(1)="HitB_M14"
HitAnims(2)="HitL_M14"
HitAnims(3)="HitR_M14"
// was "HitF_M14" and was log spamming like hell
HitAnims(0)="HitR_M14_EBR"
HitAnims(1)="HitR_M14_EBR"
HitAnims(2)="HitR_M14_EBR"
HitAnims(3)="HitR_M14_EBR"
PostFireBlendStandAnim="Blend_M14"
PostFireBlendCrouchAnim="CHBlend_M14"
MeshRef="KF_Weapons3rd2_Trip.M14_EBR_3rd"

View File

@ -23,12 +23,19 @@ simulated function Tick(float DeltaTime) {
}
}
}
function Touch(Actor Other) {
function Touch(Actor Other)
{
if (Other == none)
return;
super.Touch(Other);
if (Other.IsA('ShotgunBullet')) {
if (Other.IsA('ShotgunBullet'))
{
ShotgunBullet(Other).Damage = 0;
}
}
function RangedAttack(Actor A) {
local int LastFireTime;
if ( bShotAnim )

View File

@ -1,46 +1,12 @@
class MeanZombieHusk extends NiceZombieHusk;
#exec OBJ LOAD FILE=NicePackT.utx
var int consecutiveShots, totalShots, maxNormalShots;
function DoStun(optional Pawn instigatedBy, optional Vector hitLocation, optional Vector momentum, optional class<NiceWeaponDamageType> damageType, optional float headshotLevel, optional KFPlayerReplicationInfo KFPRI){
super.DoStun(instigatedBy, hitLocation, momentum, damageType, headshotLevel, KFPRI);
totalShots = maxNormalShots;
}
function SpawnTwoShots() {
local vector X,Y,Z, FireStart;
local rotator FireRotation;
local KFMonsterController KFMonstControl;
if(Controller != none && KFDoorMover(Controller.Target) != none){
Controller.Target.TakeDamage(22, Self, Location, vect(0,0,0), Class'DamTypeVomit');
return;
}
GetAxes(Rotation,X,Y,Z);
FireStart = GetBoneCoords('Barrel').Origin;
if (!SavedFireProperties.bInitialized){
SavedFireProperties.AmmoClass = Class'SkaarjAmmo';
SavedFireProperties.ProjectileClass = HuskFireProjClass;
SavedFireProperties.WarnTargetPct = 1;
SavedFireProperties.MaxRange = 65535;
SavedFireProperties.bTossed = False;
SavedFireProperties.bTrySplash = true;
SavedFireProperties.bLeadTarget = True;
SavedFireProperties.bInstantHit = False;
SavedFireProperties.bInitialized = True;
}
// Turn off extra collision before spawning vomit, otherwise spawn fails
ToggleAuxCollision(false);
if(Controller != none)
FireRotation = Controller.AdjustAim(SavedFireProperties, FireStart, 600);
foreach DynamicActors(class'KFMonsterController', KFMonstControl){
if(KFMonstControl != controller){
if(PointDistToLine(KFMonstControl.Pawn.Location, vector(FireRotation), FireStart) < 75){
KFMonstControl.GetOutOfTheWayOfShot(vector(FireRotation),FireStart);
}
}
}
Spawn(HuskFireProjClass, Self,, FireStart, FireRotation);
// Turn extra collision back on
ToggleAuxCollision(true);
}
function RangedAttack(Actor A) {
local int LastFireTime;
if ( bShotAnim )

View File

@ -77,13 +77,14 @@ simulated function CloakStalker()
SetOverlayMaterial(Material'KFX.FBDecloakShader', 0.25, true);
}
}
simulated function UnCloakStalker()
{
if( bZapped )
if (bZapped)
{
return;
}
if( !bCrispified )
if (!bCrispified)
{
LastUncloakTime = Level.TimeSeconds;
@ -92,8 +93,9 @@ simulated function UnCloakStalker()
bUnlit = false;
// 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 &&
PlayerController(Controller.Enemy.Controller)!=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).Speech('AUTO', 17, "");
KFGameType(Level.Game).bDidStalkerInvisibleMessage = true;
@ -115,6 +117,7 @@ simulated function UnCloakStalker()
}
}
}
simulated function SetZappedBehavior()
{
super(NiceMonster).SetZappedBehavior();
@ -173,25 +176,34 @@ simulated function int AttackAndMoveDoAnimAction( name AnimName ) {
}
return super.DoAnimAction( AnimName );
}
function bool MeleeDamageTarget(int hitdamage, vector pushdir) {
function bool MeleeDamageTarget(int hitdamage, vector pushdir)
{
local bool result;
local float effectStrenght;
local NiceHumanPawn targetPawn;
result = Super(NiceMonster).MeleeDamageTarget(hitdamage, pushdir);
targetPawn = NiceHumanPawn(Controller.Target);
if(result && targetPawn != none){
if(targetPawn.ShieldStrength > 100)
result = super(NiceMonster).MeleeDamageTarget(hitdamage, pushdir);
// if true means we checked ctlr and ctrl.target != none
if (result)
targetPawn = NiceHumanPawn(Controller.Target);
if (result && targetPawn != none)
{
if (targetPawn.ShieldStrength > 100)
return result;
else if(targetPawn.ShieldStrength < 0)
else if (targetPawn.ShieldStrength < 0)
effectStrenght = 1.0;
else
effectStrenght = (100 - targetPawn.ShieldStrength) * 0.01;
class'MeanReplicationInfo'.static
.findSZri(targetPawn.PlayerReplicationInfo)
.setBleeding(Self, effectStrenght);
}
return result;
}
function RemoveHead()
{
Super(NiceMonster).RemoveHead();

View File

@ -1,5 +1,5 @@
class NiceDamTypePoundCrushed extends NiceZedMeleeDamageType
abstract;
abstract;
defaultproperties
{
DeathString="%o was pounded by %k."

View File

@ -232,6 +232,7 @@ function ClawDamageTarget()
PlaySound(MeleeAttackHitSound, SLOT_Interact, 1.25);
}
}
function bool ClawDamageSingleTarget(float UsedMeleeDamage, Actor ThisTarget)
{
local Pawn HumanTarget;
@ -239,6 +240,11 @@ function bool ClawDamageSingleTarget(float UsedMeleeDamage, Actor ThisTarget)
local bool bHitSomeone;
local float EnemyAngle;
local vector PushForceVar;
// fix log spam
if (Controller == none || ThisTarget == none)
return false;
EnemyAngle = Normal(ThisTarget.Location - Location) dot vector(Rotation);
if (EnemyAngle > 0)
{
@ -272,6 +278,7 @@ function bool ClawDamageSingleTarget(float UsedMeleeDamage, Actor ThisTarget)
}
return bHitSomeone;
}
function StartCharging()
{
// How many times should we hit before we cool down?

View File

@ -156,16 +156,31 @@ defaultproperties
WalkAnims(1)="ZombieScuttleB"
WalkAnims(2)="ZombieScuttleL"
WalkAnims(3)="ZombieScuttleR"
AirAnims(0)="ZombieSpring"
AirAnims(1)="ZombieSpring"
AirAnims(2)="ZombieSpring"
AirAnims(3)="ZombieSpring"
// steves dont have "jump" animation
// https://github.com/poosh/KF-ScrnZedPack/blob/master/Classes/ZedBaseCrawler.uc
AirAnims(0)="ZombieLeapIdle"
AirAnims(1)="ZombieLeapIdle"
AirAnims(2)="ZombieLeapIdle"
AirAnims(3)="ZombieLeapIdle"
TakeoffAnims(0)="ZombieSpring"
TakeoffAnims(1)="ZombieSpring"
TakeoffAnims(2)="ZombieSpring"
TakeoffAnims(3)="ZombieSpring"
AirStillAnim="ZombieSpring"
TakeoffStillAnim="ZombieLeapIdle"
LandAnims(0)="Landed"
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"
IdleWeaponAnim="ZombieLeapIdle"
IdleRestAnim="ZombieLeapIdle"

View File

@ -445,6 +445,32 @@ static simulated function PreCacheMaterials(LevelInfo myLevel)
myLevel.AddPrecacheMaterial(Texture'KF_Specimens_Trip_T.siren_hair');
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
{
screamTimings(0)=0.420000

View File

@ -115,13 +115,14 @@ simulated function CloakStalker()
SetOverlayMaterial(Material'KFX.FBDecloakShader', 0.25, true);
}
}
simulated function UnCloakStalker()
{
if( bZapped )
if (bZapped)
{
return;
}
if( !bCrispified )
if (!bCrispified)
{
LastUncloakTime = Level.TimeSeconds;
@ -130,8 +131,9 @@ simulated function UnCloakStalker()
bUnlit = false;
// 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 &&
PlayerController(Controller.Enemy.Controller)!=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).Speech('AUTO', 17, "");
KFGameType(Level.Game).bDidStalkerInvisibleMessage = true;
@ -153,6 +155,7 @@ simulated function UnCloakStalker()
}
}
}
// Set the zed to the zapped behavior
simulated function SetZappedBehavior()
{

View File

@ -536,16 +536,23 @@ simulated function NonRelevantSpeedupTick(float deltaTime){
SetGroundSpeed(GetOriginalGroundSpeed());
}
}
// Kill zed if it has been bleeding long enough
simulated function BleedOutTick(float deltaTick){
if(Role < ROLE_Authority || !bDecapitated) return;
if(BleedOutTime <= 0 || Level.TimeSeconds < BleedOutTime) return;
if(LastDamagedBy != none)
Died(LastDamagedBy.Controller, class'DamTypeBleedOut', Location);
else
Died(none, class'DamTypeBleedOut', Location);
BleedOutTime = 0;
simulated function BleedOutTick(float deltaTick)
{
if (Role < ROLE_Authority || !bDecapitated)
return;
if (BleedOutTime <= 0 || Level.TimeSeconds < BleedOutTime)
return;
if (LastDamagedBy != none)
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
Died(controller, class'DamTypeBleedOut', Location);
BleedOutTime = 0;
}
// FX-stuff TWI did in the tick, unchanged
simulated function TWIFXTick(float deltaTime){
if(Level.netMode == NM_DedicatedServer) return;
@ -1077,19 +1084,27 @@ function DealBodyDamage(int damage,
damageType, headshotLevel);
MakeNoise(1.0);
}
function Died( Controller killer,
class<DamageType> damageType,
vector HitLocation){
local bool bHasManiac;
local NiceHumanPawn nicePawn;
bHasManiac = class'NiceVeterancyTypes'.static.
HasSkill(NicePlayerController(killer), class'NiceSkillDemoManiac');
nicePawn = NiceHumanPawn(killer.pawn);
if(bHasManiac && nicePawn != none)
nicePawn.maniacTimeout =
class'NiceSkillDemoManiac'.default.reloadBoostTime;
super.Died(killer, damageType, HitLocation);
vector HitLocation)
{
local bool bHasManiac;
local NiceHumanPawn nicePawn;
if (killer != none || (Controller != none && killer != Controller))
{
bHasManiac = class'NiceVeterancyTypes'.static.
HasSkill(NicePlayerController(killer), class'NiceSkillDemoManiac');
nicePawn = NiceHumanPawn(killer.pawn);
if (bHasManiac && nicePawn != none)
nicePawn.maniacTimeout =
class'NiceSkillDemoManiac'.default.reloadBoostTime;
}
super.Died(killer, damageType, HitLocation);
}
simulated function SetTearOffMomemtum(vector NewMomentum){
TearOffMomentum = NewMomentum;
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
{
stunDurationMultiplier=0.5

View File

@ -16,8 +16,8 @@
class NiceMonsterController extends KFMonsterController;
// Just reset threat assesment flag, since it's not used in NicePack
function PostBeginPlay(){
super.PostBeginPlay();
bUseThreatAssessment = true;
super.PostBeginPlay();
bUseThreatAssessment = true;
}
event bool NotifyBump(Actor other){
local Pawn otherPawn;