This commit is contained in:
Anton Tarasenko 2023-01-22 17:33:24 +07:00
commit 4f4455f9b1
672 changed files with 3834 additions and 2538 deletions

View file

@ -1,14 +1,17 @@
class NiceIceChunkEmitter extends Emitter;
var() array<Sound> ImpactSounds;
simulated function PostBeginPlay(){
if(ImpactSounds.Length > 0)
PlaySound(ImpactSounds[Rand(ImpactSounds.Length)]);
}
// NICETODO: change linksfrom HTeac_A to NicePackSM (and change that file)
defaultproperties
{
ImpactSounds(0)=Sound'KFWeaponSound.bullethitglass'
ImpactSounds(1)=Sound'KFWeaponSound.bullethitglass2'
Begin Object Class=MeshEmitter Name=MeshEmitter0
StaticMesh=StaticMesh'HTec_A.IceChunk1'
UseCollision=True
@ -29,7 +32,7 @@ defaultproperties
InitialParticlesPerSecond=10000.000000
StartVelocityRange=(X=(Min=-75.000000,Max=75.000000),Y=(Min=-75.000000,Max=75.000000),Z=(Min=-100.000000,Max=300.000000))
End Object
Emitters(0)=MeshEmitter'NicePack.NiceIceChunkEmitter.MeshEmitter0'
Emitters(0)=MeshEmitter0
Begin Object Class=MeshEmitter Name=MeshEmitter2
StaticMesh=StaticMesh'HTec_A.IceChunk2'
@ -52,7 +55,7 @@ defaultproperties
InitialParticlesPerSecond=10000.000000
StartVelocityRange=(X=(Min=-150.000000,Max=150.000000),Y=(Min=-150.000000,Max=150.000000),Z=(Min=-100.000000,Max=500.000000))
End Object
Emitters(1)=MeshEmitter'NicePack.NiceIceChunkEmitter.MeshEmitter2'
Emitters(1)=MeshEmitter2
Begin Object Class=MeshEmitter Name=MeshEmitter3
StaticMesh=StaticMesh'HTec_A.IceChunk3'
@ -75,7 +78,7 @@ defaultproperties
InitialParticlesPerSecond=10000.000000
StartVelocityRange=(X=(Min=-200.000000,Max=200.000000),Y=(Min=-200.000000,Max=200.000000),Z=(Min=-100.000000,Max=500.000000))
End Object
Emitters(2)=MeshEmitter'NicePack.NiceIceChunkEmitter.MeshEmitter3'
Emitters(2)=MeshEmitter3
Begin Object Class=SpriteEmitter Name=SpriteEmitter8
UseCollision=True
@ -103,7 +106,7 @@ defaultproperties
LifetimeRange=(Min=1.400000,Max=1.400000)
StartVelocityRange=(X=(Min=-200.000000,Max=200.000000),Y=(Min=-200.000000,Max=200.000000),Z=(Min=-300.000000,Max=350.000000))
End Object
Emitters(3)=SpriteEmitter'NicePack.NiceIceChunkEmitter.SpriteEmitter8'
Emitters(3)=SpriteEmitter8
Begin Object Class=SpriteEmitter Name=SpriteEmitter9
ProjectionNormal=(Y=1.000000,Z=0.000000)
@ -139,7 +142,7 @@ defaultproperties
LifetimeRange=(Min=0.750000,Max=0.750000)
StartVelocityRange=(X=(Min=-150.000000,Max=150.000000),Y=(Min=-150.000000,Max=150.000000),Z=(Min=-25.000000,Max=300.000000))
End Object
Emitters(4)=SpriteEmitter'NicePack.NiceIceChunkEmitter.SpriteEmitter9'
Emitters(4)=SpriteEmitter9
Begin Object Class=SpriteEmitter Name=SpriteEmitter10
ProjectionNormal=(Y=1.000000,Z=0.000000)
@ -171,7 +174,7 @@ defaultproperties
TextureVSubdivisions=8
LifetimeRange=(Min=0.350000,Max=0.350000)
End Object
Emitters(5)=SpriteEmitter'NicePack.NiceIceChunkEmitter.SpriteEmitter10'
Emitters(5)=SpriteEmitter10
Begin Object Class=SpriteEmitter Name=SpriteEmitter11
ProjectionNormal=(Y=1.000000,Z=0.000000)
@ -203,7 +206,7 @@ defaultproperties
TextureVSubdivisions=8
LifetimeRange=(Min=0.350000,Max=0.350000)
End Object
Emitters(6)=SpriteEmitter'NicePack.NiceIceChunkEmitter.SpriteEmitter11'
Emitters(6)=SpriteEmitter11
Begin Object Class=SpriteEmitter Name=SpriteEmitter12
ProjectionNormal=(Y=1.000000,Z=0.000000)
@ -236,7 +239,7 @@ defaultproperties
TextureVSubdivisions=8
LifetimeRange=(Min=0.350000,Max=0.350000)
End Object
Emitters(7)=SpriteEmitter'NicePack.NiceIceChunkEmitter.SpriteEmitter12'
Emitters(7)=SpriteEmitter12
Begin Object Class=SpriteEmitter Name=SpriteEmitter13
ProjectionNormal=(Y=1.000000,Z=0.000000)
@ -272,7 +275,7 @@ defaultproperties
LifetimeRange=(Min=0.750000,Max=0.750000)
StartVelocityRange=(X=(Min=-150.000000,Max=150.000000),Y=(Min=-150.000000,Max=150.000000),Z=(Min=-5.000000,Max=150.000000))
End Object
Emitters(8)=SpriteEmitter'NicePack.NiceIceChunkEmitter.SpriteEmitter13'
Emitters(8)=SpriteEmitter13
Begin Object Class=SpriteEmitter Name=SpriteEmitter14
ProjectionNormal=(Y=1.000000,Z=0.000000)
@ -308,7 +311,7 @@ defaultproperties
StartVelocityRange=(X=(Min=-350.000000,Max=350.000000),Y=(Min=-350.000000,Max=350.000000),Z=(Min=-5.000000,Max=50.000000))
VelocityLossRange=(X=(Min=3.000000,Max=3.000000),Y=(Min=3.000000,Max=3.000000))
End Object
Emitters(9)=SpriteEmitter'NicePack.NiceIceChunkEmitter.SpriteEmitter14'
Emitters(9)=SpriteEmitter14
Begin Object Class=SpriteEmitter Name=SpriteEmitter15
UseCollision=True
@ -336,7 +339,7 @@ defaultproperties
LifetimeRange=(Min=1.400000,Max=1.400000)
StartVelocityRange=(X=(Min=-200.000000,Max=200.000000),Y=(Min=-200.000000,Max=200.000000),Z=(Min=-300.000000,Max=350.000000))
End Object
Emitters(10)=SpriteEmitter'NicePack.NiceIceChunkEmitter.SpriteEmitter15'
Emitters(10)=SpriteEmitter15
AutoDestroy=True
bNoDelete=False

View file

@ -31,7 +31,7 @@ defaultproperties
StartVelocityRange=(X=(Min=-85.000000,Max=85.000000),Y=(Min=-85.000000,Max=85.000000))
StartVelocityRadialRange=(Min=-40.000000,Max=40.000000)
End Object
Emitters(0)=SpriteEmitter'NicePack.NiceNitroGroundEffect.SpriteEmitter0'
Emitters(0)=SpriteEmitter0
LifeSpan=5.000000
}

View file

@ -1,34 +1,37 @@
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 KFBuyMenuFilter BuyMenuFilter;
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;
//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;
// 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 KFBuyMenuFilter BuyMenuFilter;
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;
// 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;
function InitComponent(GUIController MyC, GUIComponent MyO)
{
local int i;
super.InitComponent(MyC, MyO);
c_Tabs.BackgroundImage = none;
c_Tabs.BackgroundStyle = none;
@ -39,14 +42,17 @@ function InitComponent(GUIController MyC, GUIComponent MyO)
}
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]);
}
}
function UpdateWeightBar()
{
if ( KFHumanPawn(PlayerOwner().Pawn) != none )
@ -55,9 +61,11 @@ function UpdateWeightBar()
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
@ -78,29 +86,37 @@ event Opened(GUIComponent Sender)
PlayerOwner().SetRotation(PlayerRot);
SetTimer(0.05f, true);
}
function Timer()
{
UpdateHeader();
UpdateWeightBar();
}
function InternalOnClose(optional bool bCanceled)
{
local rotator NewRot;
// Reset player
NewRot = PlayerOwner().Rotation;
NewRot.Pitch = SavedPitch;
PlayerOwner().SetRotation(NewRot);
Super.OnClose(bCanceled);
super.OnClose(bCanceled);
}
function UpdateHeader()
{
local int TimeLeftMin, TimeLeftSec;
local string TimeString;
local KFGameReplicationInfo KFGRI;
if ( KFPlayerController(PlayerOwner()) == none || PlayerOwner().PlayerReplicationInfo == none ||
PlayerOwner().GameReplicationInfo == none )
{
return;
}
KFGRI = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo);
// Current Perk
if ( KFPlayerController(PlayerOwner()).SelectedVeterancy != none )
{
@ -110,9 +126,10 @@ function UpdateHeader()
{
CurrentPerkLabel.Caption = CurrentPerk$":" @ NoActivePerk;
}
// Trader time left
TimeLeftMin = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave / 60;
TimeLeftSec = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave % 60;
TimeLeftMin = KFGRI.TimeToNextWave / 60;
TimeLeftSec = KFGRI.TimeToNextWave % 60;
if ( TimeLeftMin < 1 )
{
TimeString = "00:";
@ -121,6 +138,7 @@ function UpdateHeader()
{
TimeString = "0" $ TimeLeftMin $ ":";
}
if ( TimeLeftSec >= 10 )
{
TimeString = TimeString $ TimeLeftSec;
@ -129,8 +147,9 @@ function UpdateHeader()
{
TimeString = TimeString $ "0" $ TimeLeftSec;
}
TimeLeftLabel.Caption = TraderClose @ TimeString;
if ( KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave < 10 )
if ( KFGRI.TimeToNextWave < 10 )
{
TimeLeftLabel.TextColor = RedColor;
}
@ -138,26 +157,31 @@ function UpdateHeader()
{
TimeLeftLabel.TextColor = GreenGreyColor;
}
// Wave Counter
WaveLabel.Caption = WaveString$":" @ (KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).WaveNumber + 1)$"/"$KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).FinalWave;
WaveLabel.Caption = WaveString $ ":" @ (KFGRI.WaveNumber + 1) $ "/" $ KFGRI.FinalWave;
}
function KFBuyMenuClosed(optional bool bCanceled)
{
local rotator NewRot;
// Reset player
NewRot = PlayerOwner().Rotation;
NewRot.Pitch = SavedPitch;
PlayerOwner().SetRotation(NewRot);
Super.OnClose(bCanceled);
super.OnClose(bCanceled);
if ( KFPlayerController(PlayerOwner()) != none )
{
KFPlayerController(PlayerOwner()).bShopping = false;
}
}
function CloseSale(bool savePurchases)
{
Controller.CloseMenu(!savePurchases);
}
function bool ButtonClicked(GUIComponent Sender)
{
if ( Sender == PerkTabButton )
@ -170,6 +194,7 @@ function bool ButtonClicked(GUIComponent Sender)
}
return true;
}
defaultproperties
{
Begin Object Class=GUIImage Name=HBGLeft
@ -181,7 +206,7 @@ defaultproperties
WinWidth=0.332300
WinHeight=0.100000
End Object
HeaderBG_Left=GUIImage'NicePack.NiceGUIBuyMenu.HBGLeft'
HeaderBG_Left=HBGLeft
Begin Object Class=GUIImage Name=HBGCenter
Image=Texture'KF_InterfaceArt_tex.Menu.Thin_border'
@ -192,7 +217,7 @@ defaultproperties
WinWidth=0.331023
WinHeight=0.100000
End Object
HeaderBG_Center=GUIImage'NicePack.NiceGUIBuyMenu.HBGCenter'
HeaderBG_Center=HBGCenter
Begin Object Class=GUIImage Name=HBGRight
Image=Texture'KF_InterfaceArt_tex.Menu.Thin_border'
@ -203,7 +228,7 @@ defaultproperties
WinWidth=0.332000
WinHeight=0.100000
End Object
HeaderBG_Right=GUIImage'NicePack.NiceGUIBuyMenu.HBGRight'
HeaderBG_Right=HBGRight
Begin Object Class=GUILabel Name=Perk
TextAlign=TXTA_Center
@ -213,7 +238,7 @@ defaultproperties
WinWidth=0.329761
WinHeight=0.050000
End Object
CurrentPerkLabel=GUILabel'NicePack.NiceGUIBuyMenu.Perk'
CurrentPerkLabel=Perk
Begin Object Class=GUILabel Name=Time
Caption="Trader closes in 00:31"
@ -225,7 +250,7 @@ defaultproperties
WinWidth=0.330000
WinHeight=0.035000
End Object
TimeLeftLabel=GUILabel'NicePack.NiceGUIBuyMenu.Time'
TimeLeftLabel=Time
Begin Object Class=GUILabel Name=Wave
Caption="Wave: 7/10"
@ -236,7 +261,7 @@ defaultproperties
WinWidth=0.327071
WinHeight=0.035000
End Object
WaveLabel=GUILabel'NicePack.NiceGUIBuyMenu.Wave'
WaveLabel=Wave
Begin Object Class=GUILabel Name=HBGLL
Caption="Quick Perk Select"
@ -248,7 +273,7 @@ defaultproperties
WinWidth=0.329761
WinHeight=0.019524
End Object
HeaderBG_Left_Label=GUILabel'NicePack.NiceGUIBuyMenu.HBGLL'
HeaderBG_Left_Label=HBGLL
Begin Object Class=KFQuickPerkSelect Name=QS
WinTop=0.011906
@ -257,7 +282,7 @@ defaultproperties
WinHeight=0.082460
OnDraw=QS.MyOnDraw
End Object
QuickPerkSelect=KFQuickPerkSelect'NicePack.NiceGUIBuyMenu.QS'
QuickPerkSelect=QS
Begin Object Class=KFBuyMenuFilter Name=filter
WinTop=0.051000
@ -266,7 +291,7 @@ defaultproperties
WinHeight=0.082460
OnDraw=filter.MyOnDraw
End Object
BuyMenuFilter=KFBuyMenuFilter'NicePack.NiceGUIBuyMenu.filter'
BuyMenuFilter=filter
Begin Object Class=GUIButton Name=StoreTabB
Caption="Store"
@ -278,7 +303,7 @@ defaultproperties
OnClick=NiceGUIBuyMenu.ButtonClicked
OnKeyEvent=StoreTabB.InternalOnKeyEvent
End Object
StoreTabButton=GUIButton'NicePack.NiceGUIBuyMenu.StoreTabB'
StoreTabButton=StoreTabB
Begin Object Class=GUIButton Name=PerkTabB
Caption="Perk"
@ -290,7 +315,7 @@ defaultproperties
OnClick=NiceGUIBuyMenu.ButtonClicked
OnKeyEvent=PerkTabB.InternalOnKeyEvent
End Object
PerkTabButton=GUIButton'NicePack.NiceGUIBuyMenu.PerkTabB'
PerkTabButton=PerkTabB
Begin Object Class=GUIImage Name=Weight
Image=Texture'KF_InterfaceArt_tex.Menu.Thin_border'
@ -300,7 +325,7 @@ defaultproperties
WinWidth=0.663086
WinHeight=0.065828
End Object
WeightBG=GUIImage'NicePack.NiceGUIBuyMenu.Weight'
WeightBG=Weight
Begin Object Class=GUIImage Name=WeightIco
Image=Texture'KillingFloorHUD.HUD.Hud_Weight'
@ -311,7 +336,7 @@ defaultproperties
WinHeight=0.048992
RenderWeight=0.460000
End Object
WeightIcon=GUIImage'NicePack.NiceGUIBuyMenu.WeightIco'
WeightIcon=WeightIco
Begin Object Class=GUIImage Name=WeightIcoBG
Image=Texture'KF_InterfaceArt_tex.Menu.Perk_box_unselected'
@ -322,7 +347,7 @@ defaultproperties
WinHeight=0.054461
RenderWeight=0.450000
End Object
WeightIconBG=GUIImage'NicePack.NiceGUIBuyMenu.WeightIcoBG'
WeightIconBG=WeightIcoBG
Begin Object Class=KFWeightBar Name=WeightB
WinTop=0.945302
@ -331,7 +356,7 @@ defaultproperties
WinHeight=0.053896
OnDraw=WeightB.MyOnDraw
End Object
WeightBar=KFWeightBar'NicePack.NiceGUIBuyMenu.WeightB'
WeightBar=WeightB
RedColor=(R=255,A=255)
GreenGreyColor=(B=158,G=176,R=175,A=255)
@ -340,6 +365,7 @@ defaultproperties
TraderClose="Trader Closes in"
WaveString="Wave"
LvAbbrString="Lv"
Begin Object Class=GUITabControl Name=PageTabs
bDockPanels=True
TabHeight=0.025000
@ -354,7 +380,7 @@ defaultproperties
OnActivate=PageTabs.InternalOnActivate
OnChange=NiceGUIBuyMenu.InternalOnChange
End Object
c_Tabs=GUITabControl'NicePack.NiceGUIBuyMenu.PageTabs'
c_Tabs=PageTabs
Begin Object Class=BackgroundImage Name=PageBackground
Image=Texture'Engine.WhiteSquareTexture'
@ -362,7 +388,7 @@ defaultproperties
ImageStyle=ISTY_Tiled
RenderWeight=0.001000
End Object
i_Background=BackgroundImage'NicePack.NiceGUIBuyMenu.PageBackground'
i_Background=PageBackground
PanelClass(0)="KFGUI.KFTab_BuyMenu"
PanelClass(1)="KFGUI.KFTab_Perks"
@ -373,4 +399,4 @@ defaultproperties
bAllowedAsLast=True
OnClose=NiceGUIBuyMenu.KFBuyMenuClosed
WhiteColor=(B=255,G=255,R=255)
}
}

View file

@ -0,0 +1,13 @@
class NiceGUICheckBoxButton extends GUICheckBoxButton;
defaultproperties
{
CheckedOverlay(0)=Texture'KF_InterfaceArt_tex.Menu.Checkbox' // checked
CheckedOverlay(1)=Texture'KF_InterfaceArt_tex.Menu.checkbox_highlight' // checked, mouse over
CheckedOverlay(2)=Texture'KF_InterfaceArt_tex.Menu.checkbox_highlight' // checked, focused
CheckedOverlay(3)=Texture'KF_InterfaceArt_tex.Menu.checkbox_dark' // checked, clicked
CheckedOverlay(4)=Texture'KF_InterfaceArt_tex.Menu.checkbox_dark' // checked, disabled
ImageIndex=0
bAllOverlay=False
StyleName="CheckBox"
}

View file

@ -1,273 +1,216 @@
class NiceGUISettings extends Settings_Tabs;
//var automated GUIButton skillButtonA;
var array<string> ForceProjItems;
var automated moCheckBox ch_WeapManagement;
var automated moCheckBox ch_AltSwitches;
var automated moCheckBox ch_DispCounters;
var automated moCheckBox ch_DisWeapProgress;
var automated moCheckBox ch_ShowHLMessages;
var automated moCheckBox ch_CancelFire;
var automated moCheckBox ch_CancelSwitching;
var automated moCheckBox ch_CancelNades;
var automated moCheckBox ch_CancelAiming;
var automated moCheckBox ch_ReloadWontWork;
var automated GUISectionBackground bg_WEAP;
var automated GUISectionBackground bg_RELOAD;
function InitComponent(GUIController MyController, GUIComponent MyOwner){
class NiceGUISettings extends UT2K4TabPanel;
// GENERAL WEAPON SETTINGS
var automated GUISectionBackground bg_WEAP;
var automated moCheckBox ch_WeapManagement;
var automated moCheckBox ch_AltSwitches;
var automated moCheckBox ch_DispCounters;
var automated moCheckBox ch_DisWeapProgress;
var automated moCheckBox ch_ShowHLMessages;
// WEAPON RELOAD SETTINGS
var automated GUISectionBackground bg_RELOAD;
var automated moCheckBox ch_CancelFire;
var automated moCheckBox ch_CancelSwitching;
var automated moCheckBox ch_CancelNades;
var automated moCheckBox ch_CancelAiming;
var automated moCheckBox ch_ReloadWontWork;
// RANDOM SETTINGS
var automated GUISectionBackground bg_RANDOM;
var automated MoComboBox mo_ZedHPBars;
function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
super.InitComponent(MyController, MyOwner);
}
function InternalOnLoadINI(GUIComponent sender, string s){
mo_ZedHPBars.AddItem("Big Zeds");
mo_ZedHPBars.AddItem("All Zeds");
mo_ZedHPBars.AddItem("Disable");
// GENERAL WEAPON SETTINGS
bg_WEAP.ManageComponent(ch_WeapManagement);
bg_WEAP.ManageComponent(ch_AltSwitches);
bg_WEAP.ManageComponent(ch_DispCounters);
bg_WEAP.ManageComponent(ch_DisWeapProgress);
bg_WEAP.ManageComponent(ch_ShowHLMessages);
// WEAPON RELOAD SETTINGS
bg_RELOAD.ManageComponent(ch_CancelFire);
bg_RELOAD.ManageComponent(ch_CancelSwitching);
bg_RELOAD.ManageComponent(ch_CancelNades);
bg_RELOAD.ManageComponent(ch_CancelAiming);
bg_RELOAD.ManageComponent(ch_ReloadWontWork);
// RANDOM SETTINGS
bg_RANDOM.ManageComponent(mo_ZedHPBars);
}
function InternalOnLoadINI(GUIComponent sender, string s)
{
local NicePlayerController nicePlayer;
nicePlayer = NicePlayerController(PlayerOwner());
if(nicePlayer == none)
return;
switch(sender){
case ch_WeapManagement:
ch_WeapManagement.Checked(nicePlayer.bNiceWeaponManagement);
break;
case ch_AltSwitches:
ch_AltSwitches.Checked(nicePlayer.bFlagAltSwitchesModes);
break;
case ch_DispCounters:
ch_DispCounters.Checked(nicePlayer.bFlagDisplayCounters);
break;
case ch_DisWeapProgress:
ch_DisWeapProgress.Checked(nicePlayer.bFlagDisplayWeaponProgress);
break;
case ch_ShowHLMessages:
ch_ShowHLMessages.Checked(nicePlayer.bFlagShowHLMessages);
break;
case ch_CancelFire:
ch_CancelFire.Checked(nicePlayer.bRelCancelByFire);
break;
case ch_CancelSwitching:
ch_CancelSwitching.Checked(nicePlayer.bRelCancelBySwitching);
break;
case ch_CancelNades:
ch_CancelNades.Checked(nicePlayer.bRelCancelByNades);
break;
case ch_CancelAiming:
ch_CancelAiming.Checked(nicePlayer.bRelCancelByAiming);
break;
case ch_ReloadWontWork:
ch_ReloadWontWork.Checked(nicePlayer.bFlagUseServerReload);
break;
if (nicePlayer == none)
return;
switch(sender)
{
case ch_WeapManagement:
ch_WeapManagement.Checked(nicePlayer.bNiceWeaponManagement);
break;
case ch_AltSwitches:
ch_AltSwitches.Checked(nicePlayer.bFlagAltSwitchesModes);
break;
case ch_DispCounters:
ch_DispCounters.Checked(nicePlayer.bFlagDisplayCounters);
break;
case ch_DisWeapProgress:
ch_DisWeapProgress.Checked(nicePlayer.bFlagDisplayWeaponProgress);
break;
case ch_ShowHLMessages:
ch_ShowHLMessages.Checked(nicePlayer.bFlagShowHLMessages);
break;
case ch_CancelFire:
ch_CancelFire.Checked(nicePlayer.bRelCancelByFire);
break;
case ch_CancelSwitching:
ch_CancelSwitching.Checked(nicePlayer.bRelCancelBySwitching);
break;
case ch_CancelNades:
ch_CancelNades.Checked(nicePlayer.bRelCancelByNades);
break;
case ch_CancelAiming:
ch_CancelAiming.Checked(nicePlayer.bRelCancelByAiming);
break;
case ch_ReloadWontWork:
ch_ReloadWontWork.Checked(nicePlayer.bFlagUseServerReload);
break;
case mo_ZedHPBars:
mo_ZedHPBars.SetIndex(nicePlayer.ZedHPBarStyle);
break;
}
}
function InternalOnChange(GUIComponent Sender){
function InternalOnChange(GUIComponent Sender)
{
local NicePlayerController nicePlayer;
super.InternalOnChange(Sender);
nicePlayer = NicePlayerController(PlayerOwner());
if(nicePlayer == none)
return;
switch(sender){
case ch_WeapManagement:
nicePlayer.bNiceWeaponManagement = ch_WeapManagement.IsChecked();
break;
case ch_AltSwitches:
nicePlayer.ServerSetAltSwitchesModes(ch_AltSwitches.IsChecked());
break;
case ch_DispCounters:
nicePlayer.ServerSetDisplayCounters(ch_DispCounters.IsChecked());
break;
case ch_DisWeapProgress:
nicePlayer.ServerSetDisplayWeaponProgress(ch_DisWeapProgress.IsChecked());
break;
case ch_ShowHLMessages:
nicePlayer.ServerSetHLMessages(ch_ShowHLMessages.IsChecked());
break;
case ch_CancelFire:
nicePlayer.bRelCancelByFire = ch_CancelFire.IsChecked();
break;
case ch_CancelSwitching:
nicePlayer.bRelCancelBySwitching = ch_CancelSwitching.IsChecked();
break;
case ch_CancelNades:
nicePlayer.bRelCancelByNades = ch_CancelNades.IsChecked();
break;
case ch_CancelAiming:
nicePlayer.bRelCancelByAiming = ch_CancelAiming.IsChecked();
break;
case ch_ReloadWontWork:
nicePlayer.ServerSetUseServerReload(ch_ReloadWontWork.IsChecked());
break;
if (nicePlayer == none)
return;
switch(sender)
{
case ch_WeapManagement:
nicePlayer.bNiceWeaponManagement = ch_WeapManagement.IsChecked();
break;
case ch_AltSwitches:
nicePlayer.ServerSetAltSwitchesModes(ch_AltSwitches.IsChecked());
break;
case ch_DispCounters:
nicePlayer.ServerSetDisplayCounters(ch_DispCounters.IsChecked());
break;
case ch_DisWeapProgress:
nicePlayer.ServerSetDisplayWeaponProgress(ch_DisWeapProgress.IsChecked());
break;
case ch_ShowHLMessages:
nicePlayer.ServerSetHLMessages(ch_ShowHLMessages.IsChecked());
break;
case ch_CancelFire:
nicePlayer.bRelCancelByFire = ch_CancelFire.IsChecked();
break;
case ch_CancelSwitching:
nicePlayer.bRelCancelBySwitching = ch_CancelSwitching.IsChecked();
break;
case ch_CancelNades:
nicePlayer.bRelCancelByNades = ch_CancelNades.IsChecked();
break;
case ch_CancelAiming:
nicePlayer.bRelCancelByAiming = ch_CancelAiming.IsChecked();
break;
case ch_ReloadWontWork:
nicePlayer.ServerSetUseServerReload(ch_ReloadWontWork.IsChecked());
break;
case mo_ZedHPBars:
nicePlayer.ZedHPBarStyle = mo_ZedHPBars.GetIndex();
break;
}
nicePlayer.ClientSaveConfig();
}
// size = (x=0.0125, y=0.0) ; (w=1.0, h=0.865)
// tab order
defaultproperties
{
Begin Object Class=moCheckBox Name=WeaponManagement
CaptionWidth=0.955000
Caption="Nice weapon management"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=WeaponManagement.InternalOnCreateComponent
IniOption="@Internal"
Hint="If checked, NicePack will use it's own system to manage weapon switching"
WinTop=0.050000
WinLeft=0.012500
WinWidth=0.278000
TabOrder=4
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_WeapManagement=moCheckBox'NicePack.NiceGUISettings.WeaponManagement'
Begin Object Class=moCheckBox Name=AltSwitches
CaptionWidth=0.955000
Caption="Alt fire switches modes"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=AltSwitches.InternalOnCreateComponent
IniOption="@Internal"
Hint="Assault-rifle only; if enabled - alt fire button switches between fire modes, otherwise - acts as an alt fire"
WinTop=0.100000
WinLeft=0.012500
WinWidth=0.278000
TabOrder=6
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_AltSwitches=moCheckBox'NicePack.NiceGUISettings.AltSwitches'
Begin Object Class=moCheckBox Name=DispCounters
CaptionWidth=0.955000
Caption="Display counters"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=DispCounters.InternalOnCreateComponent
IniOption="@Internal"
Hint="Toggles display of the various counters used by skills"
WinTop=0.150000
WinLeft=0.012500
WinWidth=0.278000
TabOrder=7
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_DispCounters=moCheckBox'NicePack.NiceGUISettings.DispCounters'
Begin Object Class=moCheckBox Name=DispWeapProgress
CaptionWidth=0.955000
Caption="Display weapon progress"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=DispWeapProgress.InternalOnCreateComponent
IniOption="@Internal"
Hint="Displays weapon progress rate, however it's defined by a skill that's using this functionality"
WinTop=0.200000
WinLeft=0.012500
WinWidth=0.278000
TabOrder=8
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_DisWeapProgress=moCheckBox'NicePack.NiceGUISettings.DispWeapProgress'
Begin Object Class=moCheckBox Name=ShowHLMessages
CaptionWidth=0.955000
Caption="Show Hardcore Level messages"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=ShowHLMessages.InternalOnCreateComponent
IniOption="@Internal"
Hint="Enable to be notified each time Hardcore Level is changed"
WinTop=0.300000
WinLeft=0.012500
WinWidth=0.278000
TabOrder=9
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_ShowHLMessages=moCheckBox'NicePack.NiceGUISettings.ShowHLMessages'
Begin Object Class=moCheckBox Name=CancelFire
CaptionWidth=0.955000
Caption="Cancel reload by shooting"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=CancelFire.InternalOnCreateComponent
IniOption="@Internal"
Hint="If checked, you'll be able to cancel reload of converted weapons by shooting (when you have ammo)"
WinTop=0.050000
WinLeft=0.517500
WinWidth=0.287000
TabOrder=11
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_CancelFire=moCheckBox'NicePack.NiceGUISettings.CancelFire'
Begin Object Class=moCheckBox Name=CancelSwitching
CaptionWidth=0.955000
Caption="Cancel reload by switching weapons"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=CancelSwitching.InternalOnCreateComponent
IniOption="@Internal"
Hint="If checked, you'll be able to cancel reload of converted weapons by switching to different weapon"
WinTop=0.100000
WinLeft=0.517500
WinWidth=0.287000
TabOrder=12
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_CancelSwitching=moCheckBox'NicePack.NiceGUISettings.CancelSwitching'
Begin Object Class=moCheckBox Name=CancelNades
CaptionWidth=0.955000
Caption="Cancel reload by throwing grenades"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=CancelNades.InternalOnCreateComponent
IniOption="@Internal"
Hint="If checked, you'll be able to cancel reload of converted weapons by throwing a grenade"
WinTop=0.150000
WinLeft=0.517500
WinWidth=0.287000
TabOrder=13
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_CancelNades=moCheckBox'NicePack.NiceGUISettings.CancelNades'
Begin Object Class=moCheckBox Name=CancelAiming
CaptionWidth=0.955000
Caption="Cancel reload by aiming"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=CancelAiming.InternalOnCreateComponent
IniOption="@Internal"
Hint="If checked, you'll be able to cancel reload of converted weapons by going into iron sights (when you have ammo)"
WinTop=0.200000
WinLeft=0.517500
WinWidth=0.287000
TabOrder=14
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_CancelAiming=moCheckBox'NicePack.NiceGUISettings.CancelAiming'
Begin Object Class=moCheckBox Name=ServerReload
CaptionWidth=0.955000
Caption="My reload doesn't work"
ComponentClassName="ScrnBalanceSrv.ScrnGUICheckBoxButton"
OnCreateComponent=ServerReload.InternalOnCreateComponent
IniOption="@Internal"
Hint="Check this option ONLY in case converted weapons don't reload at all for you; this option should fix the problem, but then latency will affect both reload and active reload"
WinTop=0.250000
WinLeft=0.517500
WinWidth=0.287000
TabOrder=15
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_ReloadWontWork=moCheckBox'NicePack.NiceGUISettings.ServerReload'
// GENERAL WEAPON SETTINGS
Begin Object Class=GUISectionBackground Name=WEAPBG
Caption="General weapon settings"
WinTop=0.012500
WinWidth=0.495000
WinHeight=0.287500
RenderWeight=0.100100
OnPreDraw=WeaponsBG.InternalPreDraw
// OnPreDraw=WeaponsBG.InternalPreDraw
OnPreDraw=WEAPBG.InternalPreDraw
End Object
bg_WEAP=GUISectionBackground'NicePack.NiceGUISettings.WEAPBG'
bg_WEAP=WEAPBG
Begin Object Class=moCheckBox Name=WeaponManagement
Caption="Nice weapon management"
ComponentClassName="NicePack.NiceGUICheckBoxButton"
OnCreateComponent=WeaponManagement.InternalOnCreateComponent
IniOption="@Internal"
Hint="If checked, NicePack will use it's own system to manage weapon switching"
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_WeapManagement=WeaponManagement
Begin Object Class=moCheckBox Name=AltSwitches
Caption="Alt fire switches modes"
ComponentClassName="NicePack.NiceGUICheckBoxButton"
OnCreateComponent=AltSwitches.InternalOnCreateComponent
IniOption="@Internal"
Hint="Assault-rifle only; if enabled - alt fire button switches between fire modes, otherwise - acts as an alt fire"
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_AltSwitches=AltSwitches
Begin Object Class=moCheckBox Name=DispCounters
Caption="Display counters"
ComponentClassName="NicePack.NiceGUICheckBoxButton"
OnCreateComponent=DispCounters.InternalOnCreateComponent
IniOption="@Internal"
Hint="Toggles display of the various counters used by skills"
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_DispCounters=DispCounters
Begin Object Class=moCheckBox Name=DispWeapProgress
Caption="Display weapon progress"
ComponentClassName="NicePack.NiceGUICheckBoxButton"
OnCreateComponent=DispWeapProgress.InternalOnCreateComponent
IniOption="@Internal"
Hint="Displays weapon progress rate, however it's defined by a skill that's using this functionality"
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_DisWeapProgress=DispWeapProgress
Begin Object Class=moCheckBox Name=ShowHLMessages
Caption="Show Hardcore Level messages"
ComponentClassName="NicePack.NiceGUICheckBoxButton"
OnCreateComponent=ShowHLMessages.InternalOnCreateComponent
IniOption="@Internal"
Hint="Enable to be notified each time Hardcore Level is changed"
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_ShowHLMessages=ShowHLMessages
// WEAPON RELOAD SETTINGS
Begin Object Class=GUISectionBackground Name=RELOADBG
Caption="Weapon reload settings"
WinTop=0.012500
@ -275,7 +218,87 @@ defaultproperties
WinWidth=0.495000
WinHeight=0.287500
RenderWeight=0.100100
OnPreDraw=WeaponsBG.InternalPreDraw
// OnPreDraw=WeaponsBG.InternalPreDraw
OnPreDraw=RELOADBG.InternalPreDraw
End Object
bg_RELOAD=GUISectionBackground'NicePack.NiceGUISettings.RELOADBG'
}
bg_RELOAD=RELOADBG
Begin Object Class=moCheckBox Name=CancelFire
Caption="Cancel reload by shooting"
ComponentClassName="NicePack.NiceGUICheckBoxButton"
OnCreateComponent=CancelFire.InternalOnCreateComponent
IniOption="@Internal"
Hint="If checked, you'll be able to cancel reload of converted weapons by shooting (when you have ammo)"
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_CancelFire=CancelFire
Begin Object Class=moCheckBox Name=CancelSwitching
Caption="Cancel reload by switching weapons"
ComponentClassName="NicePack.NiceGUICheckBoxButton"
OnCreateComponent=CancelSwitching.InternalOnCreateComponent
IniOption="@Internal"
Hint="If checked, you'll be able to cancel reload of converted weapons by switching to different weapon"
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_CancelSwitching=CancelSwitching
Begin Object Class=moCheckBox Name=CancelNades
Caption="Cancel reload by throwing grenades"
ComponentClassName="NicePack.NiceGUICheckBoxButton"
OnCreateComponent=CancelNades.InternalOnCreateComponent
IniOption="@Internal"
Hint="If checked, you'll be able to cancel reload of converted weapons by throwing a grenade"
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_CancelNades=CancelNades
Begin Object Class=moCheckBox Name=CancelAiming
Caption="Cancel reload by aiming"
ComponentClassName="NicePack.NiceGUICheckBoxButton"
OnCreateComponent=CancelAiming.InternalOnCreateComponent
IniOption="@Internal"
Hint="If checked, you'll be able to cancel reload of converted weapons by going into iron sights (when you have ammo)"
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_CancelAiming=CancelAiming
Begin Object Class=moCheckBox Name=ServerReload
Caption="My reload doesn't work"
ComponentClassName="NicePack.NiceGUICheckBoxButton"
OnCreateComponent=ServerReload.InternalOnCreateComponent
IniOption="@Internal"
Hint="Check this option ONLY in case converted weapons don't reload at all for you; this option should fix the problem, but then latency will affect both reload and active reload"
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
ch_ReloadWontWork=ServerReload
// RANDOM SETTINGS
Begin Object Class=GUISectionBackground Name=randbg
Caption="Random settings"
WinTop=0.300000
WinWidth=0.495000
WinHeight=0.287500
WinLeft=0.505000
RenderWeight=0.100100
// OnPreDraw=WeaponsBG.InternalPreDraw
OnPreDraw=randbg.InternalPreDraw
End Object
bg_RANDOM=randbg
Begin Object class=moComboBox Name=zedhbarpmethod
bReadOnly=true
CaptionWidth=0.000000
Caption="Zed health bars"
Hint="Choose what health bars you want to see"
OnCreateComponent=zedhbarpmethod.InternalOnCreateComponent
OnChange=NiceGUISettings.InternalOnChange
OnLoadINI=NiceGUISettings.InternalOnLoadINI
End Object
mo_ZedHPBars=zedhbarpmethod
}

View file

@ -1,8 +1,10 @@
class NiceInteraction extends Interaction
dependson(NicePack)
dependson(NiceAbilityManager);
#exec OBJ LOAD FILE=KillingFloorHUD.utx
#exec OBJ LOAD FILE=KillingFloor2HUD.utx
var NicePack NicePackMutator;
var Material bleedIcon, poisonIcon;
var Texture greenBar, redBar;
@ -12,141 +14,271 @@ var float size;
var float InventoryBoxWidth;
var float InventoryBoxHeight;
var float BorderSize;
event NotifyLevelChange(){
Master.RemoveInteraction(self);
// weapons list for `MultiTasker` skill
struct WeaponProgressDisplay
{
var class<NiceWeapon> weapClass;
var float progress;
var bool bShowCounter;
var int counter;
};
var array<WeaponProgressDisplay> niceWeapProgressSet;
event NotifyLevelChange()
{
Master.RemoveInteraction(self);
}
function RegisterMutator(NicePack activePack){
NicePackMutator = activePack;
function RegisterMutator(NicePack activePack)
{
NicePackMutator = activePack;
}
function bool isPoisoned(ScrnHumanPawn pwn){
final private function bool bIsPoisoned(NiceHumanPawn pwn)
{
local Inventory I;
if (pwn.Inventory != none)
{
for (I = pwn.Inventory; I != none; I = I.Inventory)
{
if (I.IsA('MeanPoisonInventory'))
return true;
}
}
return false;
}
final private function bool bIsBleeding(NiceHumanPawn pwn)
{
local Inventory I;
if (pwn.Inventory != none)
{
for (I = pwn.Inventory; I != none; I = I.Inventory)
{
if (I.IsA('MeanBleedInventory'))
return true;
}
}
return false;
}
final private function UpdateNiceWeapProgressSet(NiceHumanPawn pwn)
{
local Inventory I;
if(pwn.Inventory != none)
for(I = pwn.Inventory; I != none; I = I.Inventory)
if(I != none && MeanPoisonInventory(I) != none)
return true;
return false;
local NiceWeapon niceWeap;
local WeaponProgressDisplay newProgress;
// clean this!
niceWeapProgressSet.Length = 0;
if (pwn.Inventory != none)
{
for (I = pwn.Inventory; I != none; I = I.Inventory)
{
niceWeap = NiceWeapon(I);
if (niceWeap != none && niceWeap != pwn.weapon && !niceWeap.IsMagazineFull())
{
newProgress.weapClass = niceWeap.class;
newProgress.progress = niceWeap.holsteredCompletition;
newProgress.bShowCounter = true;
newProgress.counter = niceWeap.GetMagazineAmmo();
niceWeapProgressSet[niceWeapProgressSet.Length] = newProgress;
}
}
}
}
function PostRender(Canvas C){
function PostRender(Canvas C)
{
local int i;
local NicePack niceMutator;
local NiceHumanPawn nicePawn;
local class<NiceVeterancyTypes> niceVet;
local MeanReplicationInfo szRI;
local NiceWeapon niceWeap;
local NicePlayerController nicePlayer;
local ScrnHUD scrnHUDInstance;
// TODO maybe use scrnhud?
// local HUDKillingFloor kfHud;
local Texture barTexture;
local int x, y, center, barWidth, offset;
local int missesWidth, missesHeight, missesSpace;
local int missesX, missesY;
if(C == none) return;
if(C.ViewPort == none) return;
if(C.ViewPort.Actor == none) return;
if(C.ViewPort.Actor.Pawn == none) return;
// local Vector CamPos, ViewDir;
// local Rotator CamRot;
// local float OffsetX, BarLength, BarHeight, XL, YL, posY;
if (C == none || C.ViewPort == none || C.ViewPort.Actor == none || C.ViewPort.Actor.Pawn == none)
return;
nicePlayer = NicePlayerController(C.ViewPort.Actor.Pawn.Controller);
niceWeap = NiceWeapon(C.ViewPort.Actor.Pawn.Weapon);
if(nicePlayer == none)
if (nicePlayer == none)
return;
scrnHUDInstance = ScrnHUD(nicePlayer.myHUD);
//// Draw bleed and poison icons
szRI = class'MeanReplicationInfo'.static.findSZri(ViewportOwner.Actor.PlayerReplicationInfo);
offset = 4;
if(szRI != none){
if(szRI.isBleeding){
x = C.ClipX * 0.007;
y = C.ClipY * 0.93 - size * offset;
C.SetPos(x, y);
C.DrawTile(bleedIcon, size, size, 0, 0, bleedIcon.MaterialUSize(), bleedIcon.MaterialVSize());
}
offset++;
if(isPoisoned(ScrnHumanPawn(C.ViewPort.Actor.Pawn))){
x = C.ClipX * 0.007;
y = C.ClipY * 0.93 - size * offset;
C.SetPos(x, y);
C.DrawTile(poisonIcon, size, size, 0, 0, poisonIcon.MaterialUSize(), poisonIcon.MaterialVSize());
}
}
if(niceWeap != none && niceWeap.bShowSecondaryCharge && scrnHUDInstance != none){
C.ColorModulate.X = 1;
C.ColorModulate.Y = 1;
C.ColorModulate.Z = 1;
C.ColorModulate.W = scrnHUDInstance.HudOpacity / 255;
if(!scrnHUDInstance.bLightHud)
scrnHUDInstance.DrawSpriteWidget(C, scrnHUDInstance.SecondaryClipsBG);
scrnHUDInstance.DrawSpriteWidget(C, scrnHUDInstance.SecondaryClipsIcon);
scrnHUDInstance.SecondaryClipsDigits.value = niceWeap.secondaryCharge;
scrnHUDInstance.DrawNumericWidget(C, scrnHUDInstance.SecondaryClipsDigits, scrnHUDInstance.DigitsSmall);
}
niceMutator = class'NicePack'.static.Myself(C.ViewPort.Actor.Pawn.Level);
if(niceMutator == none)
return;
//// Draw counters
if(nicePlayer != none && nicePlayer.bFlagDisplayCounters){
x = C.ClipX * 0.5 - (64 + 2) * niceMutator.GetVisibleCountersAmount();
y = C.ClipY * 0.01;
for(i = 0;i < niceMutator.niceCounterSet.Length;i ++)
if(niceMutator.niceCounterSet[i].value != 0 || niceMutator.niceCounterSet[i].bShowZeroValue){
DrawCounter(C, niceMutator.niceCounterSet[i], x, y, C.ViewPort.Actor.Pawn.PlayerReplicationInfo.Team);
x += 128 + 4;
}
}
//// Draw weapons progress bars
if(nicePlayer != none && nicePlayer.bFlagDisplayWeaponProgress){
x = C.ClipX - InventoryBoxWidth * C.ClipX - 5;
y = C.ClipY * 0.5 - 0.5 * (InventoryBoxHeight * C.ClipX + 4) * niceMutator.niceWeapProgressSet.Length;
for(i = 0;i < niceMutator.niceWeapProgressSet.Length;i ++){
DrawWeaponProgress(C, niceMutator.niceWeapProgressSet[i], x, y,
C.ViewPort.Actor.Pawn.PlayerReplicationInfo.Team);
y += (InventoryBoxHeight * C.ClipX + 4);
}
}
//// Draw invincibility bar
nicePawn = NiceHumanPawn(nicePlayer.pawn);
if(nicePawn != none && nicePawn.invincibilityTimer != 0.0){
C.SetDrawColor(255, 255, 255);
if(nicePawn.invincibilityTimer > 0)
barTexture = greenBar;
else
barTexture = redBar;
center = C.ClipX * 0.5;
y = C.ClipY * 0.75;
barWidth = C.ClipX * 0.2;
niceVet = class'NiceVeterancyTypes'.static.
GetVeterancy(nicePawn.PlayerReplicationInfo);
if(niceVet != none){
if(nicePawn.invincibilityTimer > 0){
barWidth *= nicePawn.invincibilityTimer
/ niceVet.static.GetInvincibilityDuration(nicePawn.KFPRI);
}
else{
barWidth *= nicePawn.invincibilityTimer /
class'NiceSkillZerkGunzerker'.default.cooldown;
}
}
else
barWidth = 0;
x = center - (barWidth / 2);
C.SetPos(x, y);
C.DrawTile(barTexture, barWidth, 32, 0, 0, barTexture.MaterialUSize(), barTexture.MaterialVSize());
if(nicePawn.safeMeleeMisses <= 0)
return;
missesSpace = 10;//64x64 => 16x16
missesHeight = 16;
missesWidth = nicePawn.safeMeleeMisses * 16
+ (nicePawn.safeMeleeMisses - 1) * missesSpace;
missesX = center - (missesWidth / 2);
missesY = y + (32 - missesHeight) * 0.5;
for(i = 0;i < nicePawn.safeMeleeMisses;i ++){
C.SetPos(missesX + i * (16 + missesSpace), missesY);
C.DrawTile(shield, 16, 16, 0, 0, shield.MaterialUSize(), shield.MaterialVSize());
}
//// Draw bleed and poison icons for OWNER
offset = 4;
// BLEED!!!
if (bIsBleeding(nicePawn))
{
x = C.ClipX * 0.007;
y = C.ClipY * 0.93 - size * offset;
C.SetPos(x, y);
C.DrawTile(bleedIcon, size, size, 0, 0, bleedIcon.MaterialUSize(), bleedIcon.MaterialVSize());
}
// Draw cooldowns
if(nicePlayer.abilityManager == none)
offset++;
// POISON!!!
if (bIsPoisoned(nicePawn))
{
x = C.ClipX * 0.007;
y = C.ClipY * 0.93 - size * offset;
C.SetPos(x, y);
C.DrawTile(poisonIcon, size, size, 0, 0, poisonIcon.MaterialUSize(), poisonIcon.MaterialVSize());
}
// TODO draw bleed and poison icons for TEAMMATES
// C.GetCAmeraLocation(CamPos, CamRot);
// ViewDir = vector(CamRot);
// kfHud = HUDKillingFloor(ViewportOwner.Actor.myHUD);
// OffsetX = (36.f * kfHud.default.VeterancyMatScaleFactor * 0.6) - (kfHud.default.HealthIconSize + 2.0);
// BarLength = FMin(kfHud.default.BarLength * (float(C.SizeX) / 1024.f), kfHud.default.BarLength);
// BarHeight = FMin(kfHud.default.BarHeight * (float(C.SizeX) / 1024.f), kfHud.default.BarHeight);
// for (i = 0; i < kfHUD.PlayerInfoPawns.Length; i++)
// {
// if (kfHUD.PlayerInfoPawns[i].Pawn != none && kfHUD.PlayerInfoPawns[i].Pawn.Health > 0 &&
// (kfHUD.PlayerInfoPawns[i].Pawn.Location - kfHUD.PawnOwner.Location) dot ViewDir > 0.8 &&
// kfHUD.PlayerInfoPawns[i].RendTime > ViewportOwner.Actor.Level.TimeSeconds)
// {
// C.StrLen(Left(kfHUD.PlayerInfoPawns[i].Pawn.PlayerReplicationInfo.PlayerName, 16), XL, YL);
// if (kfHUD.PlayerInfoPawns[i].Pawn.ShieldStrength <= 0)
// {
// posY = (kfHUD.PlayerInfoPawns[i].PlayerInfoScreenPosY - YL) - 2.75 * BarHeight -
// kfHUD.default.ArmorIconSize * 0.5;
// }
// else
// {
// posY = (kfHUD.PlayerInfoPawns[i].PlayerInfoScreenPosY - YL) - 3.8 * BarHeight -
// kfHUD.default.ArmorIconSize * 0.5;
// }
// offset = 0;
// if (bIsBleeding(ScrnHumanPawn(kfHUD.PlayerInfoPawns[i].Pawn)))
// {
// C.SetPos(kfHUD.PlayerInfoPawns[i].PlayerInfoScreenPosX - OffsetX - 0.15 * BarLength -
// kfHUD.default.ArmorIconSize - 2.0, posY);
// C.DrawTileScaled(bleedIcon, 0.1875, 0.1875);
// }
// if (bIsPoisoned(ScrnHumanPawn(kfHUD.PlayerInfoPawns[i].Pawn)))
// {
// C.SetPos(kfHUD.PlayerInfoPawns[i].PlayerInfoScreenPosX - OffsetX + 0.15 * BarLength -
// kfHUD.default.ArmorIconSize - 2.0, posY);
// C.DrawTileScaled(poisonIcon, 0.1875, 0.1875);
// }
// }
// }
//// Draw weapons progress bars
// at first update weapon info
UpdateNiceWeapProgressSet(nicePawn);
if (nicePawn != none && class'NiceVeterancyTypes'.static.hasSkill(nicePlayer, class'NiceSkillEnforcerMultitasker')
&& nicePlayer.bFlagDisplayWeaponProgress && niceWeapProgressSet.length > 0)
{
x = C.ClipX - InventoryBoxWidth * C.ClipX - 5;
y = C.ClipY * 0.5 - 0.5 * (InventoryBoxHeight * C.ClipX + 4) * niceWeapProgressSet.Length;
for (i = 0; i < niceWeapProgressSet.Length; i++)
{
DrawWeaponProgress(C, niceWeapProgressSet[i], x, y, nicePawn.PlayerReplicationInfo.Team);
y += (InventoryBoxHeight * C.ClipX + 4);
}
}
scrnHUDInstance = ScrnHUD(nicePlayer.myHUD);
if (niceWeap != none && niceWeap.bShowSecondaryCharge && scrnHUDInstance != none)
{
C.ColorModulate.X = 1;
C.ColorModulate.Y = 1;
C.ColorModulate.Z = 1;
C.ColorModulate.W = scrnHUDInstance.HudOpacity / 255;
if (!scrnHUDInstance.bLightHud)
scrnHUDInstance.DrawSpriteWidget(C, scrnHUDInstance.SecondaryClipsBG);
scrnHUDInstance.DrawSpriteWidget(C, scrnHUDInstance.SecondaryClipsIcon);
scrnHUDInstance.SecondaryClipsDigits.value = niceWeap.secondaryCharge;
scrnHUDInstance.DrawNumericWidget(C, scrnHUDInstance.SecondaryClipsDigits, scrnHUDInstance.DigitsSmall);
}
//// Draw invincibility bar
if (nicePawn != none && nicePawn.invincibilityTimer != 0.0)
{
C.SetDrawColor(255, 255, 255);
if (nicePawn.invincibilityTimer > 0)
barTexture = greenBar;
else
barTexture = redBar;
center = C.ClipX * 0.5;
y = C.ClipY * 0.75;
barWidth = C.ClipX * 0.2;
niceVet = class'NiceVeterancyTypes'.static.
GetVeterancy(nicePawn.PlayerReplicationInfo);
if (niceVet != none)
{
if (nicePawn.invincibilityTimer > 0)
barWidth *= nicePawn.invincibilityTimer / niceVet.static.GetInvincibilityDuration(nicePawn.KFPRI);
else
barWidth *= nicePawn.invincibilityTimer / class'NiceSkillZerkGunzerker'.default.cooldown;
}
else
barWidth = 0;
x = center - (barWidth / 2);
C.SetPos(x, y);
C.DrawTile(barTexture, barWidth, 32, 0, 0, barTexture.MaterialUSize(), barTexture.MaterialVSize());
if (nicePawn.safeMeleeMisses <= 0)
return;
missesSpace = 10; // 64x64 => 16x16
missesHeight = 16;
missesWidth = nicePawn.safeMeleeMisses * 16 + (nicePawn.safeMeleeMisses - 1) * missesSpace;
missesX = center - (missesWidth / 2);
missesY = y + (32 - missesHeight) * 0.5;
for (i = 0; i < nicePawn.safeMeleeMisses; i++)
{
C.SetPos(missesX + i * (16 + missesSpace), missesY);
C.DrawTile(shield, 16, 16, 0, 0, shield.MaterialUSize(), shield.MaterialVSize());
}
}
//// Draw cooldowns
if (nicePlayer.abilityManager == none)
return;
for(i = 0;i < nicePlayer.abilityManager.currentAbilitiesAmount;i ++)
for (i = 0; i < nicePlayer.abilityManager.currentAbilitiesAmount; i++)
DrawAbilityCooldown(C, i);
//// Draw counters
niceMutator = class'NicePack'.static.Myself(nicePawn.Level);
if (niceMutator != none && nicePlayer != none && nicePlayer.bFlagDisplayCounters)
{
x = C.ClipX * 0.5 - (64 + 2) * niceMutator.GetVisibleCountersAmount();
y = C.ClipY * 0.01;
for (i = 0; i < niceMutator.niceCounterSet.Length; i++)
{
if (niceMutator.niceCounterSet[i].value != 0 || niceMutator.niceCounterSet[i].bShowZeroValue)
{
DrawCounter(C, niceMutator.niceCounterSet[i], x, y, C.ViewPort.Actor.Pawn.PlayerReplicationInfo.Team);
x += 128 + 4;
}
}
}
}
function DrawCounter(Canvas C, NicePack.CounterDisplay counter, int x, int y, TeamInfo team){
local float borderSpace;
local Texture textureToDraw;
@ -272,15 +404,18 @@ function DrawCalibrationStars(Canvas C){
x += 32 + 16;
}
}
function DrawWeaponProgress(Canvas C, NicePack.WeaponProgressDisplay weapProgress, int x, int y, TeamInfo team){
local float textWidth, textHeight;
function DrawWeaponProgress(Canvas C, WeaponProgressDisplay weapProgress, int x, int y, TeamInfo team)
{
local float textWidth, textHeight;
local string textToDraw;
local float TempWidth, TempHeight, TempBorder;
TempWidth = InventoryBoxWidth * C.ClipX;
TempHeight = InventoryBoxHeight * C.ClipX;
TempBorder = BorderSize * C.ClipX;
// Draw background bar
if(team.teamIndex == 0)
if (team.teamIndex == 0)
C.SetDrawColor(255, 64, 64, 64);
else
C.SetDrawColor(team.teamColor.R, team.teamColor.G, team.teamColor.B, 64);
@ -304,7 +439,8 @@ function DrawWeaponProgress(Canvas C, NicePack.WeaponProgressDisplay weapProgres
C.SetDrawColor(255, 64, 64);
else
C.SetDrawColor(team.teamColor.R, team.teamColor.G, team.teamColor.B);
if(weapProgress.bShowCounter){
if(weapProgress.bShowCounter)
{
textToDraw = string(weapProgress.counter);
C.Font = class'ROHUD'.Static.LoadSmallFontStatic(5);
C.TextSize(textToDraw, textWidth, textHeight);
@ -312,51 +448,61 @@ function DrawWeaponProgress(Canvas C, NicePack.WeaponProgressDisplay weapProgres
C.DrawText(textToDraw);
}
}
function bool KeyEvent(EInputKey Key, EInputAction Action, float Delta){
function bool KeyEvent(EInputKey Key, EInputAction Action, float Delta)
{
local bool bNeedsReload;
local string Alias, LeftPart, RigthPart;
local NiceWeapon niceWeap;
local NicePlayerController nicePlayer;
// Find controller and current weapon
nicePlayer = NicePlayerController(ViewportOwner.Actor);
if(nicePlayer == none)
if (nicePlayer == none)
return false;
if(nicePlayer.Pawn != none)
if (nicePlayer.Pawn != none)
niceWeap = NiceWeapon(nicePlayer.Pawn.Weapon);
// If this is a button press - detect alias
if(Action == IST_Press){
if (Action == IST_Press)
{
// Check for reload command
Alias = nicePlayer.ConsoleCommand("KEYBINDING" @ nicePlayer.ConsoleCommand("KEYNAME" @ Key));
if(nicePlayer.bAdvReloadCheck)
if (nicePlayer.bAdvReloadCheck)
bNeedsReload = InStr(Caps(Alias), "RELOADMENOW") > -1 || InStr(Caps(Alias), "RELOADWEAPON") > -1;
if(Divide(Alias, " ", LeftPart, RigthPart))
if (Divide(Alias, " ", LeftPart, RigthPart))
Alias = LeftPart;
if(Key == IK_MouseWheelUp || Key == IK_MouseWheelDown){
if (Key == IK_MouseWheelUp || Key == IK_MouseWheelDown)
{
nicePlayer.UpdateSelectors();
if(nicePlayer.hasZeroSelector && nicePlayer.bUsesMouseWheel && nicePlayer.bNiceWeaponManagement){
if (nicePlayer.hasZeroSelector && nicePlayer.bUsesMouseWheel && nicePlayer.bNiceWeaponManagement)
{
nicePlayer.ScrollSelector(0, nicePlayer.bMouseWheelLoops, Key == IK_MouseWheelUp);
return true;
}
}
}
// Open trader on movement
if(Alias ~= "MoveForward" || Alias ~= "MoveBackward" || Alias ~= "TurnLeft" || Alias ~= "TurnRight"
|| Alias ~= "StrafeLeft" || Alias ~= "StrafeRight" || Alias ~= "Axis"){
// Open trader if it's a pre-game
if(NicePackMutator.bIsPreGame && NicePackMutator.bInitialTrader && (NicePackMutator.bStillDuringInitTrader || !nicePlayer.bOpenedInitTrader) && nicePlayer.Pawn != none){
nicePlayer.ShowBuyMenu("Initial trader", KFHumanPawn(nicePlayer.Pawn).MaxCarryWeight);
nicePlayer.bOpenedInitTrader = true;
return true;
}
//nicePlayer.ClientOpenMenu("NicePack.NiceGUIBuyMenu",,"Test stuff",string(15));
// Open trader on movement if it's a pre-game
if (NicePackMutator.bIsPreGame && NicePackMutator.bInitialTrader && (NicePackMutator.bStillDuringInitTrader || !nicePlayer.bOpenedInitTrader) && nicePlayer.Pawn != none)
{
if (Alias ~= "MoveForward" || Alias ~= "MoveBackward" || Alias ~= "TurnLeft" || Alias ~= "TurnRight"
|| Alias ~= "StrafeLeft" || Alias ~= "StrafeRight" || Alias ~= "Axis")
{
// nicePlayer.ClientOpenMenu("NicePack.NiceGUIBuyMenu",,"Test stuff",string(15));
nicePlayer.ShowBuyMenu("Initial trader", KFHumanPawn(nicePlayer.Pawn).MaxCarryWeight);
nicePlayer.bOpenedInitTrader = true;
return true;
}
}
// Reload if we've detected a reload alias in this button's command
if(niceWeap != none && !nicePlayer.bUseServerReload &&
(bNeedsReload || Alias ~= "ReloadMeNow" || Alias ~= "ReloadWeapon"))
if (niceWeap != none && !nicePlayer.bUseServerReload &&
(bNeedsReload || Alias ~= "ReloadMeNow" || Alias ~= "ReloadWeapon"))
niceWeap.ClientReloadMeNow();
return false;
}
defaultproperties
{
bleedIcon=Texture'NicePackT.MeanZeds.bleedIcon'
@ -369,4 +515,4 @@ defaultproperties
InventoryBoxHeight=0.075000
BorderSize=0.005000
bVisible=True
}
}

View file

@ -8,16 +8,16 @@ function InitComponent(GUIController MyController, GUIComponent MyOwner){
local SRMenuAddition M;
local int indexAfterScrn;
// Setup panel classes.
Panels[0].ClassName = string(Class'ScrnBalanceSrv.ScrnTab_MidGamePerks');
Panels[1].ClassName = string(Class'NicePack.NicePanelSkills');
Panels[2].ClassName = string(Class'SRTab_MidGameVoiceChat');
Panels[3].ClassName = string(Class'SRTab_MidGameStats');
Panels[0].Caption = Class'KFInvasionLoginMenu'.Default.Panels[1].Caption;
Panels[0].ClassName = string(class'ScrnTab_MidGamePerks');
Panels[1].ClassName = string(class'NicePanelSkills');
Panels[2].ClassName = string(class'SRTab_MidGameVoiceChat');
Panels[3].ClassName = string(class'SRTab_MidGameStats');
Panels[0].Caption = class'KFInvasionLoginMenu'.Default.Panels[1].Caption;
Panels[1].Caption = "Skills";
Panels[2].Caption = Class'KFInvasionLoginMenu'.Default.Panels[2].Caption;
Panels[0].Hint = Class'KFInvasionLoginMenu'.Default.Panels[1].Hint;
Panels[2].Caption = class'KFInvasionLoginMenu'.Default.Panels[2].Caption;
Panels[0].Hint = class'KFInvasionLoginMenu'.Default.Panels[1].Hint;
Panels[1].Hint = "Customize your perk";
Panels[2].Hint = Class'KFInvasionLoginMenu'.Default.Panels[2].Hint;
Panels[2].Hint = class'KFInvasionLoginMenu'.Default.Panels[2].Hint;
b_Spec.Caption=class'KFTab_MidGamePerks'.default.b_Spec.Caption;
b_MatchSetup.Caption=class'KFTab_MidGamePerks'.default.b_MatchSetup.Caption;
b_KickVote.Caption=class'KFTab_MidGamePerks'.default.b_KickVote.Caption;
@ -28,18 +28,19 @@ function InitComponent(GUIController MyController, GUIComponent MyOwner){
b_Settings.Caption=class'KFTab_MidGamePerks'.default.b_Settings.Caption;
b_Browser.Caption=class'KFTab_MidGamePerks'.default.b_Browser.Caption;
// Other panels
Panels[4].ClassName = "ScrnBalanceSrv.ScrnTab_Achievements";
Panels[4].ClassName = string(class'ScrnTab_Achievements');
Panels[4].Caption = "Achievements";
Panels[4].Hint = "ScrN server-side achievements";
if(default.bShowScrnMenu){
Panels[5].ClassName = "ScrnBalanceSrv.ScrnTab_UserSettings";
if (default.bShowScrnMenu)
{
Panels[5].ClassName = string(class'ScrnTab_UserSettings');
Panels[5].Caption = "ScrN Features";
Panels[5].Hint = "ScrN Balance features, settings and info";
indexAfterScrn = 6;
}
else
indexAfterScrn = 5;
Panels[indexAfterScrn].ClassName = "NicePack.NiceGUISettings";
indexAfterScrn = 5;
Panels[indexAfterScrn].ClassName = string(class'NiceGUISettings');
Panels[indexAfterScrn].Caption = "Nice settings";
Panels[indexAfterScrn].Hint = "Settings specific to NicePack mutator";
Panels.Length = indexAfterScrn + 1;

View file

@ -0,0 +1,21 @@
class NiceLobbyChat extends KFLobbyChat;
function InitComponent(GUIController MyController, GUIComponent MyOwner)
{
Super(PopupPageBase).InitComponent( MyController, MyOwner );
TextColor[0] = class'SayMessagePlus'.default.RedTeamColor;
TextColor[1] = class'SayMessagePlus'.default.BlueTeamColor;
TextColor[2] = class'SayMessagePlus'.default.DrawColor;
eb_Send.MyEditBox.OnKeyEvent = InternalOnKeyEvent;
lb_Chat.MyScrollText.bNeverFocus=true;
}
function bool NotifyLevelChange() // Don't keep this one around...
{
bPersistent = false;
return true;
}
defaultproperties{}

View file

@ -1,12 +1,884 @@
class NiceLobbyMenu extends ScrnLobbyMenu;
// base class, not vanilla
class NiceLobbyMenu extends UT2k4MainPage;
// some constants
const MaxPlayersOnList=18;
// RIGHT part lables
var private string str_Beginner, str_Normal, str_Hard, str_Sui, str_HOE;
var private string str_CurrentMap, str_Difficulty, str_ServerName;
var private string SelectPerkInformationString, PerksDisabledString;
// LEFT part labels
var private string str_LvlAbbr;
var private string WaitingForServerStatus, WaitingForOtherPlayers, AutoCommence;
// player name-perk-ready boxes
struct FPlayerBoxEntry
{
var moCheckBox ReadyBox;
var KFPlayerReadyBar PlayerBox;
var GUIImage PlayerPerk;
var GUILabel PlayerVetLabel;
var bool bIsEmpty;
};
var array<FPlayerBoxEntry> PlayerBoxes;
var bool bShowProfilePage;
// swapped class
var automated KFLobbyChat t_ChatBox;
// diffculty / map name label
var automated AltSectionBackground GameInfoBG;
var automated GUILabel CurrentMapLabel;
var automated GUILabel DifficultyLabel;
var automated GUILabel ServerNameLabel;
// circle and current wave label
var automated GUIImage WaveBG;
var automated GUILabel WaveLabel;
var automated GUILabel label_TimeOutCounter;
var automated GUILabel PerkClickLabel;
var bool bAllowClose;
// Perks / Profile
var() string sChar, sCharD;
var() xUtil.PlayerRecord PlayerRec;
var automated GUISectionBackground i_BGPerk;
var automated GUISectionBackground i_BGPerkEffects;
var automated GUIScrollTextBox lb_PerkEffects;
var automated GUIImage i_Portrait;
var automated GUISectionBackground PlayerPortraitBG;
var float IconBorder; // Percent of Height to leave blank inside Icon Background
var float ItemBorder; // Percent of Height to leave blank inside Item Background
var float ItemSpacing; // Number of Pixels between Items
var float ProgressBarHeight; // Percent of Height to make Progress Bar's Height
var float TextTopOffset; // Percent of Height to off Progress String from top of Progress Bar(typically negative)
var float IconToInfoSpacing; // Percent of Width to offset Info from right side of Icon
//var bool bAdminUse; // If you're not an admin, gtfo!
var int ActivateTimeoutTime; // When was the lobby timeout turned on?
var bool bTimeoutTimeLogged; // Was it already logged once?
var bool bTimedOut; // Have we timed out out successfully?
var bool bShouldUpdateVeterancy;
var class<KFVeterancyTypes> CurrentVeterancy;
var int CurrentVeterancyLevel;
function InitComponent(GUIController MyC, GUIComponent MyO)
{
super(UT2k4MainPage).InitComponent(MyC, MyO);
FixPortrait();
t_ChatBox.FocusInstead = PerkClickLabel;
}
event ResolutionChanged(int ResX, int ResY)
{
super.ResolutionChanged(ResX, ResY);
FixPortrait();
}
// FUCKING TWI, YOUR FUCKING BUGS
final private function bool FixPortrait()
{
i_Portrait.WinTop = PlayerPortraitBG.RelativeTop(i_Portrait.WinTop); // ActualTop() + 30;
i_Portrait.WinHeight = PlayerPortraitBG.RelativeHeight(i_Portrait.WinHeight); // ActualHeight() - 36;
// log(">>> HideLobbyMenu: FixPortrait() called!!!");
return false;
}
// Called when the Menu Owner is opened
event Opened(GUIComponent Sender)
{
bShouldUpdateVeterancy = true;
// disable some shit for story mode
if (PlayerOwner().GameReplicationInfo.IsA('KF_StoryGRI'))
{
// disable background
WaveBG.Image = none;
WaveBG.DisableMe();
// disable waves text
WaveLabel.Caption = "";
WaveLabel.Hide();
}
SetTimer(1, true);
}
// if we don't reset persistence, playerboxes will continue to pile
function bool NotifyLevelChange()
{
bPersistent = false;
bAllowClose = true;
Controller.CloseMenu(true);
return true;
}
function bool InternalOnKeyEvent(out byte Key, out byte State, float delta)
{
local int i;
local bool bVoiceChatKey;
local array<string> BindKeyNames, LocalizedBindKeyNames;
Controller.GetAssignedKeys("VoiceTalk", BindKeyNames, LocalizedBindKeyNames);
for (i = 0; i < BindKeyNames.Length; i++)
{
if (Mid(GetEnum(enum'EInputKey', Key), 3) ~= BindKeyNames[i])
{
bVoiceChatKey = true;
break;
}
}
if (bVoiceChatKey)
{
if (state == 1 || state == 2)
{
if (PlayerOwner() != none)
{
PlayerOwner().bVoiceTalk = 1;
}
}
else
{
if (PlayerOwner() != none)
{
PlayerOwner().bVoiceTalk = 0;
return false;
}
}
return true;
}
return false;
}
function TimedOut()
{
bTimedOut = true;
PlayerOwner().ServerRestartPlayer();
bAllowClose = true;
}
function bool InternalOnPreDraw(Canvas C)
{
local int i, j;
local string StoryString;
local String SkillString;
local KFGameReplicationInfo KFGRI;
local PlayerController PC;
PC = PlayerOwner();
if (PC == none || PC.Level == none) // Error?
return false;
if ((PC.PlayerReplicationInfo != none && (!PC.PlayerReplicationInfo.bWaitingPlayer || PC.PlayerReplicationInfo.bOnlySpectator)) || PC.Outer.Name == 'Entry')
{
bAllowClose = true;
PC.ClientCloseMenu(true,false);
return false;
}
t_Footer.InternalOnPreDraw(C);
KFGRI = KFGameReplicationInfo(PC.GameReplicationInfo);
if (KFGRI != none)
{
WaveLabel.Caption = string(KFGRI.WaveNumber + 1) $ "/" $ string(KFGRI.FinalWave);
}
else
{
WaveLabel.Caption = "?/?";
return false;
}
C.DrawColor.A = 255;
// CHECK ME LATER
if (KFPlayerController(PC) != none && bShouldUpdateVeterancy)
{
if (KFPlayerController(PC).SelectedVeterancy == none)
{
bShowProfilePage = true;
if (PC.SteamStatsAndAchievements == none)
{
if (PC.Level.NetMode != NM_Client)
{
PC.SteamStatsAndAchievements = PC.Spawn(PC.default.SteamStatsAndAchievementsClass, PC);
if (!PC.SteamStatsAndAchievements.Initialize(PC))
{
Controller.OpenMenu(Controller.QuestionMenuClass);
GUIQuestionPage(Controller.TopPage()).SetupQuestion(class'KFMainMenu'.default.UnknownSteamErrorText, QBTN_Ok, QBTN_Ok);
PC.SteamStatsAndAchievements.Destroy();
PC.SteamStatsAndAchievements = none;
}
else
{
PC.SteamStatsAndAchievements.OnDataInitialized = OnSteamStatsAndAchievementsReady;
}
}
bShowProfilePage = false;
}
else if (!PC.SteamStatsAndAchievements.bInitialized)
{
PC.SteamStatsAndAchievements.OnDataInitialized = OnSteamStatsAndAchievementsReady;
PC.SteamStatsAndAchievements.GetStatsAndAchievements();
bShowProfilePage = false;
}
if (KFSteamStatsAndAchievements(PC.SteamStatsAndAchievements) != none)
{
for (i = 0; i < class'KFGameType'.default.LoadedSkills.Length; i++)
{
if (KFSteamStatsAndAchievements(PC.SteamStatsAndAchievements).GetPerkProgress(i) < 0.0)
{
PC.SteamStatsAndAchievements.OnDataInitialized = OnSteamStatsAndAchievementsReady;
PC.SteamStatsAndAchievements.GetStatsAndAchievements();
bShowProfilePage = false;
}
}
}
if (bShowProfilePage)
{
OnSteamStatsAndAchievementsReady();
}
bShouldUpdateVeterancy = false;
}
else if (PC.SteamStatsAndAchievements != none && PC.SteamStatsAndAchievements.bInitialized)
{
KFPlayerController(PC).SendSelectedVeterancyToServer();
bShouldUpdateVeterancy = false;
}
}
// First fill in non-ready players.
for (i = 0; i < KFGRI.PRIArray.Length; i++)
{
if (!bValidPRI(KFGRI.PRIArray[i]) || KFGRI.PRIArray[i].bReadyToPlay)
continue;
// start from 0
AddPlayer(KFPlayerReplicationInfo(KFGRI.PRIArray[i]), j, C);
if (++j >= MaxPlayersOnList)
GoTo'DoneIt';
}
// Then comes rest.
for (i = 0; i < KFGRI.PRIArray.Length; i++)
{
if (!bValidPRI(KFGRI.PRIArray[i]) || !KFGRI.PRIArray[i].bReadyToPlay)
continue;
if (KFGRI.PRIArray[i].bReadyToPlay)
{
if (!bTimeoutTimeLogged)
{
ActivateTimeoutTime = PC.Level.TimeSeconds;
bTimeoutTimeLogged = true;
}
}
// continue from last idx
AddPlayer(KFPlayerReplicationInfo(KFGRI.PRIArray[i]), j, C);
if (++j >= MaxPlayersOnList)
GoTo'DoneIt';
}
if (j < MaxPlayersOnList)
EmptyPlayers(j);
DoneIt:
StoryString = PC.Level.Description;
if (KFGRI.BaseDifficulty <= 1)
SkillString = str_Beginner;
else if (KFGRI.BaseDifficulty <= 2)
SkillString = str_Normal;
else if (KFGRI.BaseDifficulty <= 4)
SkillString = str_Hard;
else if (KFGRI.BaseDifficulty <= 5)
SkillString = str_Sui;
else
SkillString = str_HOE;
CurrentMapLabel.Caption = str_CurrentMap @ PC.Level.Title;
DifficultyLabel.Caption = str_Difficulty @ SkillString;
// UT2K4PlayerLoginMenu copy-cat
if (PC.Level.NetMode == NM_StandAlone || PC.GameReplicationInfo == None || PC.GameReplicationInfo.ServerName == "")
ServerNameLabel.Caption = str_ServerName @ "SOLO MODE ACTIVE!";
else
ServerNameLabel.Caption = str_ServerName @ PC.GameReplicationInfo.ServerName;
return false;
}
// filter none, spectators, non-KFPRI ones
final private function bool bValidPRI(PlayerReplicationInfo PRI)
{
if (PRI == none || PRI.bOnlySpectator || KFPlayerReplicationInfo(PRI) == none)
return false;
else
return true;
}
final private function AddPlayer(KFPlayerReplicationInfo PRI, int Index, Canvas C)
{
local float Top;
local Material M;
local ScrnBalance Mut;
local String PlayerName;
if (Index >= PlayerBoxes.Length)
{
Top = Index * 0.045;
PlayerBoxes.Length = Index + 1;
// create GUIComponents and set defaults
PlayerBoxes[Index].ReadyBox = new (none) Class'moCheckBox';
PlayerBoxes[Index].ReadyBox.bValueReadOnly = true;
PlayerBoxes[Index].ReadyBox.ComponentJustification = TXTA_Left;
PlayerBoxes[Index].ReadyBox.CaptionWidth = 0.82;
PlayerBoxes[Index].ReadyBox.LabelColor.B = 0;
PlayerBoxes[Index].ReadyBox.WinTop = 0.0475+Top;
PlayerBoxes[Index].ReadyBox.WinLeft = 0.075;
PlayerBoxes[Index].ReadyBox.WinWidth = 0.4;
PlayerBoxes[Index].ReadyBox.WinHeight = 0.045;
PlayerBoxes[Index].ReadyBox.RenderWeight = 0.55;
PlayerBoxes[Index].ReadyBox.bAcceptsInput = false;
PlayerBoxes[Index].PlayerBox = new (none) Class'KFPlayerReadyBar';
PlayerBoxes[Index].PlayerBox.WinTop = 0.04+Top;
PlayerBoxes[Index].PlayerBox.WinLeft = 0.04;
PlayerBoxes[Index].PlayerBox.WinWidth = 0.35;
PlayerBoxes[Index].PlayerBox.WinHeight = 0.045;
PlayerBoxes[Index].PlayerBox.RenderWeight = 0.35;
PlayerBoxes[Index].PlayerPerk = new (none) Class'GUIImage';
PlayerBoxes[Index].PlayerPerk.ImageStyle = ISTY_Justified;
PlayerBoxes[Index].PlayerPerk.WinTop = 0.043+Top;
PlayerBoxes[Index].PlayerPerk.WinLeft = 0.0418;
PlayerBoxes[Index].PlayerPerk.WinWidth = 0.039;
PlayerBoxes[Index].PlayerPerk.WinHeight = 0.039;
PlayerBoxes[Index].PlayerPerk.RenderWeight = 0.56;
PlayerBoxes[Index].PlayerVetLabel = new (none) Class'GUILabel';
PlayerBoxes[Index].PlayerVetLabel.TextAlign = TXTA_Right;
PlayerBoxes[Index].PlayerVetLabel.TextColor = Class'Canvas'.Static.MakeColor(19,19,19);
PlayerBoxes[Index].PlayerVetLabel.TextFont = "UT2SmallFont";
PlayerBoxes[Index].PlayerVetLabel.WinTop = 0.04+Top;
PlayerBoxes[Index].PlayerVetLabel.WinLeft = 0.22907;
PlayerBoxes[Index].PlayerVetLabel.WinWidth = 0.151172;
PlayerBoxes[Index].PlayerVetLabel.WinHeight = 0.045;
PlayerBoxes[Index].PlayerVetLabel.RenderWeight = 0.5;
// finally add the GUIComponents
AppendComponent(PlayerBoxes[Index].ReadyBox, true);
AppendComponent(PlayerBoxes[Index].PlayerBox, true);
AppendComponent(PlayerBoxes[Index].PlayerPerk, true);
AppendComponent(PlayerBoxes[Index].PlayerVetLabel, true);
Top = (PlayerBoxes[Index].PlayerBox.WinTop + PlayerBoxes[Index].PlayerBox.WinHeight);
}
PlayerBoxes[Index].ReadyBox.Checked(PRI.bReadyToPlay);
Mut = class'ScrnBalance'.default.Mut;
if ( Mut != none )
PlayerName = Mut.LeftCol(Mut.ColoredPlayerName(PRI), 20);
else
PlayerName = Left(PRI.PlayerName, 20);
PlayerBoxes[Index].ReadyBox.SetCaption(" "$PlayerName);
if (PRI.ClientVeteranSkill != none)
{
PlayerBoxes[Index].PlayerVetLabel.Caption = str_LvlAbbr @ PRI.ClientVeteranSkillLevel @ PRI.ClientVeteranSkill.default.VeterancyName;
if (Class<SRVeterancyTypes>(PRI.ClientVeteranSkill) != None)
{
Class<SRVeterancyTypes>(PRI.ClientVeteranSkill).Static.PreDrawPerk(C,PRI.ClientVeteranSkillLevel,PlayerBoxes[Index].PlayerPerk.Image,M);
PlayerBoxes[Index].PlayerPerk.ImageColor = C.DrawColor;
}
else
{
PlayerBoxes[Index].PlayerPerk.Image = PRI.ClientVeteranSkill.default.OnHUDIcon;
PlayerBoxes[Index].PlayerPerk.ImageColor = Class'Canvas'.Static.MakeColor(255,255,255);
}
}
else
{
PlayerBoxes[Index].PlayerPerk.Image = None;
PlayerBoxes[Index].PlayerVetLabel.Caption = "";
}
PlayerBoxes[Index].bIsEmpty = false;
}
final private function EmptyPlayers(int Index)
{
local int i;
while (Index < PlayerBoxes.Length && !PlayerBoxes[Index].bIsEmpty)
{
PlayerBoxes[Index].ReadyBox.Checked(false);
PlayerBoxes[Index].PlayerPerk.Image = none;
PlayerBoxes[Index].PlayerVetLabel.Caption = "";
PlayerBoxes[Index].ReadyBox.SetCaption("");
PlayerBoxes[Index].bIsEmpty = true;
++Index;
}
for (i = 0; i < PlayerBoxes.Length; i++)
{
if (PlayerBoxes[i].bIsEmpty)
{
// remove GUIComponents
RemoveComponent(PlayerBoxes[i].ReadyBox, false);
RemoveComponent(PlayerBoxes[i].PlayerBox, false);
RemoveComponent(PlayerBoxes[i].PlayerPerk, false);
RemoveComponent(PlayerBoxes[i].PlayerVetLabel, false);
// remove refs
PlayerBoxes[i].ReadyBox = none;
PlayerBoxes[i].PlayerBox = none;
PlayerBoxes[i].PlayerPerk = none;
PlayerBoxes[i].PlayerVetLabel = none;
// remove from array
PlayerBoxes.remove(i, 1);
// everything works fine this way, do not log
// log(">>> NiceLobbyMenu: EmptyPlayers executed.");
}
}
}
function bool StopClose(optional bool bCancelled)
{
// clean chat box
t_ChatBox.lb_Chat.SetContent("");
// this is for the OnCanClose delegate
// can't close now unless done by call to CloseAll,
// or the bool has been set to true by LobbyFooter
return false;
}
function InternalOnClosed(bool bCancelled)
{
if (PlayerOwner() != none)
{
PlayerOwner().Advertising_ExitZone();
}
}
event Timer()
{
local KFGameReplicationInfo KF;
if (PlayerOwner().PlayerReplicationInfo == none)
return;
if (PlayerOwner().PlayerReplicationInfo.bOnlySpectator)
{
label_TimeOutCounter.caption = "You are a spectator.";
return;
}
KF = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo);
if (KF == none)
{
label_TimeOutCounter.caption = WaitingForServerStatus;
}
else if (KF.LobbyTimeout <= 0)
{
label_TimeOutCounter.caption = WaitingForOtherPlayers;
}
else
{
label_TimeOutCounter.caption = AutoCommence $ KF.LobbyTimeout;
}
}
final private function DrawPerk(Canvas Canvas)
{
local float X, Y, Width, Height;
local int LevelIndex;
local float TempX, TempY;
local float TempWidth, TempHeight;
local float IconSize, ProgressBarWidth;
local string PerkName, PerkLevelString;
local KFPlayerReplicationInfo KFPRI;
local Material M, SM;
DrawPortrait();
KFPRI = KFPlayerReplicationInfo(PlayerOwner().PlayerReplicationInfo);
if (KFPRI == none || KFPRI.ClientVeteranSkill == None)
{
if (CurrentVeterancyLevel != 255)
{
CurrentVeterancyLevel = 255;
lb_PerkEffects.SetContent("None perk active");
}
return;
}
LevelIndex = KFPRI.ClientVeteranSkillLevel;
PerkName = KFPRI.ClientVeteranSkill.default.VeterancyName;
PerkLevelString = str_LvlAbbr @ LevelIndex;
//Get the position size etc in pixels
X = (i_BGPerk.WinLeft + 0.003) * Canvas.ClipX;
Y = (i_BGPerk.WinTop + 0.040) * Canvas.ClipY;
Width = (i_BGPerk.WinWidth - 0.006) * Canvas.ClipX;
Height = (i_BGPerk.WinHeight - 0.043) * Canvas.ClipY;
// Offset for the Background
TempX = X;
TempY = Y;
// Initialize the Canvas
Canvas.Style = 1;
Canvas.Font = class'ROHUD'.Static.GetSmallMenuFont(Canvas);
Canvas.SetDrawColor(255, 255, 255, 255);
// Draw Item Background
Canvas.SetPos(TempX, TempY);
// Offset and Calculate Icon's Size
TempX += ItemBorder * Height;
TempY += ItemBorder * Height;
IconSize = Height - (ItemBorder * 2.0 * Height);
// Draw Icon
Canvas.SetPos(TempX, TempY);
if( Class<SRVeterancyTypes>(KFPRI.ClientVeteranSkill)!=None )
Class<SRVeterancyTypes>(KFPRI.ClientVeteranSkill).Static.PreDrawPerk(Canvas,KFPRI.ClientVeteranSkillLevel,M,SM);
else M = KFPRI.ClientVeteranSkill.default.OnHUDIcon;
Canvas.DrawTile(M, IconSize, IconSize, 0, 0, M.MaterialUSize(), M.MaterialVSize());
TempX += IconSize + (IconToInfoSpacing * Width);
TempY += TextTopOffset * Height;
ProgressBarWidth = Width - (TempX - X) - (IconToInfoSpacing * Width);
// Select Text Color
Canvas.SetDrawColor(255, 255, 255, 255);
// Draw the Perk's Level name
Canvas.StrLen(PerkName, TempWidth, TempHeight);
Canvas.SetPos(TempX, TempY);
Canvas.DrawText(PerkName);
// Draw the Perk's Level
if (PerkLevelString != "")
{
Canvas.StrLen(PerkLevelString, TempWidth, TempHeight);
Canvas.SetPos(TempX + ProgressBarWidth - TempWidth, TempY);
Canvas.DrawText(PerkLevelString);
}
TempY += TempHeight + (0.01 * Height);
if (CurrentVeterancy != KFPRI.ClientVeteranSkill || CurrentVeterancyLevel != LevelIndex)
{
CurrentVeterancy = KFPRI.ClientVeteranSkill;
CurrentVeterancyLevel = LevelIndex;
lb_PerkEffects.SetContent(Class<SRVeterancyTypes>(KFPRI.ClientVeteranSkill).Static.GetVetInfoText(LevelIndex,1));
}
}
final private function DrawPortrait()
{
if (PlayerOwner().PlayerReplicationInfo != none)
sChar = PlayerOwner().PlayerReplicationInfo.CharacterName;
else
sChar = PlayerOwner().GetUrlOption("Character");
if (sCharD != sChar)
{
sCharD = sChar;
SetPlayerRec();
}
}
final private function SetPlayerRec()
{
PlayerRec = Class'xUtil'.Static.FindPlayerRecord(sChar);
i_Portrait.Image = PlayerRec.Portrait;
}
final private function bool ShowPerkMenu(GUIComponent Sender)
{
if (PlayerOwner() != none)
{
if (ScrnPlayerController(PlayerOwner()) != none )
PlayerOwner().ClientOpenMenu(ScrnPlayerController(PlayerOwner()).ProfilePageClassString, false);
else
PlayerOwner().ClientOpenMenu(string(class'ScrnProfilePage'), false);
}
return true;
}
final private function OnSteamStatsAndAchievementsReady()
{
Controller.OpenMenu("KFGUI.KFProfilePage");
Controller.OpenMenu(Controller.QuestionMenuClass);
GUIQuestionPage(Controller.TopPage()).SetupQuestion(SelectPerkInformationString, QBTN_Ok, QBTN_Ok);
}
//=============================================================================
// DEFAULTPROPERTIES
//=============================================================================
defaultproperties
{
Begin Object Class=NiceLobbyFooter Name=BuyFooter
RenderWeight=0.300000
TabOrder=8
bBoundToParent=False
bScaleToParent=False
OnPreDraw=BuyFooter.InternalOnPreDraw
End Object
t_Footer=NiceLobbyFooter'NicePack.NiceLobbyMenu.BuyFooter'
}
str_Beginner="Beginner"
str_Normal="Normal"
str_Hard="Hard"
str_Sui="Suicidal"
str_HOE="Hell on Earth"
str_LvlAbbr="Lv"
str_CurrentMap="Current Map:"
str_Difficulty="Difficulty:"
str_ServerName="Server Name:"
SelectPerkInformationString="Perks enhance certain abilities of your character.|There are 6 Perks to choose from in the center of the screen.|Each has different Effects shown in the upper right.|Perks improve as you complete the Level Requirements shown on the right."
PerksDisabledString="Perk Progress has been disabled because the Game Length is set to Custom, Sandbox Mode is on, or you have previously used Cheats."
WaitingForServerStatus="Awaiting server status..."
WaitingForOtherPlayers="Waiting for players to be ready..."
AutoCommence="Game will auto-commence in: "
// replace LobbyChat
Begin Object Class=NiceLobbyChat Name=ChatBox
OnCreateComponent=ChatBox.InternalOnCreateComponent
TabOrder=1
RenderWeight=0.01
OnHover=ChatBox.FloatingHover
WinTop=0.80760
WinLeft=0.016090
WinWidth=0.971410
WinHeight=0.100000
ToolTip=none
End Object
t_ChatBox=ChatBox
// replace LobbyFooter
Begin Object Class=NiceLobbyFooter Name=BuyFooter
RenderWeight=0.300000
TabOrder=8
bBoundToParent=false
bScaleToParent=false
OnPreDraw=BuyFooter.InternalOnPreDraw
End Object
t_Footer=BuyFooter
// RIGHT part, server name - map name - difficulty - waves
Begin Object Class=AltSectionBackground Name=GameInfoB
WinTop=0.037851
WinLeft=0.489062
WinWidth=0.487374
WinHeight=0.100000
OnPreDraw=GameInfoB.InternalPreDraw
End Object
GameInfoBG=GameInfoB
Begin Object Class=GUILabel Name=ServerNameL
Caption="tmp name"
TextColor=(B=158,G=176,R=175)
WinTop=0.042179
WinLeft=0.496524
WinWidth=0.360000
WinHeight=0.035714
RenderWeight=0.900000
End Object
ServerNameLabel=ServerNameL
Begin Object Class=GUILabel Name=CurrentMapL
Caption="tmp Map"
TextColor=(B=158,G=176,R=175)
WinTop=0.072381
WinLeft=0.496524
WinWidth=0.360000
WinHeight=0.035714
RenderWeight=0.900000
End Object
CurrentMapLabel=CurrentMapL
Begin Object Class=GUILabel Name=DifficultyL
Caption="tmp diff"
TextColor=(B=158,G=176,R=175)
WinTop=0.102583
WinLeft=0.496524
WinWidth=0.360000
WinHeight=0.035714
RenderWeight=0.900000
End Object
DifficultyLabel=DifficultyL
Begin Object Class=GUIImage Name=WaveB
Image=Texture'KillingFloorHUD.HUD.Hud_Bio_Circle'
ImageStyle=ISTY_Justified
ImageRenderStyle=MSTY_Normal
WinTop=0.043810
WinLeft=0.923238
WinWidth=0.051642
WinHeight=0.061783
RenderWeight=0.800000
End Object
WaveBG=WaveB
Begin Object Class=GUILabel Name=WaveL
Caption="1/4"
TextAlign=TXTA_Center
TextColor=(B=158,G=176,R=175)
VertAlign=TXTA_Center
FontScale=FNS_Small
WinTop=0.043810
WinLeft=0.923238
WinWidth=0.051642
WinHeight=0.061783
RenderWeight=0.900000
End Object
WaveLabel=WaveL
// LEFT part
Begin Object Class=GUILabel Name=TimeOutCounter
Caption="Game will auto-commence in: "
TextAlign=TXTA_Center
TextColor=(B=158,G=176,R=175)
WinTop=0.000010
WinLeft=0.059552
WinWidth=0.346719
WinHeight=0.045704
TabOrder=6
End Object
label_TimeOutCounter=TimeOutCounter
Begin Object Class=GUILabel Name=PerkClickArea
WinTop=0.432395
WinLeft=0.488851
WinWidth=0.444405
WinHeight=0.437312
bAcceptsInput=true
OnClickSound=CS_Click
OnClick=NiceLobbyMenu.ShowPerkMenu
End Object
PerkClickLabel=PerkClickArea
Begin Object Class=GUISectionBackground Name=BGPerk
bFillClient=true
Caption="Current Perk"
WinTop=0.432291
WinLeft=0.650976
WinWidth=0.325157
WinHeight=0.138086
OnPreDraw=BGPerk.InternalPreDraw
End Object
i_BGPerk=BGPerk
Begin Object Class=GUISectionBackground Name=BGPerkEffects
bFillClient=true
Caption="Perk Effects"
WinTop=0.568448
WinLeft=0.650976
WinWidth=0.325157
WinHeight=0.307442
OnPreDraw=BGPerkEffects.InternalPreDraw
End Object
i_BGPerkEffects=BGPerkEffects
Begin Object Class=GUIScrollTextBox Name=PerkEffectsScroll
CharDelay=0.002500
EOLDelay=0.100000
OnCreateComponent=PerkEffectsScroll.InternalOnCreateComponent
WinTop=0.626094
WinLeft=0.659687
WinWidth=0.309454
WinHeight=0.244961
TabOrder=9
ToolTip=none
End Object
lb_PerkEffects=PerkEffectsScroll
Begin Object Class=GUIImage Name=PlayerPortrait
Image=Texture'InterfaceArt_tex.Menu.changeme_texture'
ImageStyle=ISTY_Scaled
ImageRenderStyle=MSTY_Normal
IniOption="@Internal"
WinTop=0.472396
WinLeft=0.492522
WinWidth=0.156368
WinHeight=0.397022
RenderWeight=0.300000
End Object
i_Portrait=PlayerPortrait
Begin Object Class=GUISectionBackground Name=PlayerPortraitB
WinTop=0.432291
WinLeft=0.489062
WinWidth=0.163305
WinHeight=0.443451
OnPreDraw=PlayerPortraitB.InternalPreDraw
End Object
PlayerPortraitBG=PlayerPortraitB
IconBorder=0.050000
ItemBorder=0.110000
ProgressBarHeight=0.300000
TextTopOffset=0.050000
IconToInfoSpacing=0.050000
c_Tabs=GUITabControl'KFGui.GUILibraryMenu.PageTabs'
Begin Object Class=GUIHeader Name=ServerBrowserHeader
bVisible=false
End Object
t_Header=ServerBrowserHeader
i_Background=none
i_bkChar=none
bRenderWorld=true
bAllowedAsLast=true
OnClose=NiceLobbyMenu.InternalOnClosed
OnCanClose=NiceLobbyMenu.StopClose
WinHeight=0.500000
OnPreDraw=NiceLobbyMenu.InternalOnPreDraw
OnRendered=NiceLobbyMenu.DrawPerk
OnKeyEvent=NiceLobbyMenu.InternalOnKeyEvent
}

View file

@ -1,99 +1,157 @@
class NicePanelSkills extends Settings_Tabs;
var automated NiceGUIPerkButton skillButtonA[5], skillButtonB[5];
function ShowPanel(bool bShow){
class NicePanelSkills extends UT2K4TabPanel;
var automated NiceGUIPerkButton skillButtonA[5], skillButtonB[5];
var automated GUISectionBackground sb_big_left, sb_big_right;
function ShowPanel(bool bShow)
{
local int i;
local class<NiceVeterancyTypes> niceVet;
local NicePlayerController nicePlayer;
Super.ShowPanel(bShow);
super.ShowPanel(bShow);
// loops are for puss
sb_big_left.ManageComponent(skillButtonA[0]);
sb_big_left.ManageComponent(skillButtonA[1]);
sb_big_left.ManageComponent(skillButtonA[2]);
sb_big_left.ManageComponent(skillButtonA[3]);
sb_big_left.ManageComponent(skillButtonA[4]);
sb_big_right.ManageComponent(skillButtonB[0]);
sb_big_right.ManageComponent(skillButtonB[1]);
sb_big_right.ManageComponent(skillButtonB[2]);
sb_big_right.ManageComponent(skillButtonB[3]);
sb_big_right.ManageComponent(skillButtonB[4]);
nicePlayer = NicePlayerController(PlayerOwner());
if(nicePlayer != none)
if (nicePlayer != none)
niceVet = class'NiceVeterancyTypes'.static.GetVeterancy(nicePlayer.PlayerReplicationInfo);
if(niceVet != none){
for(i = 0;i < 5;i ++){
skillButtonA[i].skillIndex = i;
skillButtonB[i].skillIndex = i;
skillButtonA[i].skillPerkIndex = niceVet.default.PerkIndex;
skillButtonB[i].skillPerkIndex = niceVet.default.PerkIndex;
skillButtonA[i].isAltSkill = false;
skillButtonB[i].isAltSkill = true;
skillButtonA[i].associatedSkill = niceVet.default.SkillGroupA[i];
skillButtonB[i].associatedSkill = niceVet.default.SkillGroupB[i];
}
if (niceVet != none)
{
for (i = 0;i < 5;i ++)
{
skillButtonA[i].skillIndex = i;
skillButtonB[i].skillIndex = i;
skillButtonA[i].skillPerkIndex = niceVet.default.PerkIndex;
skillButtonB[i].skillPerkIndex = niceVet.default.PerkIndex;
skillButtonA[i].isAltSkill = false;
skillButtonB[i].isAltSkill = true;
skillButtonA[i].associatedSkill = niceVet.default.SkillGroupA[i];
skillButtonB[i].associatedSkill = niceVet.default.SkillGroupB[i];
}
}
}
// size = (x=0.0125, y=0.0) ; (w=1.0, h=0.865)
// setup caption
defaultproperties
{
// BACKGROUNDS
Begin Object Class=AltSectionBackground Name=skillbckgrndl
Caption="LEFT SKILLS"
// bNoCaption=true
LeftPadding=0.000000
RightPadding=0.030000
TopPadding=0.000000
BottomPadding=0.000000
WinTop=0.000000
WinLeft=0.000000
WinWidth=0.500000
WinHeight=0.87
bBoundToParent=True
bScaleToParent=True
OnPreDraw=skillbckgrndl.InternalPreDraw
End Object
sb_big_left=skillbckgrndl
Begin Object Class=AltSectionBackground Name=skillbckgrndr
Caption="OBVIOUSLY RIGHT SKILLS"
// bNoCaption=true
LeftPadding=0.000000
RightPadding=0.030000
TopPadding=0.000000
BottomPadding=0.000000
WinTop=0.000000
WinLeft=0.500000
WinWidth=0.500000
WinHeight=0.87
bBoundToParent=True
bScaleToParent=True
OnPreDraw=skillbckgrndr.InternalPreDraw
End Object
sb_big_right=skillbckgrndr
// buttons
Begin Object Class=NiceGUIPerkButton Name=btn1A
WinTop=0.012500
// WinTop=0.012500
WinWidth=0.495000
WinHeight=0.160000
RenderWeight=2.000000
TabOrder=1
// RenderWeight=2.000000
// TabOrder=1
bBoundToParent=True
bScaleToParent=True
bMouseOverSound=False
OnClickSound=CS_None
OnKeyEvent=btn1A.InternalOnKeyEvent
End Object
skillButtonA(0)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn1A'
skillButtonA(0)=btn1A
Begin Object Class=NiceGUIPerkButton Name=btn2A
WinTop=0.188500
// WinTop=0.188500
WinWidth=0.495000
WinHeight=0.160000
RenderWeight=2.000000
TabOrder=3
// RenderWeight=2.000000
// TabOrder=3
bBoundToParent=True
bScaleToParent=True
bMouseOverSound=False
OnClickSound=CS_None
OnKeyEvent=btn2A.InternalOnKeyEvent
End Object
skillButtonA(1)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn2A'
skillButtonA(1)=btn2A
Begin Object Class=NiceGUIPerkButton Name=btn3A
WinTop=0.364500
// WinTop=0.364500
WinWidth=0.495000
WinHeight=0.160000
RenderWeight=2.000000
TabOrder=5
// RenderWeight=2.000000
// TabOrder=5
bBoundToParent=True
bScaleToParent=True
bMouseOverSound=False
OnClickSound=CS_None
OnKeyEvent=btn3A.InternalOnKeyEvent
End Object
skillButtonA(2)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn3A'
skillButtonA(2)=btn3A
Begin Object Class=NiceGUIPerkButton Name=btn4A
WinTop=0.540500
// WinTop=0.540500
WinWidth=0.495000
WinHeight=0.160000
RenderWeight=2.000000
TabOrder=7
// RenderWeight=2.000000
// TabOrder=7
bBoundToParent=True
bScaleToParent=True
bMouseOverSound=False
OnClickSound=CS_None
OnKeyEvent=btn4A.InternalOnKeyEvent
End Object
skillButtonA(3)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn4A'
skillButtonA(3)=btn4A
Begin Object Class=NiceGUIPerkButton Name=btn5A
WinTop=0.716500
// WinTop=0.716500
WinWidth=0.495000
WinHeight=0.160000
RenderWeight=2.000000
TabOrder=9
// RenderWeight=2.000000
// TabOrder=9
bBoundToParent=True
bScaleToParent=True
bMouseOverSound=False
OnClickSound=CS_None
OnKeyEvent=btn5A.InternalOnKeyEvent
End Object
skillButtonA(4)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn5A'
skillButtonA(4)=btn5A
Begin Object Class=NiceGUIPerkButton Name=btn1B
WinTop=0.012500
@ -108,7 +166,7 @@ defaultproperties
OnClickSound=CS_None
OnKeyEvent=btn1B.InternalOnKeyEvent
End Object
skillButtonB(0)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn1B'
skillButtonB(0)=btn1B
Begin Object Class=NiceGUIPerkButton Name=btn2B
WinTop=0.188500
@ -123,7 +181,7 @@ defaultproperties
OnClickSound=CS_None
OnKeyEvent=btn2B.InternalOnKeyEvent
End Object
skillButtonB(1)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn2B'
skillButtonB(1)=btn2B
Begin Object Class=NiceGUIPerkButton Name=btn3B
WinTop=0.364500
@ -138,7 +196,7 @@ defaultproperties
OnClickSound=CS_None
OnKeyEvent=btn3B.InternalOnKeyEvent
End Object
skillButtonB(2)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn3B'
skillButtonB(2)=btn3B
Begin Object Class=NiceGUIPerkButton Name=btn4B
WinTop=0.540500
@ -153,7 +211,7 @@ defaultproperties
OnClickSound=CS_None
OnKeyEvent=btn4B.InternalOnKeyEvent
End Object
skillButtonB(3)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn4B'
skillButtonB(3)=btn4B
Begin Object Class=NiceGUIPerkButton Name=btn5B
WinTop=0.716500
@ -168,5 +226,5 @@ defaultproperties
OnClickSound=CS_None
OnKeyEvent=btn5B.InternalOnKeyEvent
End Object
skillButtonB(4)=NiceGUIPerkButton'NicePack.NicePanelSkills.btn5B'
skillButtonB(4)=btn5B
}

View file

@ -1,8 +1,10 @@
// made to fix KFStoryGameInfo loading for KFO maps
class NiceGameType extends ScrnGameType;
var NicePack NicePackMutator;
var bool lessDramatic;
var float LesserZedTimeSlomoScale;
function RegisterMutator(NicePack activePack){
NicePackMutator = activePack;
}
@ -77,7 +79,7 @@ function ScoreKill(Controller Killer, Controller Other)
local Controller C;
OtherPRI = Other.PlayerReplicationInfo;
if ( OtherPRI != None )
if ( OtherPRI != none )
{
OtherPRI.NumLives++;
OtherPRI.Score -= (OtherPRI.Score * (GameDifficulty * 0.05)); // you Lose 35% of your current cash on Hell on Earth, 15% on normal.
@ -90,23 +92,23 @@ function ScoreKill(Controller Killer, Controller Other)
OtherPRI.Team.NetUpdateTime = Level.TimeSeconds - 1;
OtherPRI.bOutOfLives = true;
if( Killer!=None && Killer.PlayerReplicationInfo!=None && Killer.bIsPlayer )
if( Killer!=none && Killer.PlayerReplicationInfo!=none && Killer.bIsPlayer )
BroadcastLocalizedMessage(class'KFInvasionMessage',1,OtherPRI,Killer.PlayerReplicationInfo);
else if( Killer==None || Monster(Killer.Pawn)==None )
else if( Killer==none || Monster(Killer.Pawn)==none )
BroadcastLocalizedMessage(class'KFInvasionMessage',1,OtherPRI);
else BroadcastLocalizedMessage(class'KFInvasionMessage',1,OtherPRI,,Killer.Pawn.Class);
CheckScore(None);
CheckScore(none);
}
if ( GameRulesModifiers != None )
if ( GameRulesModifiers != none )
GameRulesModifiers.ScoreKill(Killer, Other);
if ( MonsterController(Killer) != None )
if ( MonsterController(Killer) != none )
return;
if( (killer == Other) || (killer == None) )
if( (killer == Other) || (killer == none) )
{
if ( Other.PlayerReplicationInfo != None )
if ( Other.PlayerReplicationInfo != none )
{
Other.PlayerReplicationInfo.Score -= 1;
Other.PlayerReplicationInfo.NetUpdateTime = Level.TimeSeconds - 1;
@ -114,7 +116,7 @@ function ScoreKill(Controller Killer, Controller Other)
}
}
if ( Killer==None || !Killer.bIsPlayer || (Killer==Other) )
if ( Killer==none || !Killer.bIsPlayer || (Killer==Other) )
return;
if ( Other.bIsPlayer )
@ -126,7 +128,7 @@ function ScoreKill(Controller Killer, Controller Other)
ScoreEvent(Killer.PlayerReplicationInfo, -5, "team_frag");
return;
}
if ( LastKilledMonsterClass == None )
if ( LastKilledMonsterClass == none )
KillScore = 1;
else if(Killer.PlayerReplicationInfo !=none)
{
@ -179,9 +181,9 @@ function ScoreKill(Controller Killer, Controller Other)
if( Class'HUDKillingFloor'.Default.MessageHealthLimit<=Other.Pawn.Default.Health ||
Class'HUDKillingFloor'.Default.MessageMassLimit<=Other.Pawn.Default.Mass )
{
for( C=Level.ControllerList; C!=None; C=C.nextController )
for( C=Level.ControllerList; C!=none; C=C.nextController )
{
if( C.bIsPlayer && xPlayer(C)!=None )
if( C.bIsPlayer && xPlayer(C)!=none )
{
xPlayer(C).ReceiveLocalizedMessage(Class'KillsMessage',1,Killer.PlayerReplicationInfo,,Other.Pawn.Class);
}
@ -189,7 +191,7 @@ function ScoreKill(Controller Killer, Controller Other)
}
else
{
if( xPlayer(Killer)!=None )
if( xPlayer(Killer)!=none )
{
xPlayer(Killer).ReceiveLocalizedMessage(Class'KillsMessage',,,,Other.Pawn.Class);
}
@ -261,8 +263,8 @@ function Killed(Controller Killer, Controller Killed, Pawn KilledPawn, class<Dam
AvoidArea = Spawn(class'NiceAvoidMarkerCarnage', killer.pawn);
AvoidArea.SetLocation(KilledPawn.location);
AvoidArea.healthLevel = killedPawn.default.health;
AvoidArea.SetCollisionSize( class'NicePack.NiceSkillEnforcerBrutalCarnageA'.default.avoidRadius,
class'NicePack.NiceSkillEnforcerBrutalCarnageA'.default.avoidRadius);
AvoidArea.SetCollisionSize( class'NiceSkillEnforcerBrutalCarnageA'.default.avoidRadius,
class'NiceSkillEnforcerBrutalCarnageA'.default.avoidRadius);
AvoidArea.StartleBots();
}
// Rest
@ -303,10 +305,31 @@ function int ReduceDamage(int Damage, pawn injured, pawn instigatedBy, vector Hi
}
return Super.ReduceDamage(Damage, injured, InstigatedBy, HitLocation, Momentum, DamageType);
}
// HINTS: override to make fancy loading creen hints
static function string GetLoadingHint(PlayerController pc, string MapName, Color ColorHint)
{
// call super code just to draw the map icon and description
super.GetLoadingHint(pc, MapName, ColorHint);
// return colored and custom HINTS
return class'Utility'.static.GetNiceHint();
}
// HINTS: override to make fancy ingame menu hints
static function array<string> GetAllLoadHints(optional bool bThisClassOnly)
{
return class'Utility'.static.GetNiceHintArray();
}
defaultproperties
{
GameName="Nice Floor"
Description="Nice Edition of ScrN Killing Floor game mode (ScrnGameType)."
// custom player controller
PlayerControllerClass=class'NicePlayerController'
PlayerControllerClassName="NicePack.NicePlayerController"
// skills menu
LoginMenuClass="NicePack.NiceInvasionLoginMenu"
ZedTimeSlomoScale=0.4
LesserZedTimeSlomoScale=0.6
}
}

View file

@ -63,14 +63,17 @@ simulated function bool IsZedExtentionsRecorded(NiceMonster niceZed){
return true;
return false;
}
function ReplaceRequiredEquipment(){
Super.ReplaceRequiredEquipment();
RequiredEquipment[0] = String(class'NicePack.NiceMachete');
RequiredEquipment[1] = String(class'NicePack.Nice9mmPlus');
RequiredEquipment[2] = String(class'ScrnBalanceSrv.ScrnFrag');
RequiredEquipment[3] = String(class'ScrnBalanceSrv.ScrnSyringe');
RequiredEquipment[4] = String(class'KFMod.Welder');
// TODO remove this Scrn func
function ReplaceRequiredEquipment()
{
RequiredEquipment[0] = string(class'NiceMachete');
RequiredEquipment[1] = string(class'Nice9mmPlus');
RequiredEquipment[2] = string(class'ScrnFrag');
RequiredEquipment[3] = string(class'ScrnSyringe');
RequiredEquipment[4] = string(class'KFMod.Welder');
}
simulated function int CalculateCalibrationScore(){
local float accuracy;
accuracy = (float(calibrationHits)) / (float(calibrationTotalShots));
@ -218,16 +221,20 @@ function ServerCooldownAbility(string abilityID){
if(index >= 0)
nicePlayer.abilityManager.SetAbilityState(index, ASTATE_COOLDOWN);
}
simulated function Tick(float deltaTime){
simulated function Tick(float deltaTime)
{
local int index;
local Inventory Item;
local NiceWeapon niceWeap;
local WeaponTimePair newPair;
local array<WeaponTimePair> newWTPList;
local NicePack niceMutator;
local NicePlayerController nicePlayer;
nicePlayer = NicePlayerController(Controller);
if(Role == Role_AUTHORITY){
if (Role == Role_AUTHORITY)
{
// Brutal carnage
if (brutalCranageTimer > 0)
{
@ -326,33 +333,10 @@ simulated function Tick(float deltaTime){
forcedZedTimeCountDown -= deltaTime;
else
forcedZedTimeCountDown = 0.0;
niceMutator = class'NicePack'.static.Myself(Level);
if(niceMutator != none)
niceMutator.ClearWeapProgress();
if(!class'NiceVeterancyTypes'.static.hasSkill(NicePlayerController(Controller), class'NiceSkillEnforcerMultitasker'))
return;
if ( Role < ROLE_Authority && nicePlayer != none
&& nicePlayer.bFlagDisplayWeaponProgress)
{
// Update weapon progress for this skill
if(niceMutator == none) {
Log("Failed to update holstered progress, because no mut! :(");
return;
}
for(Item = Inventory; Item != none; Item = Item.Inventory){
niceWeap = NiceWeapon(Item);
if(niceWeap != none && niceWeap != weapon && !niceWeap.IsMagazineFull()){
niceMutator.AddWeapProgress(niceWeap.class, niceWeap.holsteredCompletition,
true, niceWeap.GetMagazineAmmo());
}
}
return;
}
else if (Role < ROLE_Authority)
{
Log( "Failed to update holstered progress, checked variables:"
@ nicePlayer @ nicePlayer.bFlagDisplayWeaponProgress);
}
// Auto-reload holstered weapons
holsteredReloadCountDown -= deltaTime;
if(holsteredReloadCountDown <= 0.0){
@ -487,19 +471,21 @@ simulated function ClientChangeWeapon(NiceWeapon newWeap){
}
// Validate that client is not hacking.
function bool CanBuyNow(){
local NicePlayerController niceController;
niceController = NicePlayerController(Controller);
if(niceController == none)
function bool CanBuyNow()
{
local NiceGameType NiceGT;
NiceGT = NiceGameType(Level.Game);
if (NicePlayerController(Controller) == none)
return false;
if(NiceGameType(Level.Game) != none && NiceGameType(Level.Game).NicePackMutator != none
&& NiceGameType(Level.Game).NicePackMutator.bIsPreGame)
if (NiceGT != none && NiceGT.NicePackMutator != none
&& NiceGT.NicePackMutator.bIsPreGame)
return true;
if(NiceTSCGame(Level.Game) != none && NiceTSCGame(Level.Game).NicePackMutator != none
&& NiceTSCGame(Level.Game).NicePackMutator.bIsPreGame)
return true;
return Super.CanBuyNow();
// skip Scrn code!
return super(KFPawn).CanBuyNow();
}
// Overridden to not modify dual pistols' weapon group
function bool AddInventory(inventory NewItem){
local KFWeapon weap;
@ -510,7 +496,7 @@ function bool AddInventory(inventory NewItem){
if((DualDeagle(weap) != none || Dual44Magnum(weap) != none || DualMK23Pistol(weap) != none)
&& weap.InventoryGroup != 4 ) {
if(KFPRI != none &&
ClassIsChildOf(KFPRI.ClientVeteranSkill, class'ScrnBalanceSrv.ScrnVetGunslinger'))
ClassIsChildOf(KFPRI.ClientVeteranSkill, class'ScrnVetGunslinger'))
weap.InventoryGroup = 3;
else
weap.InventoryGroup = 2;
@ -555,16 +541,21 @@ simulated function CookGrenade(){
niceWeap.ClientGrenadeState = GN_TempDown;
niceWeap.PutDown();
}
simulated function ThrowGrenade(){
simulated function ThrowGrenade()
{
local NiceWeapon niceWeap;
niceWeap = NiceWeapon(Weapon);
if(niceWeap != none)
niceWeap.ClientForceInterruptReload(CANCEL_NADE);
if(bThrowingNade || SecondaryItem != none)
return;
if( niceWeap == none
|| (niceWeap.bIsReloading && !niceWeap.InterruptReload()))
return;
if(niceWeap == none || (niceWeap.bIsReloading && !niceWeap.InterruptReload()))
{
super.ThrowGrenade();
return;
}
if(playerGrenade == none)
playerGrenade = FindPlayerGrenade();
if(playerGrenade != none && playerGrenade.HasAmmo()){
@ -863,6 +854,40 @@ simulated function AltFire(optional float F){
super.AltFire(F);
}
// added copy-cated function to disable some log
simulated function Setup(xUtil.PlayerRecord rec, optional bool bLoadNow)
{
local ScrnPlayerController PC;
local string CN;
PC = ScrnPlayerController(Controller);
if ( PC != none && IsLocallyControlled() )
{
// check this only on player side, because it stores
// RedCharacter & BlueCharacter in the config
CN = rec.DefaultName;
if ( !PC.ValidateCharacter(CN) ) {
// character invalid, change it valid one, which was set up in ValidateCharacter()
rec = class'xUtil'.static.FindPlayerRecord(CN);
PC.ChangeCharacter(CN);
}
}
super(KFPawn).Setup(rec, bLoadNow);
if( class<SoldierSpeciesRobot>(Species) != none )
{
BreathingSound = class'KFDARSoundGroup'.default.BreathingSound;
}
else if( class<AshHardingSpecies>(Species) != none )
{
BreathingSound = class'KFFemaleSoundGroup'.default.BreathingSound;
}
// disable the log!!!
// log(BreathingSound);
}
defaultproperties
{
defaultInvincibilityDuration=2.000000

View file

@ -35,11 +35,10 @@ var config bool bNoLateFFIncrease; // Disables FF increase through
// Configuration variables that store whether or not to replace the specimen with it's mean counterpart
var config bool bReplaceCrawler, bReplaceStalker, bReplaceClot, bReplaceGorefast, bReplaceBloat, bReplaceSiren, bReplaceHusk, bReplaceScrake, bReplaceFleshpound;
var config int bigZedMinHealth; // If zed's base Health >= this value, zed counts as Big
var config int mediumZedMinHealth;
var config int mediumZedMinHealth;
var int maxPlayersInGame;
var bool bSpawnRateEnforced; // Set to true after spawn rate was altered
// 'Adrenaline junkie' zed-time extensions
var int junkieDoneGoals; // How many times we collected enough head-shots to trigger zed-time extension
var int junkieNextGoal; // How many head-shots we need for next zed-time extension
@ -54,11 +53,9 @@ var int deadBodyCounter;
var ScrnBalance ScrnMut;
var ScrnGameType ScrnGT;
var NiceGameType NiceGT;
var NiceTSCGame NiceTSC;
var NicePack Mut;
var NiceRules GameRules;
var NiceStorageServer serverStorage;
var bool bClientLinkEstablished;
var bool interactionAdded;
var bool bIsPreGame;
var bool bIsTraderTime;
@ -98,15 +95,7 @@ struct CounterDisplay{
var class<NiceSkill> ownerSkill;
};
var array<CounterDisplay> niceCounterSet;
struct WeaponProgressDisplay{
var class<NiceWeapon> weapClass;
var float progress;
var bool bShowCounter;
var int counter;
};
var array<WeaponProgressDisplay> niceWeapProgressSet;
// Map Description array
var const array<localized string> NiceUniversalDescriptions[4];
// Replication of config between player and server
var int SrvFlags;
var array<NicePlayerController> playersList;
@ -136,7 +125,7 @@ static final function NicePack Myself(LevelInfo Level){
local Mutator M;
local NicePack NicePackMutator;
if(default.Mut != none)
return default.Mut;
return default.Mut;
// server-side
if(Level != none && Level.Game != none){
for(M = Level.Game.BaseMutator;M != none;M = M.NextMutator){
@ -165,189 +154,76 @@ function PreBeginPlay()
AddToPackageMap("NicePackSnd.uax");
AddToPackageMap("NicePackT.utx");
}
simulated function PostBeginPlay(){
local int i;
local ZedRecord record;
simulated function PostBeginPlay()
{
local ScrnVotingHandlerMut VH;
local MeanVoting VO;
local NiceFFVoting FFVO;
super.PostBeginPlay();
class'ScrnLightVestPickup'.default.cost = 50;
class'ScrnHorzineVestPickup'.default.weight = 2;
class'ScrnHorzineVestPickup'.default.cost = 750;
class'NicePack'.default.Mut = self;
// Gun skins
class'NicePack.NiceMaulerPickup'.default.VariantClasses[class'NicePack.NiceMaulerPickup'.default.VariantClasses.length] = class'ScrnBalanceSrv.ScrnSPSniperPickup';
class'NicePack.NiceDeaglePickup'.default.VariantClasses[class'NicePack.NiceDeaglePickup'.default.VariantClasses.length] = class'NicePack.SkinExecutionerPickup';
class'NicePack.NiceDualDeaglePickup'.default.VariantClasses[class'NicePack.NiceDualDeaglePickup'.default.VariantClasses.length] = class'NicePack.SkinDualExecutionerPickup';
class'NicePack.NiceMagnumPickup'.default.VariantClasses[class'NicePack.NiceMagnumPickup'.default.VariantClasses.length] = class'NicePack.SkinCowboyMagnumPickup';
class'NicePack.NiceDualMagnumPickup'.default.VariantClasses[class'NicePack.NiceDualMagnumPickup'.default.VariantClasses.length] = class'NicePack.SkinDualCowboyMagnumPickup';
class'NicePack.NiceWinchesterPickup'.default.VariantClasses[class'NicePack.NiceWinchesterPickup'.default.VariantClasses.length] = class'NicePack.SkinRetroLARPickup';
class'NicePack.NiceM14EBRPickup'.default.VariantClasses[class'NicePack.NiceM14EBRPickup'.default.VariantClasses.length] = class'NicePack.SkinM14EBR2ProPickup';
class'ScrnBalanceSrv.ScrnKrissMPickup'.default.VariantClasses[class'ScrnBalanceSrv.ScrnKrissMPickup'.default.VariantClasses.length] = class'NicePack.SkinGoldenKrissPickup';
class'NicePack.NiceSCARMK17Pickup'.default.VariantClasses[class'NicePack.NiceSCARMK17Pickup'.default.VariantClasses.length] = class'NicePack.SkinCamoSCARMK17Pickup';
// Abilities
class'NiceAbilityManager'.default.events.static.AddAdapter(class'NiceSharpshooterAbilitiesAdapter', level);
class'NiceAbilityManager'.default.events.static.AddAdapter(class'NiceEnforcerAbilitiesAdapter', level);
SetTimer(0.25, true);
if(Role < ROLE_Authority)
if (Role < ROLE_Authority)
return;
// Create sync node
serverStorage = new class'NicePack.NiceStorageServer';
serverStorage = new class'NiceStorageServer';
default.serverStorage = serverStorage;
serverStorage.events.static.AddAdapter(class'NiceRemoteDataAdapter', Level);
// Find game type and ScrN mutator
ScrnGT = ScrnGameType(Level.Game);
ScrnGT = ScrnGameType(Level.Game);
NiceGT = NiceGameType(Level.Game);
NiceTSC = NiceTSCGame(Level.Game);
if(ScrnGT == none){
Log("ERROR: Wrong GameType (requires at least ScrnGameType)", Class.Outer.Name);
if (NiceGT == none)
{
Log("ERROR: Wrong GameType (requires NiceGameType)", class.Outer.Name);
Destroy();
return;
}
// Skills menu
ScrnGT.LoginMenuClass = string(Class'NicePack.NiceInvasionLoginMenu');
if(NiceGT != none)
NiceGT.RegisterMutator(Self);
if(NiceTSC != none)
NiceTSC.RegisterMutator(Self);
ScrnMut = ScrnGT.ScrnBalanceMut;
// FIXME poosh forces this variable in his mutator...
NiceGT.LoginMenuClass = string(class'NiceInvasionLoginMenu');
NiceGT.RegisterMutator(self);
ScrnMut = NiceGT.ScrnBalanceMut;
if(bReplacePickups)
ScrnMut.bReplacePickups = false;
// Replication of some variables
SetReplicationData();
// New player controller class
if(!ClassIsChildOf(ScrnGT.PlayerControllerClass, class'NicePack.NicePlayerController')){
ScrnGT.PlayerControllerClass = class'NicePack.NicePlayerController';
ScrnGT.PlayerControllerClassName = string(Class'NicePack.NicePlayerController');
}
// Game rules
GameRules = Spawn(Class'NicePack.NiceRules', self);
GameRules = Spawn(class'NiceRules', self);
// -- Lower starting HL
ScrnMut.GameRules.HardcoreLevel -= 7;
ScrnMut.GameRules.HardcoreLevelFloat -= 7;
// -- Fill-in zed info
i = 0;
// - Clot
record.ZedName = "Clot";
record.ZedType = class'NicePack.NiceZombieClot';
record.MeanZedType = class'NicePack.MeanZombieClot';
record.HL = 0.0;
record.MeanHLBonus = 0.5;
record.bNeedsReplacement = bReplaceClot;
ZedDatabase[i++] = record;
ZedDatabase[0].bNeedsReplacement = bReplaceClot;
// - Crawler
record.ZedName = "Crawler";
record.ZedType = class'NicePack.NiceZombieCrawler';
record.MeanZedType = class'NicePack.MeanZombieCrawler';
record.HL = 0.5;
record.MeanHLBonus = 1.5;
record.bNeedsReplacement = bReplaceCrawler;
ZedDatabase[i++] = record;
ZedDatabase[1].bNeedsReplacement = bReplaceCrawler;
// - Stalker
record.ZedName = "Stalker";
record.ZedType = class'NicePack.NiceZombieStalker';
record.MeanZedType = class'NicePack.MeanZombieStalker';
record.HL = 0.5;
record.MeanHLBonus = 0.5;
record.bNeedsReplacement = bReplaceStalker;
ZedDatabase[i++] = record;
ZedDatabase[2].bNeedsReplacement = bReplaceStalker;
// - Gorefast
record.ZedName = "Gorefast";
record.ZedType = class'NicePack.NiceZombieGorefast';
record.MeanZedType = class'NicePack.MeanZombieGorefast';
record.HL = 0.0;
record.MeanHLBonus = 0.5;
record.bNeedsReplacement = bReplaceGorefast;
ZedDatabase[i++] = record;
ZedDatabase[3].bNeedsReplacement = bReplaceGorefast;
// - Bloat
record.ZedName = "Bloat";
record.ZedType = class'NicePack.NiceZombieBloat';
record.MeanZedType = class'NicePack.MeanZombieBloat';
record.HL = 0.0;
record.MeanHLBonus = 0.5;
record.bNeedsReplacement = bReplaceBloat;
ZedDatabase[i++] = record;
ZedDatabase[4].bNeedsReplacement = bReplaceBloat;
// - Siren
record.ZedName = "Siren";
record.ZedType = class'NicePack.NiceZombieSiren';
record.MeanZedType = class'NicePack.MeanZombieSiren';
record.HL = 1.0;
record.MeanHLBonus = 1.0;
record.bNeedsReplacement = bReplaceSiren;
ZedDatabase[i++] = record;
ZedDatabase[5].bNeedsReplacement = bReplaceSiren;
// - Husk
record.ZedName = "Husk";
record.ZedType = class'NicePack.NiceZombieHusk';
record.MeanZedType = class'NicePack.MeanZombieHusk';
record.HL = 1.0;
record.MeanHLBonus = 1.5;
record.bNeedsReplacement = bReplaceHusk;
ZedDatabase[i++] = record;
ZedDatabase[6].bNeedsReplacement = bReplaceHusk;
// - Scrake
record.ZedName = "Scrake";
record.ZedType = class'NicePack.NiceZombieScrake';
record.MeanZedType = class'NicePack.MeanZombieScrake';
record.HL = 1.5;
record.MeanHLBonus = 1.5;
record.bNeedsReplacement = bReplaceScrake;
ZedDatabase[i++] = record;
ZedDatabase[7].bNeedsReplacement = bReplaceScrake;
// - Fleshpound
lastStandardZed = i;
record.ZedName = "Fleshpound";
record.ZedType = class'NicePack.NiceZombieFleshPound';
record.MeanZedType = class'NicePack.MeanZombieFleshPound';
record.HL = 2.5;
record.MeanHLBonus = 1.5;
record.bNeedsReplacement = bReplaceFleshpound;
ZedDatabase[i++] = record;
// - Shiver
record.ZedName = "Shiver";
record.ZedType = class'NicePack.NiceZombieShiver';
record.MeanZedType = none;
record.HL = 1;
record.bNeedsReplacement = false;
ZedDatabase[i++] = record;
// - Jason
record.ZedName = "Jason";
record.ZedType = class'NicePack.NiceZombieJason';
record.MeanZedType = none;
record.HL = 1.5;
record.bNeedsReplacement = false;
ZedDatabase[i++] = record;
// - Tesla Husk
record.ZedName = "Tesla husk";
record.ZedType = class'NicePack.NiceZombieTeslaHusk';
record.MeanZedType = none;
record.HL = 1.5;
record.bNeedsReplacement = false;
ZedDatabase[i++] = record;
// - Brute
record.ZedName = "Brute";
record.ZedType = class'NicePack.NiceZombieBrute';
record.MeanZedType = none;
record.HL = 2;
record.bNeedsReplacement = false;
ZedDatabase[i++] = record;
// - Ghost
record.ZedName = "Ghost";
record.ZedType = class'NicePack.NiceZombieGhost';
record.MeanZedType = none;
record.HL = 0.5;
record.bNeedsReplacement = false;
ZedDatabase[i++] = record;
// - Sick
record.ZedName = "Sick";
record.ZedType = class'NicePack.NiceZombieSick';
record.MeanZedType = none;
record.HL = 1.0;
record.bNeedsReplacement = false;
ZedDatabase[i++] = record;
// Nothing has yet spawned
for(i = 0;i < ZedDatabase.length;i ++){
ZedDatabase[i].bAlreadySpawned = false;
ZedDatabase[i].bMeanAlreadySpawned = false;
}
ZedDatabase[8].bNeedsReplacement = bReplaceFleshpound;
// FIXME!!!
lastStandardZed = 8;
// Add voting for mean zeds
VH = class'ScrnVotingHandlerMut'.static.GetVotingHandler(Level.Game);
if(VH == none){
@ -362,28 +238,33 @@ simulated function PostBeginPlay(){
if(FFVO != none)
FFVO.Mut = self;
}
else
else
log("Unable to spawn voting handler mutator", class.outer.name);
}
simulated function PostNetBeginPlay()
{
super.PostNetBeginPlay();
if(Role < ROLE_Authority)
if (Role < ROLE_Authority)
LoadReplicationData();
}
function SetReplicationData(){
SrvFlags = 0;
if(bInitialTrader)
SrvFlags = SrvFlags | 0x00000001;
if(bStillDuringInitTrader)
SrvFlags = SrvFlags | 0x00000002;
}
simulated function LoadReplicationData(){
if(Role == ROLE_Authority)
return;
simulated function LoadReplicationData()
{
bInitialTrader = (SrvFlags & 0x00000001) > 0;
bStillDuringInitTrader = (SrvFlags & 0x00000002) > 0;
}
function SetReplicationData()
{
SrvFlags = 0;
if (bInitialTrader)
SrvFlags = SrvFlags | 0x00000001;
if (bStillDuringInitTrader)
SrvFlags = SrvFlags | 0x00000002;
}
simulated function Timer(){
local KFHumanPawn nextPawn;
local int currentPlayersMax;
@ -413,56 +294,90 @@ simulated function Timer(){
}
maxPlayersInGame = Max(maxPlayersInGame, currentPlayersMax);
}
simulated function Tick(float Delta){
local int i;
local NiceInteraction niceInt;
local NicePlayerController localPlayer;
super.Tick(Delta);
if(ScrnGT != none && ScrnGT.WaveCountDown <= 5)
bIsPreGame = false;
if(ScrnMut != none && !bSpawnRateEnforced && ScrnMut.bTickExecuted){
bSpawnRateEnforced = true;
ScrnMut.OriginalWaveSpawnPeriod = FMax(minSpawnRate, FMin(maxSpawnRate, ScrnMut.OriginalWaveSpawnPeriod));
// initial tick, does some job and shuts down
auto state loadInteractionnSpawnRate
{
// state tick, overrides global
simulated function Tick(float Delta)
{
local NiceInteraction niceInt;
local NicePlayerController localPlayer;
if (level.netMode == NM_DedicatedServer)
{
// set spawn rate!
if (ScrnMut != none)
ScrnMut.OriginalWaveSpawnPeriod = FMax(minSpawnRate, FMin(maxSpawnRate, ScrnMut.OriginalWaveSpawnPeriod));
// do not execute below code on dedicated servers!
GoToState('');
DisableServerGlobalTick();
return;
}
localPlayer = NicePlayerController(Level.GetLocalPlayerController());
if (localPlayer == none)
return;
// spawn some magic
if (localPlayer.storageClient != none && localPlayer.remoteRI != none)
{
localPlayer.storageClient.remoteRI = localPlayer.remoteRI;
localPlayer.storageClient.events.static.CallLinkEstablished();
}
// Actually add the interaction
niceInt = NiceInteraction(localPlayer.Player.InteractionMaster.AddInteraction(string(class'NiceInteraction'), localPlayer.Player));
niceInt.RegisterMutator(Self);
// break this state and go to global
GoToState('');
}
}
// disable tick for servers!
final private function DisableServerGlobalTick()
{
Disable('Tick');
}
// global tick
simulated function Tick(float Delta)
{
local int i;
local NicePlayerController localPlayer;
localPlayer = NicePlayerController(Level.GetLocalPlayerController());
// Check if the local PlayerController is available yet
if(localPlayer == none)
if (localPlayer == none)
return;
if( Role < Role_AUTHORITY && !bClientLinkEstablished
&& localPlayer.storageClient != none && localPlayer.remoteRI != none){
bClientLinkEstablished = true;
localPlayer.storageClient.remoteRI = localPlayer.remoteRI;
localPlayer.storageClient.events.static.CallLinkEstablished();
}
if(localPlayer.bFlagDisplayCounters){
for(i = 0;i < niceCounterSet.Length;i ++){
if(niceCounterSet[i].ownerSkill == none)
niceCounterSet[i].value = UpdateCounterValue(niceCounterSet[i].cName);
else if(class'NiceVeterancyTypes'.static.hasSkill(localPlayer, niceCounterSet[i].ownerSkill))
niceCounterSet[i].value = niceCounterSet[i].ownerSkill.static.
if (localPlayer.bFlagDisplayCounters)
{
for (i = 0; i < niceCounterSet.Length; i++)
{
if (niceCounterSet[i].ownerSkill == none)
niceCounterSet[i].value = UpdateCounterValue(niceCounterSet[i].cName);
else if(class'NiceVeterancyTypes'.static.hasSkill(localPlayer, niceCounterSet[i].ownerSkill))
niceCounterSet[i].value = niceCounterSet[i].ownerSkill.static.
UpdateCounterValue(niceCounterSet[i].cName, localPlayer);
else
niceCounterSet[i].value = 0;
}
else
niceCounterSet[i].value = 0;
}
}
// Reset tick counter for traces
localPlayer.tracesThisTick = 0;
// Manage resetting of effects' limits
if(Level.TimeSeconds >= localPlayer.nextEffectsResetTime){
localPlayer.nextEffectsResetTime = Level.TimeSeconds + 0.1;
localPlayer.currentEffectTimeWindow ++;
if(localPlayer.currentEffectTimeWindow >= 10)
localPlayer.currentEffectTimeWindow = 0;
localPlayer.effectsSpawned[localPlayer.currentEffectTimeWindow] = 0;
if (Level.TimeSeconds >= localPlayer.nextEffectsResetTime)
{
localPlayer.nextEffectsResetTime = Level.TimeSeconds + 0.1;
localPlayer.currentEffectTimeWindow ++;
if (localPlayer.currentEffectTimeWindow >= 10)
localPlayer.currentEffectTimeWindow = 0;
localPlayer.effectsSpawned[localPlayer.currentEffectTimeWindow] = 0;
}
// Add interaction
if(interactionAdded)
return;
// Actually add the interaction
niceInt = NiceInteraction(localPlayer.Player.InteractionMaster.AddInteraction("NicePack.NiceInteraction", localPlayer.Player));
niceInt.RegisterMutator(Self);
interactionAdded = true;
}
simulated function bool CheckReplacement(Actor Other, out byte bSuperRelevant){
local int i;
local NiceMonster niceMonster;
@ -472,15 +387,14 @@ simulated function bool CheckReplacement(Actor Other, out byte bSuperRelevant){
local NicePlayerController playerContr;
local NiceRepInfoRemoteData remoteRI;
local NiceReplicationInfo niceRI;
local MeanReplicationInfo meanRI;
local PlayerReplicationInfo pri;
// Replace loot on levels
if(Other.class == class'KFRandomItemSpawn' || Other.class == class'ScrnBalanceSrv.ScrnRandomItemSpawn'){
ReplaceWith(Other, "NicePack.NiceRandomItemSpawn");
if(Other.class == class'KFRandomItemSpawn' || Other.class == class'ScrnRandomItemSpawn'){
ReplaceWith(Other, string(class'NiceRandomItemSpawn'));
return false;
}
else if(Other.class == class'KFAmmoPickup' || Other.class == class'ScrnBalanceSrv.ScrnAmmoPickup') {
ReplaceWith(Other, "NicePack.NiceAmmoPickup");
else if(Other.class == class'KFAmmoPickup' || Other.class == class'ScrnAmmoPickup') {
ReplaceWith(Other, string(class'NiceAmmoPickup'));
return false;
}
else if(bReplacePickups && Pickup(Other) != none){
@ -497,8 +411,6 @@ simulated function bool CheckReplacement(Actor Other, out byte bSuperRelevant){
niceRI = spawn(class'NiceReplicationInfo', pri.Owner);
niceRI.Mut = self;
remoteRI = spawn(class'NiceRepInfoRemoteData', pri.Owner);
meanRI = spawn(class'MeanReplicationInfo', pri.Owner);
meanRI.ownerPRI = pri;
playerContr = NicePlayerController(PlayerReplicationInfo(Other).Owner);
playerContr.niceRI = niceRI;
playerContr.remoteRI = remoteRI;
@ -520,7 +432,7 @@ simulated function bool CheckReplacement(Actor Other, out byte bSuperRelevant){
currNumPlayers++;
if(boss == none) {
niceMonster.Health *= hpScale(niceMonster.PlayerCountHealthScale) / niceMonster.NumPlayersHealthModifer();
niceMonster.HealthMax = niceMonster.Health;
niceMonster.HealthMax = niceMonster.Health;
niceMonster.HeadHealth *= hpScale(niceMonster.PlayerNumHeadHealthScale) / niceMonster.NumPlayersHeadHealthModifer();
niceMonster.HeadHealthMax = niceMonster.HeadHealth;
if(Level.Game.NumPlayers == 1){
@ -538,7 +450,7 @@ function int FindPickupReplacementIndex(Pickup item)
{
local int i;
for(i=0; i < pickupReplaceArray.length;i ++){
if(pickupReplaceArray[i].vanillaClass == item.class || pickupReplaceArray[i].scrnClass == item.class)
if(pickupReplaceArray[i].vanillaClass == item.class || pickupReplaceArray[i].scrnClass == item.class)
return i;
}
return -1;
@ -584,18 +496,7 @@ simulated function int GetVisibleCountersAmount(){
simulated function int UpdateCounterValue(string cName){
return 0;
}
simulated function AddWeapProgress(class<NiceWeapon> weapClass, float progress,
optional bool bShowCounter, optional int counter){
local WeaponProgressDisplay newProgress;
newProgress.weapClass = weapClass;
newProgress.progress = progress;
newProgress.bShowCounter = bShowCounter;
newProgress.counter = counter;
niceWeapProgressSet[niceWeapProgressSet.Length] = newProgress;
}
simulated function ClearWeapProgress(){
niceWeapProgressSet.Length = 0;
}
// Returns cash per wave based on current difficulty
// Returns cash per wave based on current difficulty
function int GetWaveCash(int lastCashWave, int nextWave){
@ -626,7 +527,9 @@ function GiveProgressiveDosh(NicePlayerController nicePlayer){
record.lastCashWave = nextWave;
UpdatePlayerRecord(record);
}
simulated function Mutate(string MutateString, PlayerController kfPlayer){
simulated function Mutate(string MutateString, PlayerController kfPlayer)
{
local int i, readLenght;
local NicePlayerController nicePlayer;
local NiceServerData remoteData;
@ -640,10 +543,13 @@ simulated function Mutate(string MutateString, PlayerController kfPlayer){
// Always contains at least 10 elements, that may be empty strings if there wasn't enough modifiers.
// Done for safe access without the need to check for bounds.
local array<String> modArray;
super.Mutate(MutateString, kfPlayer);
// Helpful sequence
white = chr(27)$chr(200)$chr(200)$chr(200);
// Transform our command into array for convenience
wordsArray = SplitString(MutateString, " ");
Split(MutateString, " ", wordsArray);
// Exit if command is empty
if(wordsArray.Length == 0)
return;
@ -738,7 +644,6 @@ simulated function Mutate(string MutateString, PlayerController kfPlayer){
nicePlayer.ClientMessage("Compressed lenght:" @ string(inputStream.GetSizeInBytes()) );
nicePlayer.ClientMessage("Output:"@outputStream.ReadClassName(readLenght));
}
Super.Mutate(MutateString, kfPlayer);
}
/* Good test for writer
else if(command ~= "TEST"){
@ -926,48 +831,7 @@ function BroadcastSkills(){
}
}
}
// Function for string splitting, because why would we have it as a standard function? It would be silly, right?
function array<string> SplitString(string inputString, string div){
local array<string> parts;
local bool bEOL;
local string tempChar;
local int preCount, curCount, partCount, strLength;
strLength = Len(inputString);
if(strLength == 0)
return parts;
bEOL = false;
preCount = 0;
curCount = 0;
partCount = 0;
while(!bEOL)
{
tempChar = Mid(inputString, curCount, 1);
if(tempChar != div)
curCount ++;
else
{
if(curCount == preCount)
{
curCount ++;
preCount ++;
}
else
{
parts[partCount] = Mid(inputString, preCount, curCount - preCount);
partCount ++;
preCount = curCount + 1;
curCount = preCount;
}
}
if(curCount == strLength)
{
if(preCount != strLength)
parts[partCount] = Mid(inputString, preCount, curCount);
bEOL = true;
}
}
return parts;
}
// Function for broadcasting messages to players
function BroadcastToAll(string message){
local Controller P;
@ -1037,8 +901,34 @@ static function string GetDescriptionText(string SettingName){
}
return Super.GetDescriptionText(SettingName);
}
defaultproperties
{
GroupName="KFNicePack"
FriendlyName="Package for nice/mean servers"
Description="Does stuff."
bAlwaysRelevant=True
RemoteRole=ROLE_SimulatedProxy
bAddToServerPackages=True
// used in scrn voting and HL calculation
// TODO remove HL!
ZedDatabase(00)=(ZedName="Clot",ZedType=class'NiceZombieClot',MeanZedType=class'MeanZombieClot',HL=0.0,MeanHLBonus=0.5)
ZedDatabase(01)=(ZedName="Crawler",ZedType=class'NiceZombieCrawler',MeanZedType=class'MeanZombieCrawler',HL=0.5,MeanHLBonus=1.5)
ZedDatabase(02)=(ZedName="Stalker",ZedType=class'NiceZombieStalker',MeanZedType=class'MeanZombieStalker',HL=0.5,MeanHLBonus=0.5)
ZedDatabase(03)=(ZedName="Gorefast",ZedType=class'NiceZombieGorefast',MeanZedType=class'MeanZombieGorefast',HL=0.0,MeanHLBonus=0.5)
ZedDatabase(04)=(ZedName="Bloat",ZedType=class'NiceZombieBloat',MeanZedType=class'MeanZombieBloat',HL=0.0,MeanHLBonus=0.5)
ZedDatabase(05)=(ZedName="Siren",ZedType=class'NiceZombieSiren',MeanZedType=class'MeanZombieSiren',HL=1.0,MeanHLBonus=1.0)
ZedDatabase(06)=(ZedName="Husk",ZedType=class'NiceZombieHusk',MeanZedType=class'MeanZombieHusk',HL=1.0,MeanHLBonus=1.5)
ZedDatabase(07)=(ZedName="Scrake",ZedType=class'NiceZombieScrake',MeanZedType=class'MeanZombieScrake',HL=1.5,MeanHLBonus=1.5)
ZedDatabase(08)=(ZedName="Fleshpound",ZedType=class'NiceZombieFleshPound',MeanZedType=class'MeanZombieFleshPound',HL=2.5,MeanHLBonus=1.5)
ZedDatabase(09)=(ZedName="Shiver",ZedType=class'NiceZombieShiver',HL=1.0)
ZedDatabase(10)=(ZedName="Jason",ZedType=class'NiceZombieJason',HL=1.5)
ZedDatabase(11)=(ZedName="Tesla Husk",ZedType=class'NiceZombieTeslaHusk',HL=1.5)
ZedDatabase(12)=(ZedName="Brute",ZedType=class'NiceZombieBrute',HL=2.0)
ZedDatabase(13)=(ZedName="Ghost",ZedType=class'NiceZombieGhost',HL=0.5)
ZedDatabase(14)=(ZedName="Sick",ZedType=class'NiceZombieSick',HL=1.0)
bScaleZedHealth=True
bReplacePickups=True
bInitialTrader=True
@ -1071,26 +961,19 @@ defaultproperties
bNoLateFFIncrease=True
junkieNextGoal=1
bIsPreGame=True
pickupReplaceArray(0)=(vanillaClass=Class'KFMod.MAC10Pickup',scrnClass=Class'ScrnBalanceSrv.ScrnMAC10Pickup',NewClass=Class'NicePack.NiceMAC10Pickup')
pickupReplaceArray(1)=(vanillaClass=Class'KFMod.WinchesterPickup',scrnClass=Class'ScrnBalanceSrv.ScrnWinchesterPickup',NewClass=Class'NicePack.NiceWinchesterPickup')
pickupReplaceArray(2)=(vanillaClass=Class'KFMod.CrossbowPickup',scrnClass=Class'ScrnBalanceSrv.ScrnCrossbowPickup',NewClass=Class'NicePack.NiceCrossbowPickup')
pickupReplaceArray(3)=(vanillaClass=Class'KFMod.SPSniperPickup',scrnClass=Class'ScrnBalanceSrv.ScrnSPSniperPickup',NewClass=Class'NicePack.NiceMaulerPickup')
pickupReplaceArray(4)=(vanillaClass=Class'KFMod.M14EBRPickup',scrnClass=Class'ScrnBalanceSrv.ScrnM14EBRPickup',NewClass=Class'NicePack.NiceM14EBRPickup')
pickupReplaceArray(5)=(vanillaClass=Class'KFMod.M99Pickup',scrnClass=Class'ScrnBalanceSrv.ScrnM99Pickup',NewClass=Class'NicePack.NiceM99Pickup')
pickupReplaceArray(6)=(vanillaClass=Class'KFMod.ShotgunPickup',scrnClass=Class'ScrnBalanceSrv.ScrnShotgunPickup',NewClass=Class'NicePack.NiceShotgunPickup')
pickupReplaceArray(7)=(vanillaClass=Class'KFMod.BoomStickPickup',scrnClass=Class'ScrnBalanceSrv.ScrnBoomStickPickup',NewClass=Class'NicePack.NiceBoomStickPickup')
pickupReplaceArray(8)=(vanillaClass=Class'KFMod.NailGunPickup',scrnClass=Class'ScrnBalanceSrv.ScrnNailGunPickup',NewClass=Class'NicePack.NiceNailGunPickup')
pickupReplaceArray(9)=(vanillaClass=Class'KFMod.KSGPickup',scrnClass=Class'ScrnBalanceSrv.ScrnKSGPickup',NewClass=Class'NicePack.NiceKSGPickup')
pickupReplaceArray(10)=(vanillaClass=Class'KFMod.BenelliPickup',scrnClass=Class'ScrnBalanceSrv.ScrnBenelliPickup',NewClass=Class'NicePack.NiceBenelliPickup')
pickupReplaceArray(11)=(vanillaClass=Class'KFMod.AA12Pickup',scrnClass=Class'ScrnBalanceSrv.ScrnAA12Pickup',NewClass=Class'NicePack.NiceAA12Pickup')
NiceUniversalDescriptions(0)="Survive on %m in ScrN Balance mode"
NiceUniversalDescriptions(1)="Survive on %m in ScrN Balance mode with Hardcore Level 5+"
NiceUniversalDescriptions(2)="Survive on %m in ScrN Balance mode with Hardcore Level 10+"
NiceUniversalDescriptions(3)="Survive on %m in ScrN Balance mode with Hardcore Level 15+"
bAddToServerPackages=True
GroupName="KFNicePack"
FriendlyName="Package for nice/mean servers"
Description="Does stuff."
bAlwaysRelevant=True
RemoteRole=ROLE_SimulatedProxy
}
// replace pickups that map spawn's itself
pickupReplaceArray(00)=(vanillaClass=Class'KFMod.MAC10Pickup',scrnClass=Class'ScrnMAC10Pickup',NewClass=class'NiceMAC10Pickup')
pickupReplaceArray(01)=(vanillaClass=Class'KFMod.WinchesterPickup',scrnClass=Class'ScrnWinchesterPickup',NewClass=class'NiceWinchesterPickup')
pickupReplaceArray(02)=(vanillaClass=Class'KFMod.CrossbowPickup',scrnClass=Class'ScrnCrossbowPickup',NewClass=class'NiceCrossbowPickup')
pickupReplaceArray(03)=(vanillaClass=Class'KFMod.SPSniperPickup',scrnClass=Class'ScrnSPSniperPickup',NewClass=class'NiceMaulerPickup')
pickupReplaceArray(04)=(vanillaClass=Class'KFMod.M14EBRPickup',scrnClass=Class'ScrnM14EBRPickup',NewClass=class'NiceM14EBRPickup')
pickupReplaceArray(05)=(vanillaClass=Class'KFMod.M99Pickup',scrnClass=Class'ScrnM99Pickup',NewClass=class'NiceM99Pickup')
pickupReplaceArray(06)=(vanillaClass=Class'KFMod.ShotgunPickup',scrnClass=Class'ScrnShotgunPickup',NewClass=class'NiceShotgunPickup')
pickupReplaceArray(07)=(vanillaClass=Class'KFMod.BoomStickPickup',scrnClass=Class'ScrnBoomStickPickup',NewClass=class'NiceBoomStickPickup')
pickupReplaceArray(08)=(vanillaClass=Class'KFMod.NailGunPickup',scrnClass=Class'ScrnNailGunPickup',NewClass=class'NiceNailGunPickup')
pickupReplaceArray(09)=(vanillaClass=Class'KFMod.KSGPickup',scrnClass=Class'ScrnKSGPickup',NewClass=class'NiceKSGPickup')
pickupReplaceArray(10)=(vanillaClass=Class'KFMod.BenelliPickup',scrnClass=Class'ScrnBenelliPickup',NewClass=class'NiceBenelliPickup')
pickupReplaceArray(11)=(vanillaClass=Class'KFMod.AA12Pickup',scrnClass=Class'ScrnAA12Pickup',NewClass=class'NiceAA12Pickup')
pickupReplaceArray(12)=(vanillaClass=Class'KFMod.MachetePickup',scrnClass=Class'ScrnMachetePickup',NewClass=class'NiceMachetePickup')
}

View file

@ -2,6 +2,8 @@ class NicePlayerController extends ScrnPlayerController
config(NiceUser)
dependson(NicePack)
dependson(NiceFire);
var globalconfig int ZedHPBarStyle; // 0 - big zeds, 1 - all, 2 - disabled
var globalconfig int nicePlayerInfoVersionNumber;
// These are values stored in a settings file
var globalconfig bool bDebug;
@ -134,16 +136,17 @@ replication{
ServerSetHLMessages, ServerMarkSettingsLoaded, ServerStartleZeds, ServerSetDisplayCounters,
ServerSetDisplayWeaponProgress, ActivateAbility;
}
// Called on server only!
function PostLogin(){
function PostLogin()
{
local NicePack.PlayerRecord record;
local NiceGameType NiceGT;
local NiceTSCGame TSCGT;
local ScrnCustomPRI ScrnPRI;
Super.PostLogin();
// Restore data
NiceGT = NiceGameType(Level.Game);
TSCGT = NiceTSCGame(Level.Game);
ScrnPRI = class'ScrnCustomPRI'.static.FindMe(PlayerReplicationInfo);
if(ScrnPRI != none)
SteamID64 = ScrnPRI.GetSteamID64();
@ -167,6 +170,7 @@ function PostLogin(){
// Spawn ability manager
abilityManager = Spawn(class'NiceAbilityManager', self);
}
simulated function ClientPostLogin(){
local int i, j, k;
local bool bEntryExists;
@ -198,7 +202,7 @@ simulated function ClientPostLogin(){
playedWithDatabase = newPlayedWithData;
UpdateDefaultWeaponSettings();
// Create sync node
storageClient = new class'NicePack.NiceStorageClient';
storageClient = new class'NiceStorageClient';
storageClient.events.static.AddAdapter(class'NiceRemoteDataAdapter', level);
// Init collisions
if(Role < ROLE_Authority)
@ -401,12 +405,12 @@ simulated event Destroyed(){
// Screw that
simulated function ClientWeaponDestroyed(class<Weapon> WClass){}
// This event is generated when new pawn spawns
function PawnSpawned(){
function PawnSpawned()
{
local bool bFoundExp;
local float convertedExp;
local ClientPerkRepLink R;
local SRCustomProgress exp;
local MeanReplicationInfo meanRI;
local NicePack.PlayerRecord record;
//local NiceHumanPawn nicePawn;
// Make sure our health is at it's top
@ -494,10 +498,6 @@ function PawnSpawned(){
exp.IncrementProgress(convertedExp);
}
}
// Stop after-death bleeding
meanRI = class'MeanReplicationInfo'.static.findSZri(PlayerReplicationInfo);
if(meanRI != none)
meanRI.stopBleeding();
// Give necessary dosh to the player
if(NicePackMutator != none)
NicePackMutator.GiveProgressiveDosh(self);
@ -601,23 +601,32 @@ simulated function ClientLog(String logStr){
if(bFlagDebug)
Log("NiceDebug:"$logStr);
}
function ServerUse(){
function ServerUse()
{
local NiceHumanPawn myPawn;
myPawn = NiceHumanPawn(Pawn);
if(myPawn == none){
if (myPawn == none)
{
super.ServerUse();
return;
}
// Handle initial shop / medic drugs
if(NicePackMutator != none && NicePackMutator.bIsPreGame && NicePackMutator.bInitialTrader){
if(VSize(Pawn.Velocity) <= 0.0){
if (NicePackMutator != none && NicePackMutator.bIsPreGame && NicePackMutator.bInitialTrader)
{
if (VSize(Pawn.Velocity) <= 0.0)
{
ShowBuyMenu("Initial trader", myPawn.MaxCarryWeight);
bOpenedInitTrader = true;
}
}
else
super.ServerUse();
// call this anyways, so we can use doors!
super.ServerUse();
}
simulated function ClientUpdatePawnMaxHealth(NiceHumanPawn updatePawn, int newHealthMax){
updatePawn.HealthMax = newHealthMax;
}
@ -1264,7 +1273,7 @@ state Spectating{
A = Trace(HitLocation, HitNormal, TraceEnd, TraceStart, true);
if(Pawn(A) != none)
ServerSetViewTarget(A);
}
}
}
simulated function ClientSpawnGhostProjectile(Vector Start, int pitch, int yaw, int roll, NiceFire.ShotType shotParams, NiceFire.FireModeContext fireContext, bool bForceComplexTraj){
local Rotator projectileDir;
@ -1440,8 +1449,104 @@ exec simulated function Siren(float value)
sirenScreamMod = value;
}
// copy-cat to fix MyTrader accessed none log spam
function ClientLocationalVoiceMessage(PlayerReplicationInfo Sender,
PlayerReplicationInfo Recipient,
name MessageType, byte MessageID,
optional Pawn SenderPawn, optional vector SenderLocation)
{
local VoicePack Voice;
local ShopVolume Shop;
if (Sender == none || Sender.VoiceType == none || Player.Console == none || Level.NetMode == NM_DedicatedServer)
{
return;
}
Voice = Spawn(Sender.VoiceType, self);
if (KFVoicePack(Voice) != none)
{
if (MessageType == 'TRADER')
{
if (Pawn != none && MessageID >= 4)
{
foreach Pawn.TouchingActors(class'ShopVolume', Shop)
{
// fix this
if (Shop.MyTrader != none)
SenderLocation = Shop.MyTrader.Location;
else
SenderLocation = Shop.Location;
// Only play the 30 Seconds remaining messages come across as Locational Speech if we're in the Shop
if (MessageID == 4)
{
return;
}
else if (MessageID == 5)
{
MessageID = 999;
}
break;
}
}
// Only play the 10 Seconds remaining message if we are in the Shop
// and only play the 30 seconds remaning message if we haven't been to the Shop
if (MessageID == 5 || (MessageID == 4 && bHasHeardTraderWelcomeMessage))
{
return;
}
else if (MessageID == 999)
{
MessageID = 5;
}
// Store the fact that we've heard the Trader's Welcome message on the client
if (MessageID == 7)
{
bHasHeardTraderWelcomeMessage = true;
}
// If we're hearing the Shop's Closed Message, reset the Trader's Welcome message flag
else if (MessageID == 6)
{
bHasHeardTraderWelcomeMessage = false;
}
KFVoicePack(Voice).ClientInitializeLocational(Sender, Recipient, MessageType, MessageID, SenderPawn, SenderLocation);
if (MessageID > 6 /*&& bBuyMenuIsOpen*/)
{
// TODO: Show KFVoicePack(Voice).GetClientParsedMessage() in the Buy Menu
}
else if (KFVoicePack(Voice).GetClientParsedMessage() != "")
{
// Radio commands print to Text
TeamMessage(Sender, KFVoicePack(Voice).GetClientParsedMessage(), 'Trader');
}
}
else
{
KFVoicePack(Voice).ClientInitializeLocational(Sender, Recipient, MessageType, MessageID, SenderPawn, SenderLocation);
if (KFVoicePack(Voice).GetClientParsedMessage() != "")
{
TeamMessage(Sender, KFVoicePack(Voice).GetClientParsedMessage(), 'Voice');
}
}
}
else if (Voice != none)
{
Voice.ClientInitialize(Sender, Recipient, MessageType, MessageID);
}
}
defaultproperties
{
MidGameMenuClass="NicePack.NiceInvasionLoginMenu"
nicePlayerInfoVersionNumber=1
bAltSwitchesModes=True
bAdvReloadCheck=True
@ -1465,7 +1570,6 @@ defaultproperties
effectsLimitSoft=100
effectsLimitHard=200
sirenScreamMod=1.000000
TSCLobbyMenuClassString="NicePack.NiceTSCLobbyMenu"
LobbyMenuClassString="NicePack.NiceLobbyMenu"
PawnClass=Class'NicePack.NiceHumanPawn'
PawnClass=class'NiceHumanPawn'
}

View file

@ -1,11 +1,15 @@
class NiceRandomItemSpawn extends ScrnRandomItemSpawn;
defaultproperties
{
PickupClasses(0)=Class'NicePack.NiceWinchesterPickup'
PickupClasses(1)=Class'NicePack.NiceShotgunPickup'
PickupClasses(2)=Class'NicePack.NiceBullpupPickup'
PickupClasses(3)=Class'NicePack.NiceMagnumPickup'
PickupClasses(4)=Class'NicePack.NiceWinchesterPickup'
PickupClasses(5)=Class'NicePack.NiceM79Pickup'
PickupClasses(8)=Class'NicePack.NiceMAC10Pickup'
}
PickupClasses(0)=Class'NiceWinchesterPickup'
PickupClasses(1)=Class'NiceShotgunPickup'
PickupClasses(2)=Class'NiceBullpupPickup'
PickupClasses(3)=Class'NiceMagnumPickup'
PickupClasses(4)=Class'NiceWinchesterPickup'
PickupClasses(5)=Class'NiceM79Pickup'
PickupClasses(6)=Class'NiceAxePickup'
// mut's checkreplcmt will change this to proper class!
PickupClasses(7)=Class'KFMod.Vest'
PickupClasses(8)=class'NiceMAC10Pickup'
}

View file

@ -185,25 +185,19 @@ simulated function HandleNiceHealingMechanicsAndSkills
simulated function RemovePoisonAndBleed(NiceHumanPawn healed)
{
local Inventory I;
local MeanReplicationInfo MRI;
local Inventory I;
// log spam fix
if (healed == none)
return;
// No bleeding
MRI = class'MeanReplicationInfo'.static.
findSZri(healed.PlayerReplicationInfo);
if (MRI != none)
MRI.stopBleeding();
// No poison
// No poison and bleed
if (healed.inventory == none)
return;
for (I = healed.inventory; I != none; I = I.inventory)
{
if (MeanPoisonInventory(I) != none)
if (MeanPoisonInventory(I) != none || MeanBleedInventory(I) != none)
I.Destroy();
}
}

View file

@ -164,6 +164,6 @@ function Tick(float deltaTime){
defaultproperties
{
maxAbilitiesAmount=5
Events=Class'NicePack.NiceAbilitiesEvents'
Events=class'NiceAbilitiesEvents'
DrawType=DT_None
}

View file

@ -98,16 +98,16 @@ static function string GetCustomLevelInfo(byte Level){
defaultproperties
{
bNewTypePerk=True
SkillGroupA(0)=Class'NicePack.NiceSkillZerkWindCutter'
SkillGroupA(1)=Class'NicePack.NiceSkillZerkWhirlwind'
SkillGroupA(2)=Class'NicePack.NiceSkillZerkColossus'
SkillGroupA(3)=Class'NicePack.NiceSkillZerkUndead'
SkillGroupA(4)=Class'NicePack.NiceSkillZerkZEDAccelerate'
SkillGroupB(0)=Class'NicePack.NiceSkillZerkCleave'
SkillGroupB(1)=Class'NicePack.NiceSkillZerkFury'
SkillGroupB(2)=Class'NicePack.NiceSkillZerkGunzerker'
SkillGroupB(3)=Class'NicePack.NiceSkillZerkVorpalBlade'
SkillGroupB(4)=Class'NicePack.NiceSkillZerkZEDUnbreakable'
SkillGroupA(0)=class'NiceSkillZerkWindCutter'
SkillGroupA(1)=class'NiceSkillZerkWhirlwind'
SkillGroupA(2)=class'NiceSkillZerkColossus'
SkillGroupA(3)=class'NiceSkillZerkUndead'
SkillGroupA(4)=class'NiceSkillZerkZEDAccelerate'
SkillGroupB(0)=class'NiceSkillZerkCleave'
SkillGroupB(1)=class'NiceSkillZerkFury'
SkillGroupB(2)=class'NiceSkillZerkGunzerker'
SkillGroupB(3)=class'NiceSkillZerkVorpalBlade'
SkillGroupB(4)=class'NiceSkillZerkZEDUnbreakable'
progressArray0(0)=100
progressArray0(1)=1000
progressArray0(2)=3000
@ -115,7 +115,7 @@ defaultproperties
progressArray0(4)=30000
progressArray0(5)=100000
progressArray0(6)=200000
DefaultDamageType=Class'NicePack.NiceDamageTypeVetBerserker'
DefaultDamageType=class'NiceDamageTypeVetBerserker'
OnHUDIcons(0)=(PerkIcon=Texture'KillingFloorHUD.Perks.Perk_Berserker',StarIcon=Texture'KillingFloorHUD.HUD.Hud_Perk_Star',DrawColor=(B=255,G=255,R=255,A=255))
OnHUDIcons(1)=(PerkIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Berserker_Gold',StarIcon=Texture'KillingFloor2HUD.Perk_Icons.Hud_Perk_Star_Gold',DrawColor=(B=255,G=255,R=255,A=255))
OnHUDIcons(2)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Berserker_Green',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Green',DrawColor=(B=255,G=255,R=255,A=255))

View file

@ -11,9 +11,9 @@ static function array<int> GetProgressArray(byte ReqNum, optional out int Double
}
static function class<Grenade> GetNadeType(KFPlayerReplicationInfo KFPRI){
/*if(KFPRI != none && class'NiceVetFieldMedic'.static.hasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillMedicArmament'))
return class'NicePack.NiceMedicNade';*/
return class'NiceMedicNade';*/
//return class'NiceMedicNadePoison';
return class'NicePack.NiceNade';
return class'NiceNade';
}
static function float GetHealthBarsDistanceMulti(KFPlayerReplicationInfo KFPRI){
/*if(KFPRI != none && SomeoneHasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillCommandoStrategist'))
@ -26,7 +26,7 @@ static function float GetStalkerViewDistanceMulti(KFPlayerReplicationInfo KFPRI)
return 1.0;
}
static function bool CanCookNade(KFPlayerReplicationInfo KFPRI, Weapon Weap){
return GetNadeType(KFPRI) != class'NicePack.NiceMedicNadePoison';
return GetNadeType(KFPRI) != class'NiceMedicNadePoison';
}
static function float GetMagCapacityMod(KFPlayerReplicationInfo KFPRI, KFWeapon Other){
local class<NiceWeaponPickup> pickupClass;
@ -78,16 +78,16 @@ static function string GetCustomLevelInfo(byte Level){
defaultproperties
{
bNewTypePerk=True
SkillGroupA(0)=Class'NicePack.NiceSkillCommandoExplosivePower'
SkillGroupA(1)=Class'NicePack.NiceSkillCommandoLargerMags'
SkillGroupA(2)=Class'NicePack.NiceSkillCommandoPerfectExecution'
//SkillGroupA(3)=Class'NicePack.'
SkillGroupA(4)=Class'NicePack.NiceSkillCommandoZEDProfessional'
SkillGroupB(0)=Class'NicePack.NiceSkillCommandoRegeneration'
SkillGroupB(1)=Class'NicePack.NiceSkillCommandoQuickermags'
SkillGroupB(2)=Class'NicePack.NiceSkillCommandoOverclocking'
//SkillGroupB(3)=Class'NicePack.'
SkillGroupB(4)=Class'NicePack.NiceSkillCommandoZEDHeavenCanceller'
SkillGroupA(0)=class'NiceSkillCommandoExplosivePower'
SkillGroupA(1)=class'NiceSkillCommandoLargerMags'
SkillGroupA(2)=class'NiceSkillCommandoPerfectExecution'
//SkillGroupA(3)=class''
SkillGroupA(4)=class'NiceSkillCommandoZEDProfessional'
SkillGroupB(0)=class'NiceSkillCommandoRegeneration'
SkillGroupB(1)=class'NiceSkillCommandoQuickermags'
SkillGroupB(2)=class'NiceSkillCommandoOverclocking'
//SkillGroupB(3)=class''
SkillGroupB(4)=class'NiceSkillCommandoZEDHeavenCanceller'
progressArray0(0)=100
progressArray0(1)=1000
progressArray0(2)=3000
@ -95,7 +95,7 @@ defaultproperties
progressArray0(4)=30000
progressArray0(5)=100000
progressArray0(6)=200000
DefaultDamageType=Class'NicePack.NiceDamageTypeVetCommando'
DefaultDamageType=class'NiceDamageTypeVetCommando'
OnHUDIcons(0)=(PerkIcon=Texture'KillingFloorHUD.Perks.Perk_Commando',StarIcon=Texture'KillingFloorHUD.HUD.Hud_Perk_Star',DrawColor=(B=255,G=255,R=255,A=255))
OnHUDIcons(1)=(PerkIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Commando_Gold',StarIcon=Texture'KillingFloor2HUD.Perk_Icons.Hud_Perk_Star_Gold',DrawColor=(B=255,G=255,R=255,A=255))
OnHUDIcons(2)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Commando_Green',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Green',DrawColor=(B=255,G=255,R=255,A=255))

View file

@ -37,7 +37,7 @@ static function int AddDamage(KFPlayerReplicationInfo KFPRI, KFMonster Injured,
local class<NiceWeaponPickup> pickupClass;
pickupClass = GetPickupFromDamageType(DmgType);
perkDamage = float(InDamage);
if(DmgType == class'NicePack.NiceDamTypeDemoExplosion')
if(DmgType == class'NiceDamTypeDemoExplosion')
return 1.6 * perkDamage;
if(IsPerkedPickup(pickupClass))
perkDamage *= 1.25;
@ -81,16 +81,16 @@ static function string GetCustomLevelInfo(byte Level){
defaultproperties
{
bNewTypePerk=True
SkillGroupA(0)=Class'NicePack.NiceSkillDemoConcussion'
SkillGroupA(1)=Class'NicePack.NiceSkillDemoOnperk'
SkillGroupA(2)=Class'NicePack.NiceSkillDemoDirectApproach'
SkillGroupA(3)=Class'NicePack.NiceSkillDemoReactiveArmor'
SkillGroupA(4)=Class'NicePack.NiceSkillDemoZEDDuckAndCover'
SkillGroupB(0)=Class'NicePack.NiceSkillDemoOffperk'
SkillGroupB(1)=Class'NicePack.NiceSkillDemoManiac'
SkillGroupB(2)=Class'NicePack.NiceSkillDemoAPShot'
SkillGroupB(3)=Class'NicePack.NiceSkillDemoVolatile'
SkillGroupB(4)=Class'NicePack.NiceSkillDemoZEDFullBlast'
SkillGroupA(0)=class'NiceSkillDemoConcussion'
SkillGroupA(1)=class'NiceSkillDemoOnperk'
SkillGroupA(2)=class'NiceSkillDemoDirectApproach'
SkillGroupA(3)=class'NiceSkillDemoReactiveArmor'
SkillGroupA(4)=class'NiceSkillDemoZEDDuckAndCover'
SkillGroupB(0)=class'NiceSkillDemoOffperk'
SkillGroupB(1)=class'NiceSkillDemoManiac'
SkillGroupB(2)=class'NiceSkillDemoAPShot'
SkillGroupB(3)=class'NiceSkillDemoVolatile'
SkillGroupB(4)=class'NiceSkillDemoZEDFullBlast'
progressArray0(0)=100
progressArray0(1)=1000
progressArray0(2)=3000
@ -98,7 +98,7 @@ defaultproperties
progressArray0(4)=30000
progressArray0(5)=100000
progressArray0(6)=200000
DefaultDamageType=Class'NicePack.NiceDamageTypeVetDemolitions'
DefaultDamageType=class'NiceDamageTypeVetDemolitions'
OnHUDIcons(0)=(PerkIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Demolition',StarIcon=Texture'KillingFloorHUD.HUD.Hud_Perk_Star',DrawColor=(B=255,G=255,R=255,A=255))
OnHUDIcons(1)=(PerkIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Demolition_Gold',StarIcon=Texture'KillingFloor2HUD.Perk_Icons.Hud_Perk_Star_Gold',DrawColor=(B=255,G=255,R=255,A=255))
OnHUDIcons(2)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Demolition_Green',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Green',DrawColor=(B=255,G=255,R=255,A=255))

View file

@ -27,10 +27,10 @@ static function AbilityActivated( string abilityID,
}
if(abilityID == class'NiceSkillEnforcerStuporA'.default.abilityID){
relatedPlayer.abilityManager.SetAbilityState(1, ASTATE_COOLDOWN);
foreach relatedPlayer.CollidingActors(class'NiceMonster', victim, class'NicePack.NiceSkillEnforcerStuporA'.default.radius, relatedPlayer.pawn.location)
foreach relatedPlayer.CollidingActors(class'NiceMonster', victim, class'NiceSkillEnforcerStuporA'.default.radius, relatedPlayer.pawn.location)
{
if (victim == none) continue;
victim.DoRightPainReaction(class'NicePack.NiceSkillEnforcerStuporA'.default.painScore,
victim.DoRightPainReaction(class'NiceSkillEnforcerStuporA'.default.painScore,
relatedPlayer.pawn, victim.location, Vect(0,0,0), none, 0.0,
KFPlayerReplicationInfo(relatedPlayer.PlayerReplicationInfo));
}

View file

@ -37,9 +37,9 @@ static function int AddStunScore(KFPlayerReplicationInfo KFPRI, KFMonster Injure
static function class<Grenade> GetNadeType(KFPlayerReplicationInfo KFPRI){
/*if(HasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillSupportCautious'))
return class'NicePack.NiceDelayedNade';
return class'NicePack.NiceNailNade';*/
return class'NicePack.NiceCryoNade';
return class'NiceDelayedNade';
return class'NiceNailNade';*/
return class'NiceCryoNade';
}
static function float AddExtraAmmoFor(KFPlayerReplicationInfo KFPRI, Class<Ammunition> AmmoType){
@ -97,7 +97,7 @@ static function float ModifyRecoilSpread(KFPlayerReplicationInfo KFPRI, WeaponFi
niceWeap = class<NiceWeapon>(other);
if(niceWeap != none && niceWeap.default.reloadType == RTYPE_MAG)
return 1.5;
if(other == class'NicePack.NiceM41AAssaultRifle' || other == class'NicePack.NiceChainGun' || other == class'NicePack.NiceStinger' )
if(other == class'NiceM41AAssaultRifle' || other == class'NiceChainGun' || other == class'NiceStinger' )
return 1.5;
return 1.0;
}*/
@ -140,16 +140,16 @@ static function SetupAbilities(KFPlayerReplicationInfo KFPRI){
defaultproperties
{
bNewTypePerk=True
SkillGroupA(0)=Class'NicePack.NiceSkillEnforcerUnstoppable'
SkillGroupA(1)=Class'NicePack.NiceSkillEnforcerBombard'
SkillGroupA(2)=Class'NicePack.NiceSkillEnforcerCoating'
SkillGroupA(3)=Class'NicePack.NiceSkillEnforcerStuporA'
SkillGroupA(4)=Class'NicePack.NiceSkillEnforcerZEDBarrage'
SkillGroupB(0)=Class'NicePack.NiceSkillEnforcerUnshakable'
SkillGroupB(1)=Class'NicePack.NiceSkillEnforcerMultitasker'
SkillGroupB(2)=Class'NicePack.NiceSkillEnforcerDetermination'
SkillGroupB(3)=Class'NicePack.NiceSkillEnforcerBrutalCarnageA'
SkillGroupB(4)=Class'NicePack.NiceSkillEnforcerZEDJuggernaut'
SkillGroupA(0)=class'NiceSkillEnforcerUnstoppable'
SkillGroupA(1)=class'NiceSkillEnforcerBombard'
SkillGroupA(2)=class'NiceSkillEnforcerCoating'
SkillGroupA(3)=class'NiceSkillEnforcerStuporA'
SkillGroupA(4)=class'NiceSkillEnforcerZEDBarrage'
SkillGroupB(0)=class'NiceSkillEnforcerUnshakable'
SkillGroupB(1)=class'NiceSkillEnforcerMultitasker'
SkillGroupB(2)=class'NiceSkillEnforcerDetermination'
SkillGroupB(3)=class'NiceSkillEnforcerBrutalCarnageA'
SkillGroupB(4)=class'NiceSkillEnforcerZEDJuggernaut'
progressArray0(0)=100
progressArray0(1)=1000
progressArray0(2)=3000
@ -157,7 +157,7 @@ defaultproperties
progressArray0(4)=30000
progressArray0(5)=100000
progressArray0(6)=200000
DefaultDamageType=Class'NicePack.NiceDamageTypeVetEnforcer'
DefaultDamageType=class'NiceDamageTypeVetEnforcer'
OnHUDIcons(0)=(PerkIcon=Texture'KillingFloorHUD.Perks.Perk_Support',StarIcon=Texture'KillingFloorHUD.HUD.Hud_Perk_Star',DrawColor=(B=255,G=255,R=255,A=255))
OnHUDIcons(1)=(PerkIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Support_Gold',StarIcon=Texture'KillingFloor2HUD.Perk_Icons.Hud_Perk_Star_Gold',DrawColor=(B=255,G=255,R=255,A=255))
OnHUDIcons(2)=(PerkIcon=Texture'ScrnTex.Perks.Perk_Support_Green',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Green',DrawColor=(B=255,G=255,R=255,A=255))

View file

@ -18,7 +18,7 @@ static function float GetHeadshotCheckMultiplier(KFPlayerReplicationInfo KFPRI,
// Give Medic normal hand nades again - he should buy medic nade lauchers for healing nades
static function class<Grenade> GetNadeType(KFPlayerReplicationInfo KFPRI){
if(KFPRI != none && class'NiceVetFieldMedic'.static.hasSkill(NicePlayerController(KFPRI.Owner), class'NiceSkillMedicArmament'))
return class'NicePack.NiceMedicNade';
return class'NiceMedicNade';
return class'NiceMedicNadePoison';
}
static function float GetAmmoPickupMod(KFPlayerReplicationInfo KFPRI, KFAmmunition Other){
@ -29,7 +29,7 @@ static function float GetAmmoPickupMod(KFPlayerReplicationInfo KFPRI, KFAmmuniti
}
//can't cook medic nades
static function bool CanCookNade(KFPlayerReplicationInfo KFPRI, Weapon Weap){
return GetNadeType(KFPRI) != class'NicePack.NiceMedicNade';
return GetNadeType(KFPRI) != class'NiceMedicNade';
}
static function float GetSyringeChargeRate(KFPlayerReplicationInfo KFPRI){
return 3.0;
@ -63,16 +63,16 @@ static function string GetCustomLevelInfo(byte Level){
}
defaultproperties
{
SkillGroupA(0)=Class'NicePack.NiceSkillMedicSymbioticHealth'
SkillGroupA(1)=Class'NicePack.NiceSkillMedicArmament'
SkillGroupA(2)=Class'NicePack.NiceSkillMedicAdrenalineShot'
SkillGroupA(3)=Class'NicePack.NiceSkillMedicInjection'
SkillGroupA(4)=Class'NicePack.NiceSkillMedicZEDHeavenCanceller'
SkillGroupB(0)=Class'NicePack.NiceSkillMedicAimAssistance'
SkillGroupB(1)=Class'NicePack.NiceSkillMedicPesticide'
SkillGroupB(2)=Class'NicePack.NiceSkillMedicRegeneration'
SkillGroupB(3)=Class'NicePack.NiceSkillMedicTranquilizer'
SkillGroupB(4)=Class'NicePack.NiceSkillMedicZEDFrenzy'
SkillGroupA(0)=class'NiceSkillMedicSymbioticHealth'
SkillGroupA(1)=class'NiceSkillMedicArmament'
SkillGroupA(2)=class'NiceSkillMedicAdrenalineShot'
SkillGroupA(3)=class'NiceSkillMedicInjection'
SkillGroupA(4)=class'NiceSkillMedicZEDHeavenCanceller'
SkillGroupB(0)=class'NiceSkillMedicAimAssistance'
SkillGroupB(1)=class'NiceSkillMedicPesticide'
SkillGroupB(2)=class'NiceSkillMedicRegeneration'
SkillGroupB(3)=class'NiceSkillMedicTranquilizer'
SkillGroupB(4)=class'NiceSkillMedicZEDFrenzy'
progressArray0(0)=100
progressArray0(1)=1000
progressArray0(2)=3000

View file

@ -89,14 +89,14 @@ static function int ReduceDamage(KFPlayerReplicationInfo KFPRI, KFPawn Injured,
static function class<Grenade> GetNadeType(KFPlayerReplicationInfo KFPRI)
{
if ( GetClientVeteranSkillLevel(KFPRI) >= 3 ) {
return class'NicePack.NiceFlameNade';
return class'NiceFlameNade';
}
return super.GetNadeType(KFPRI);
}
//can't cook fire nades
static function bool CanCookNade(KFPlayerReplicationInfo KFPRI, Weapon Weap)
{
return GetNadeType(KFPRI) != class'ScrnBalanceSrv.ScrnFlameNade';
return GetNadeType(KFPRI) != class'ScrnFlameNade';
}
//v2.60: +60% faster charge with Husk Gun
static function float GetReloadSpeedModifierStatic(KFPlayerReplicationInfo KFPRI, class<KFWeapon> Other)
@ -160,7 +160,7 @@ static function string GetCustomLevelInfo( byte Level )
}
defaultproperties
{
DefaultDamageType=Class'NicePack.NiceDamTypeFire'
DefaultDamageType=class'NiceDamTypeFire'
DefaultDamageTypeNoBonus=Class'KFMod.DamTypeMAC10MPInc'
OnHUDIcons(0)=(PerkIcon=Texture'KillingFloorHUD.Perks.Perk_Firebug',StarIcon=Texture'KillingFloorHUD.HUD.Hud_Perk_Star',DrawColor=(B=255,G=255,R=255,A=255))
OnHUDIcons(1)=(PerkIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_Firebug_Gold',StarIcon=Texture'KillingFloor2HUD.Perk_Icons.Hud_Perk_Star_Gold',DrawColor=(B=255,G=255,R=255,A=255))

View file

@ -285,20 +285,39 @@ static function int GetInvincibilityDuration(KFPlayerReplicationInfo KFPRI){
static function int GetInvincibilitySafeMisses(KFPlayerReplicationInfo KFPRI){
return 0;
}
static function SpecialHUDInfo(KFPlayerReplicationInfo KFPRI, Canvas C){
static function SpecialHUDInfo(KFPlayerReplicationInfo KFPRI, Canvas C)
{
local KFMonster KFEnemy;
local HUDKillingFloor HKF;
local int i, hp;
local float MaxDistanceSquared;
MaxDistanceSquared = 640000;
MaxDistanceSquared *= GetHealthBarsDistanceMulti(KFPRI)**2;
HKF = HUDKillingFloor(C.ViewPort.Actor.myHUD);
if(HKF == none || C.ViewPort.Actor.Pawn == none || MaxDistanceSquared <= 0)
if (HKF == none || C.ViewPort.Actor.Pawn == none || MaxDistanceSquared <= 0)
return;
foreach C.ViewPort.Actor.DynamicActors(class'KFMonster', KFEnemy){
if(KFEnemy.Health > 0 && (!KFEnemy.Cloaked() || KFEnemy.bZapped || KFEnemy.bSpotted) && VSizeSquared(KFEnemy.Location - C.ViewPort.Actor.Pawn.Location) < MaxDistanceSquared)
// read and use player settings
// 0 - big zeds, 1 - all, 2 - disabled
i = NicePlayerController(C.ViewPort.actor).ZedHPBarStyle;
if (i == 2)
return;
else if (i == 1)
hp = 0;
else
hp = 1000;
foreach C.ViewPort.Actor.DynamicActors(class'KFMonster', KFEnemy)
{
// check with stopwatch
if (KFEnemy.Health > hp && (!KFEnemy.Cloaked() || KFEnemy.bZapped || KFEnemy.bSpotted) && VSizeSquared(KFEnemy.Location - C.ViewPort.Actor.Pawn.Location) < MaxDistanceSquared)
HKF.DrawHealthBar(C, KFEnemy, KFEnemy.Health, KFEnemy.HealthMax , 50.0);
}
}
// Is player standing still?
static function bool IsStandingStill(KFPlayerReplicationInfo KFPRI){
if(KFPRI != none && PlayerController(KFPRI.Owner) != none && PlayerController(KFPRI.Owner).Pawn != none && VSize(PlayerController(KFPRI.Owner).Pawn.Velocity) > 0.0)
@ -321,19 +340,19 @@ static function string GetVetInfoText(byte Level, byte Type, optional byte Requi
return Super.GetVetInfoText(Level, Type, RequirementNum);
}
static function class<Grenade> GetNadeType(KFPlayerReplicationInfo KFPRI){
return class'NicePack.NiceNade';
return class'NiceNade';
}
static function SetupAbilities(KFPlayerReplicationInfo KFPRI){}
defaultproperties
{
SkillGroupA(0)=Class'NicePack.NiceSkill'
SkillGroupA(1)=Class'NicePack.NiceSkill'
SkillGroupA(2)=Class'NicePack.NiceSkill'
SkillGroupA(3)=Class'NicePack.NiceSkill'
SkillGroupA(4)=Class'NicePack.NiceSkill'
SkillGroupB(0)=Class'NicePack.NiceSkill'
SkillGroupB(1)=Class'NicePack.NiceSkill'
SkillGroupB(2)=Class'NicePack.NiceSkill'
SkillGroupB(3)=Class'NicePack.NiceSkill'
SkillGroupB(4)=Class'NicePack.NiceSkill'
SkillGroupA(0)=class'NiceSkill'
SkillGroupA(1)=class'NiceSkill'
SkillGroupA(2)=class'NiceSkill'
SkillGroupA(3)=class'NiceSkill'
SkillGroupA(4)=class'NiceSkill'
SkillGroupB(0)=class'NiceSkill'
SkillGroupB(1)=class'NiceSkill'
SkillGroupB(2)=class'NiceSkill'
SkillGroupB(3)=class'NiceSkill'
SkillGroupB(4)=class'NiceSkill'
}

View file

@ -141,16 +141,16 @@ static function SetupAbilities(KFPlayerReplicationInfo KFPRI){
defaultproperties
{
bNewTypePerk=True
SkillGroupA(0)=Class'NicePack.NiceSkillSharpshooterKillConfirmed'
SkillGroupA(1)=Class'NicePack.NiceSkillSharpshooterDamage'
SkillGroupA(2)=Class'NicePack.NiceSkillSharpshooterDieAlready'
SkillGroupA(3)=Class'NicePack.NiceSkillSharpshooterReaperA'
SkillGroupA(4)=Class'NicePack.NiceSkillSharpshooterZEDAdrenaline'
SkillGroupB(0)=Class'NicePack.NiceSkillSharpshooterSurgical'
SkillGroupB(1)=Class'NicePack.NiceSkillSharpshooterControl'
SkillGroupB(2)=Class'NicePack.NiceSkillSharpshooterArdour'
SkillGroupB(3)=Class'NicePack.NiceSkillSharpshooterGunslingerA'
SkillGroupB(4)=Class'NicePack.NiceSkillSharpshooterZEDHundredGauntlets'
SkillGroupA(0)=class'NiceSkillSharpshooterKillConfirmed'
SkillGroupA(1)=class'NiceSkillSharpshooterDamage'
SkillGroupA(2)=class'NiceSkillSharpshooterDieAlready'
SkillGroupA(3)=class'NiceSkillSharpshooterReaperA'
SkillGroupA(4)=class'NiceSkillSharpshooterZEDAdrenaline'
SkillGroupB(0)=class'NiceSkillSharpshooterSurgical'
SkillGroupB(1)=class'NiceSkillSharpshooterControl'
SkillGroupB(2)=class'NiceSkillSharpshooterArdour'
SkillGroupB(3)=class'NiceSkillSharpshooterGunslingerA'
SkillGroupB(4)=class'NiceSkillSharpshooterZEDHundredGauntlets'
progressArray0(0)=100
progressArray0(1)=1000
progressArray0(2)=3000
@ -158,7 +158,7 @@ defaultproperties
progressArray0(4)=30000
progressArray0(5)=100000
progressArray0(6)=200000
DefaultDamageType=Class'NicePack.NiceDamageTypeVetSharpshooter'
DefaultDamageType=class'NiceDamageTypeVetSharpshooter'
OnHUDIcons(0)=(PerkIcon=Texture'KillingFloorHUD.Perks.Perk_SharpShooter',StarIcon=Texture'KillingFloorHUD.HUD.Hud_Perk_Star',DrawColor=(B=255,G=255,R=255,A=255))
OnHUDIcons(1)=(PerkIcon=Texture'KillingFloor2HUD.Perk_Icons.Perk_SharpShooter_Gold',StarIcon=Texture'KillingFloor2HUD.Perk_Icons.Hud_Perk_Star_Gold',DrawColor=(B=255,G=255,R=255,A=255))
OnHUDIcons(2)=(PerkIcon=Texture'ScrnTex.Perks.Perk_SharpShooter_Green',StarIcon=Texture'ScrnTex.Perks.Hud_Perk_Star_Green',DrawColor=(B=255,G=255,R=255,A=255))

View file

@ -1,111 +0,0 @@
class NiceTSCGame extends TSCGame;
// Copy-pasted from NiceGameType
var NicePack NicePackMutator;
function RegisterMutator(NicePack activePack){
NicePackMutator = activePack;
}
function SetupWave(){
Super.SetupWave();
// Event call
NicePackMutator.WaveStart();
}
function RestartPlayer(Controller aPlayer){
Super.RestartPlayer(aPlayer);
if(aPlayer.Pawn != none && NicePlayerController(aPlayer) != none)
NicePlayerController(aPlayer).PawnSpawned();
}
State MatchInProgress{
function BeginState(){
Super(Invasion).BeginState();
WaveNum = InitialWave;
InvasionGameReplicationInfo(GameReplicationInfo).WaveNumber = WaveNum;
if(NicePackMutator.bInitialTrader)
WaveCountDown = NicePackMutator.initialTraderTime + 10;
else
WaveCountDown = 10;
SetupPickups();
// Event call
NicePackMutator.MatchBegan();
}
function DoWaveEnd(){
Super.DoWaveEnd();
// Event call
NicePackMutator.TraderStart();
}
}
function DramaticEvent(float BaseZedTimePossibility, optional float DesiredZedTimeDuration){
local bool bWasZedTime;
bWasZedTime = bZEDTimeActive;
Super.DramaticEvent(BaseZedTimePossibility, DesiredZedTimeDuration);
// Call events
if(!bWasZedTime && bZEDTimeActive)
NicePackMutator.ZedTimeActivated();
}
event Tick(float DeltaTime){
local float TrueTimeFactor;
local Controller C;
if(bZEDTimeActive){
TrueTimeFactor = 1.1 / Level.TimeDilation;
CurrentZEDTimeDuration -= DeltaTime * TrueTimeFactor;
if(CurrentZEDTimeDuration < (ZEDTimeDuration*0.166) && CurrentZEDTimeDuration > 0 ){
if(!bSpeedingBackUp){
bSpeedingBackUp = true;
for(C = Level.ControllerList;C != none;C = C.NextController){
if(KFPlayerController(C)!= none)
KFPlayerController(C).ClientExitZedTime();
}
}
SetGameSpeed(Lerp( (CurrentZEDTimeDuration/(ZEDTimeDuration*0.166)), 1.0, 0.2 ));
}
if(CurrentZEDTimeDuration <= 0){
if(bZEDTimeActive)
NicePackMutator.ZedTimeDeactivated();
bZEDTimeActive = false;
bSpeedingBackUp = false;
SetGameSpeed(1.0);
ZedTimeExtensionsUsed = 0;
}
}
}
function Killed(Controller Killer, Controller Killed, Pawn KilledPawn, class<DamageType> dmgType){
local KFSteamStatsAndAchievements StatsAndAchievements;
Super.Killed(Killer, Killed, KilledPawn, dmgType);
if(PlayerController(Killer) != none){
if (NiceMonster(KilledPawn) != none && Killed != Killer){
StatsAndAchievements = KFSteamStatsAndAchievements(PlayerController(Killer).SteamStatsAndAchievements);
if(StatsAndAchievements != none){
if(KilledPawn.IsA('NiceZombieStalker') || KilledPawn.IsA('MeanZombieStalker')){
if(class<NiceDamTypeWinchester>(dmgType) != none)
StatsAndAchievements.AddStalkerKillWithLAR();
}
else if(KilledPawn.IsA('NiceZombieClot') || KilledPawn.IsA('MeanZombieClot')){
if(class<NiceDamTypeWinchester>(dmgType) != none)
KFSteamStatsAndAchievements(PlayerController(Killer).SteamStatsAndAchievements).AddClotKillWithLAR();
}
}
}
}
}
// Reloaded to award damage
function int ReduceDamage(int Damage, pawn injured, pawn instigatedBy, vector HitLocation, out vector Momentum, class<DamageType> DamageType){
local NiceMonster niceZed;
local KFPlayerController PC;
niceZed = NiceMonster(Injured);
if(niceZed != none){
if(instigatedBy != none){
PC = KFPlayerController(instigatedBy.Controller);
if(class<NiceWeaponDamageType>(damageType) != none && PC != none)
class<NiceWeaponDamageType>(damageType).Static.AwardNiceDamage(KFSteamStatsAndAchievements(PC.SteamStatsAndAchievements), Clamp(Damage, 1, Injured.Health), niceZed.scrnRules.HardcoreLevel);
}
}
return Super.ReduceDamage(Damage, injured, InstigatedBy, HitLocation, Momentum, DamageType);
}
defaultproperties
{
GameName="Nice Team Survival Competition"
Description="Nice Edition of Team Survival Competition (TSCGame)."
}

View file

@ -1,22 +0,0 @@
class NiceTSCLobbyFooter extends NiceLobbyFooter;
defaultproperties
{
Begin Object Class=GUIButton Name=ReadyButton
Caption="Ready"
MenuState=MSAT_Disabled
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=4
bBoundToParent=True
bVisible=False
ToolTip=None
OnClick=TSCLobbyFooter.OnFooterClick
OnKeyEvent=ReadyButton.InternalOnKeyEvent
End Object
b_Ready=GUIButton'NicePack.NiceTSCLobbyFooter.ReadyButton'
}

View file

@ -1,12 +0,0 @@
class NiceTSCLobbyMenu extends TSCLobbyMenu;
defaultproperties
{
Begin Object Class=NiceTSCLobbyFooter Name=BuyFooter
RenderWeight=0.300000
TabOrder=8
bBoundToParent=False
bScaleToParent=False
OnPreDraw=BuyFooter.InternalOnPreDraw
End Object
t_Footer=NiceTSCLobbyFooter'NicePack.NiceTSCLobbyMenu.BuyFooter'
}

50
sources/Utility.uc Normal file
View file

@ -0,0 +1,50 @@
class Utility extends object
abstract;
// custom, colored hints
var const array<string> NiceHints;
final static function string GetNiceHint()
{
local string white, blue;
white = chr(27) $ chr(200) $ chr(200) $ chr(200);
blue = chr(27) $ chr(1) $ chr(100) $ chr(200);
return white $ "Nice Floor: " $ blue $ default.NiceHints[rand(default.NiceHints.Length)];
}
final static function array<string> GetNiceHintArray()
{
local int i;
local string white, blue;
local array<string> Hints;
white = chr(27) $ chr(200) $ chr(200) $ chr(200);
blue = chr(27) $ chr(1) $ chr(100) $ chr(200);
for ( i = 0; i < default.NiceHints.Length; i++ )
Hints[Hints.Length] = white $ "Nice Floor: " $ blue $ default.NiceHints[i];
return Hints;
}
defaultproperties
{
// 'funny', customized hints
NiceHints[00]="Most weapons are clientside, so aim for the heads!"
NiceHints[01]="If you feel this is hard, you are not alone."
NiceHints[02]="This mode will always be in alpha state. Kill your hope."
NiceHints[03]="Only KAIO is able to compile this."
NiceHints[04]="We really hate kiting, so we made camping much harder."
NiceHints[05]="We love camping, so we made kiting almost impossible."
NiceHints[06]="You can play this if you beat 5 faked / 6p HP zeds."
NiceHints[07]="Hold or Die!"
NiceHints[08]="The Wipe Train has no breaks."
NiceHints[09]="You're welcome with requests. Just remember we are super lazy."
NiceHints[10]="If nothing works - it's intended."
NiceHints[11]="If you find any bug, we can make it a feature."
NiceHints[12]="Play this only if you don't have real life."
NiceHints[13]="You suck and we hate you."
NiceHints[14]="GITGUD"
}

View file

@ -189,11 +189,11 @@ simulated function DoToggle(){
ServerApplyFireModes();
PlayOwnedSound(ToggleSound, SLOT_none, 2.0,,,, false);
if(MainFire == ETYPE_AUTO)
player.ReceiveLocalizedMessage(class'NicePack.NiceAssaultRifleMessage', 1);
player.ReceiveLocalizedMessage(class'NiceAssaultRifleMessage', 1);
else if(MainFire == ETYPE_SEMI)
player.ReceiveLocalizedMessage(class'NicePack.NiceAssaultRifleMessage', 0);
player.ReceiveLocalizedMessage(class'NiceAssaultRifleMessage', 0);
else if(MainFire == ETYPE_BURST)
player.ReceiveLocalizedMessage(class'NicePack.NiceAssaultRifleMessage', 2);
player.ReceiveLocalizedMessage(class'NiceAssaultRifleMessage', 2);
}
}
simulated function SecondDoToggle(){
@ -226,9 +226,9 @@ simulated function SecondDoToggle(){
ServerApplyFireModes();
PlayOwnedSound(ToggleSound, SLOT_none, 2.0,,,, false);
if(choosenType == ETYPE_SEMI)
nicePlayer.ReceiveLocalizedMessage(class'NicePack.NiceAssaultRifleMessage', 4);
nicePlayer.ReceiveLocalizedMessage(class'NiceAssaultRifleMessage', 4);
else
nicePlayer.ReceiveLocalizedMessage(class'NicePack.NiceAssaultRifleMessage', 5);
nicePlayer.ReceiveLocalizedMessage(class'NiceAssaultRifleMessage', 5);
}
simulated function ClientNiceChangeFireMode(bool bNewWaitForRelease, bool bNewSemiMustBurst){
local NiceFire niceF;

View file

@ -34,7 +34,7 @@ simulated function ReduceAmmoClient(){
defaultproperties
{
ProjectileSpeed=12500.000000
bulletClass=Class'NicePack.NiceMedicProjectile'
bulletClass=class'NiceMedicProjectile'
FireAimedAnim="Fire_Iron"
FireSoundRef="KF_MP7Snd.Medicgun_Fire"
StereoFireSoundRef="KF_MP7Snd.Medicgun_FireST"

View file

@ -9,7 +9,7 @@ defaultproperties
heatPart=1.000000
bDealBurningDamage=True
bCheckForHeadShots=False
//WeaponClass=Class'NicePack.NiceFlame9mm'
//WeaponClass=class'NiceFlame9mm'
DeathString="%k incinerated %o."
FemaleSuicide="%o roasted herself alive."
MaleSuicide="%o roasted himself alive."

View file

@ -428,7 +428,7 @@ function GiveAmmo(int m, WeaponPickup WP, bool bJustSpawned){
defaultproperties
{
SingleClass=Class'NicePack.NiceSingle'
SingleClass=class'NiceSingle'
altFlashBoneName="Tip_Left"
altTPAnim="DualiesAttackLeft"
altWeaponAttach="Bone_weapon2"
@ -460,7 +460,7 @@ defaultproperties
TraderInfoTexture=Texture'KillingFloorHUD.Trader_Weapon_Images.Trader_Dual_9mm'
ZoomInRotation=(Pitch=0,Roll=0)
ZoomedDisplayFOV=65.000000
FireModeClass(0)=Class'NicePack.NiceDualiesFire'
FireModeClass(0)=class'NiceDualiesFire'
FireModeClass(1)=Class'KFMod.NoFire'
PutDownAnim="PutDown"
AIRating=0.440000
@ -472,10 +472,10 @@ defaultproperties
Priority=65
InventoryGroup=2
GroupOffset=2
PickupClass=Class'NicePack.NiceDualiesPickup'
PickupClass=class'NiceDualiesPickup'
PlayerViewOffset=(X=20.000000,Z=-7.000000)
BobDamping=7.000000
AttachmentClass=Class'NicePack.NiceDualiesAttachment'
AttachmentClass=class'NiceDualiesAttachment'
IconCoords=(X1=229,Y1=258,X2=296,Y2=307)
ItemName="!!!Dual something"
DrawScale=0.900000

View file

@ -6,7 +6,7 @@ defaultproperties
AmmoPickupAmount=30
MaxAmmo=480
InitialAmount=240
PickupClass=Class'NicePack.NiceDualiesAmmoPickup'
PickupClass=class'NiceDualiesAmmoPickup'
IconMaterial=Texture'KillingFloorHUD.Generic.HUD'
IconCoords=(X1=413,Y1=82,X2=457,Y2=125)
ItemName="Dualies bullets"

View file

@ -3,7 +3,7 @@ class NiceDualiesAmmoPickup extends NiceAmmoPickup;
defaultproperties
{
AmmoAmount=30
InventoryType=Class'NicePack.NiceDualiesAmmo'
InventoryType=class'NiceDualiesAmmo'
PickupMessage="Rounds (9mm)"
StaticMesh=StaticMesh'KillingFloorStatics.DualiesAmmo'
}

View file

@ -234,7 +234,7 @@ defaultproperties
TweenTime=0.025000
FireForce="AssaultRifleFire"
FireRate=0.087500
AmmoClass=Class'NicePack.NiceSingleAmmo'
AmmoClass=class'NiceSingleAmmo'
ShakeRotMag=(X=75.000000,Y=75.000000,Z=250.000000)
ShakeRotRate=(X=10000.000000,Y=10000.000000,Z=10000.000000)
ShakeRotTime=3.000000

View file

@ -30,7 +30,7 @@ defaultproperties
AmmoMesh=StaticMesh'KillingFloorStatics.DualiesAmmo'
CorrespondingPerkIndex=2
EquipmentCategoryID=1
InventoryType=Class'NicePack.NiceDualies'
InventoryType=class'NiceDualies'
PickupMessage="You found another 9mm handgun"
PickupForce="AssaultRiflePickup"
StaticMesh=StaticMesh'KF_pickups_Trip.pistol.double9mm_pickup'

View file

@ -180,7 +180,7 @@ function GiveTo(Pawn other, optional Pickup Pickup){
defaultproperties
{
DualClass=Class'NicePack.NiceDualies'
DualClass=class'NiceDualies'
bHasChargePhase=False
FirstPersonFlashlightOffset=(X=-20.000000,Y=-22.000000,Z=8.000000)
MagCapacity=15
@ -195,7 +195,7 @@ defaultproperties
StandardDisplayFOV=70.000000
TraderInfoTexture=Texture'KillingFloorHUD.Trader_Weapon_Images.Trader_9mm'
ZoomedDisplayFOV=65.000000
FireModeClass(0)=Class'NicePack.NiceSingleFire'
FireModeClass(0)=class'NiceSingleFire'
FireModeClass(1)=Class'KFMod.NoFire'
PutDownAnim="PutDown"
AIRating=0.250000
@ -206,10 +206,10 @@ defaultproperties
Priority=60
InventoryGroup=2
GroupOffset=1
PickupClass=Class'NicePack.NiceSinglePickup'
PickupClass=class'NiceSinglePickup'
PlayerViewOffset=(X=20.000000,Y=25.000000,Z=-10.000000)
BobDamping=6.000000
AttachmentClass=Class'NicePack.NiceSingleAttachment'
AttachmentClass=class'NiceSingleAttachment'
IconCoords=(X1=434,Y1=253,X2=506,Y2=292)
ItemName="Just a single pistol"
}

View file

@ -3,7 +3,7 @@ class NiceSingleAmmoPickup extends NiceAmmoPickup;
defaultproperties
{
AmmoAmount=20
InventoryType=Class'NicePack.NiceSingleAmmo'
InventoryType=class'NiceSingleAmmo'
RespawnTime=0.000000
PickupMessage="Rounds (9mm)"
StaticMesh=StaticMesh'KillingFloorStatics.DualiesAmmo'

View file

@ -33,7 +33,7 @@ defaultproperties
TweenTime=0.025000
FireForce="AssaultRifleFire"
FireRate=0.175000
AmmoClass=Class'NicePack.NiceSingleAmmo'
AmmoClass=class'NiceSingleAmmo'
ShakeRotMag=(X=75.000000,Y=75.000000,Z=250.000000)
ShakeRotRate=(X=10000.000000,Y=10000.000000,Z=10000.000000)
ShakeRotTime=3.000000

View file

@ -74,7 +74,7 @@ defaultproperties
AmmoMesh=StaticMesh'KillingFloorStatics.DualiesAmmo'
CorrespondingPerkIndex=2
EquipmentCategoryID=1
InventoryType=Class'NicePack.NiceSingle'
InventoryType=class'NiceSingle'
PickupMessage="You got the 9mm handgun"
PickupSound=Sound'KF_9MMSnd.9mm_Pickup'
PickupForce="AssaultRiflePickup"

View file

@ -12,8 +12,8 @@ simulated function ReleaseNails(optional bool bServerOnly){
shotParams.damage = 52;
shotParams.projSpeed = 3500.0;
shotParams.momentum = 50000;
shotParams.shotDamageType = class'NicePack.NiceDamTypeNailGun';
shotParams.bulletClass = class'NicePack.NiceNail';
shotParams.shotDamageType = class'NiceDamTypeNailGun';
shotParams.bulletClass = class'NiceNail';
shotParams.bCausePain = true;
if(fireContext.instigator != none)
niceMut = class'NicePack'.static.Myself(fireContext.Instigator.Level);

View file

@ -450,70 +450,83 @@ function PlayFiring(){
if(!currentContext.bIsBursting)
FireCount ++;
}
// Handle setting new recoil
simulated function HandleRecoil(float Rec){
local int stationarySeconds;
local rotator NewRecoilRotation;
local NicePlayerController nicePlayer;
local NiceHumanPawn nicePawn;
local vector AdjustedVelocity;
local float AdjustedSpeed;
local KFWeapon kfWeap;
if(Instigator != none){
nicePlayer = NicePlayerController(Instigator.Controller);
nicePawn = NiceHumanPawn(Instigator);
}
if(nicePlayer == none || nicePawn == none)
return;
if(bResetRecoil || nicePlayer.IsZedTimeActive() && class'NiceVeterancyTypes'.static.hasSkill(nicePlayer, class'NiceSkillEnforcerZEDBarrage')){
Rec = 0.0;
bResetRecoil = false;
}
kfWeap= KFWeapon(Weapon);
if (kfWeap.bAimingRifle) {
Rec *= 0.5;
}
if(nicePawn.stationaryTime > 0.0 && class'NiceVeterancyTypes'.static.hasSkill(nicePlayer, class'NiceSkillHeavyStablePosition')){
stationarySeconds = Ceil(2 * nicePawn.stationaryTime) - 1;
Rec *= FMax(0.0, 1.0 - (stationarySeconds * class'NiceSkillHeavyStablePosition'.default.recoilDampeningBonus));
}
if(!nicePlayer.bFreeCamera){
if(Weapon.GetFireMode(ThisModeNum).bIsFiring || currentContext.bIsBursting){
NewRecoilRotation.Pitch = RandRange(maxVerticalRecoilAngle * 0.5, maxVerticalRecoilAngle);
NewRecoilRotation.Yaw = RandRange(maxHorizontalRecoilAngle * 0.5, maxHorizontalRecoilAngle);
if(!bRecoilRightOnly && Rand(2) == 1)
// Handle setting new recoil
simulated function HandleRecoil(float Rec)
{
local int stationarySeconds;
local rotator NewRecoilRotation;
local NicePlayerController nicePlayer;
local NiceHumanPawn nicePawn;
local vector AdjustedVelocity;
local float AdjustedSpeed;
local KFWeapon KFW;
if(Instigator != none)
{
nicePlayer = NicePlayerController(Instigator.Controller);
nicePawn = NiceHumanPawn(Instigator);
}
if(nicePlayer == none || nicePawn == none)
return;
if(bResetRecoil || nicePlayer.IsZedTimeActive() && class'NiceVeterancyTypes'.static.hasSkill(nicePlayer, class'NiceSkillEnforcerZEDBarrage'))
{
Rec = 0.0;
bResetRecoil = false;
}
KFW= KFWeapon(Weapon);
if (KFW.bAimingRifle)
{
Rec *= 0.5;
}
if (nicePawn.stationaryTime > 0.0 && class'NiceVeterancyTypes'.static.hasSkill(nicePlayer, class'NiceSkillHeavyStablePosition'))
{
stationarySeconds = Ceil(2 * nicePawn.stationaryTime) - 1;
Rec *= FMax(0.0, 1.0 - (stationarySeconds * class'NiceSkillHeavyStablePosition'.default.recoilDampeningBonus));
}
if (!nicePlayer.bFreeCamera)
{
if (Weapon.GetFireMode(ThisModeNum).bIsFiring || currentContext.bIsBursting)
{
NewRecoilRotation.Pitch = RandRange(maxVerticalRecoilAngle * 0.5, maxVerticalRecoilAngle);
NewRecoilRotation.Yaw = RandRange(maxHorizontalRecoilAngle * 0.5, maxHorizontalRecoilAngle);
if (!bRecoilRightOnly && Rand(2) == 1)
NewRecoilRotation.Yaw *= -1;
if(RecoilVelocityScale > 0){
if(Weapon.Owner != none && Weapon.Owner.Physics == PHYS_Falling &&
Weapon.Owner.PhysicsVolume.Gravity.Z > class'PhysicsVolume'.default.Gravity.Z){
AdjustedVelocity = Weapon.Owner.Velocity;
// Ignore Z velocity in low grav so we don't get massive recoil
AdjustedVelocity.Z = 0;
AdjustedSpeed = VSize(AdjustedVelocity);
if (RecoilVelocityScale > 0)
{
if (Weapon.Owner != none && Weapon.Owner.Physics == PHYS_Falling &&
Weapon.Owner.PhysicsVolume.Gravity.Z > class'PhysicsVolume'.default.Gravity.Z)
{
AdjustedVelocity = Weapon.Owner.Velocity;
// Ignore Z velocity in low grav so we don't get massive recoil
AdjustedVelocity.Z = 0;
AdjustedSpeed = VSize(AdjustedVelocity);
// Reduce the falling recoil in low grav
NewRecoilRotation.Pitch += (AdjustedSpeed * RecoilVelocityScale * 0.5);
NewRecoilRotation.Yaw += (AdjustedSpeed * RecoilVelocityScale * 0.5);
}
else{
NewRecoilRotation.Pitch += (VSize(Weapon.Owner.Velocity) * RecoilVelocityScale);
NewRecoilRotation.Yaw += (VSize(Weapon.Owner.Velocity) * RecoilVelocityScale);
}
}
// Reduce the falling recoil in low grav
NewRecoilRotation.Pitch += (AdjustedSpeed * RecoilVelocityScale * 0.5);
NewRecoilRotation.Yaw += (AdjustedSpeed * RecoilVelocityScale * 0.5);
}
else
{
NewRecoilRotation.Pitch += (VSize(Weapon.Owner.Velocity) * RecoilVelocityScale);
NewRecoilRotation.Yaw += (VSize(Weapon.Owner.Velocity) * RecoilVelocityScale);
}
}
NewRecoilRotation.Pitch += (Instigator.HealthMax / Instigator.Health * 5);
NewRecoilRotation.Yaw += (Instigator.HealthMax / Instigator.Health * 5);
NewRecoilRotation *= Rec;
NewRecoilRotation.Pitch += (Instigator.HealthMax / Instigator.Health * 5);
NewRecoilRotation.Yaw += (Instigator.HealthMax / Instigator.Health * 5);
NewRecoilRotation *= Rec;
if(default.FireRate <= 0)
nicePlayer.SetRecoil(NewRecoilRotation, RecoilRate);
else
nicePlayer.SetRecoil(NewRecoilRotation, RecoilRate * (FireRate / default.FireRate));
}
}
if (default.FireRate <= 0)
nicePlayer.SetRecoil(NewRecoilRotation, RecoilRate);
else
nicePlayer.SetRecoil(NewRecoilRotation, RecoilRate * (FireRate / default.FireRate));
}
}
}
function DoFireEffect(){
local bool bIsShotgunBullet, bForceComplexTraj;
local bool bPinpoint;
@ -541,7 +554,7 @@ function DoFireEffect(){
activeSpread *= class'NiceSkillEnforcerBombard'.default.spreadMult;
}
bIsShotgunBullet = ClassIsChildOf(fireShots[currentShot].bulletClass, class'NiceShotgunPellet');
if( bIsShotgunBullet && weapon.class != class'NicePack.NiceSpas' && weapon.class != class'NiceNailGun'
if( bIsShotgunBullet && weapon.class != class'NiceSpas' && weapon.class != class'NiceNailGun'
&& class'NiceVeterancyTypes'.static.hasSkill(nicePlayer, class'NiceSkillSupportSlugs') )
activeSpread = 0.0;
if(bIsShotgunBullet && activeSpread <= 0.0 && !bPinpoint)
@ -696,7 +709,7 @@ defaultproperties
ProjPerFire=1
ProjectileSpeed=1524.000000
MaxBurstLength=3
bulletClass=Class'NicePack.NiceBullet'
bulletClass=class'NiceBullet'
contBonus=1.200000
contBonusReset=True
maxBonusContLenght=1

View file

@ -1331,55 +1331,75 @@ function SetNiceData(NicePlainData.Data transferData, optional NiceHumanPawn new
secondaryCharge = class'NicePlainData'.static.GetInt(transferData, "ChargeAmount", 1);
ClientSetSndCharge(secondaryCharge);
}
simulated function ApplyLaserState(){
simulated function ApplyLaserState()
{
bLaserActive = LaserType > 0;
if(Role < ROLE_Authority)
ServerSetLaserType(LaserType);
if(NiceAttachment(ThirdPersonActor) != none)
NiceAttachment(ThirdPersonActor).SetLaserType(LaserType);
if (Role < ROLE_Authority)
ServerSetLaserType(LaserType);
if (NiceAttachment(ThirdPersonActor) != none)
NiceAttachment(ThirdPersonActor).SetLaserType(LaserType);
// Instigator accessed none fix
if (Instigator == none || !Instigator.IsLocallyControlled())
return;
if(!Instigator.IsLocallyControlled())
return;
if(bLaserActive){
if(LaserDot == none)
LaserDot = Spawn(LaserDotClass, self);
LaserDot.SetLaserType(LaserType);
if(altLaserAttachmentBone != ''){
if(altLaserDot == none)
altLaserDot = Spawn(LaserDotClass, self);
altLaserDot.SetLaserType(LaserType);
}
//spawn 1-st person laser attachment for weapon owner
if(LaserAttachment == none){
SetBoneRotation(LaserAttachmentBone, LaserAttachmentRotation);
LaserAttachment = Spawn(LaserAttachmentClass,,,,);
AttachToBone(LaserAttachment, LaserAttachmentBone);
if(LaserAttachment != none)
LaserAttachment.SetRelativeLocation(LaserAttachmentOffset);
}
if(altLaserAttachment == none && altLaserAttachmentBone != ''){
SetBoneRotation(altLaserAttachmentBone, altLaserAttachmentRotation);
altLaserAttachment = Spawn(LaserAttachmentClass,,,,);
AttachToBone(altLaserAttachment, altLaserAttachmentBone);
if(altLaserAttachment != none)
altLaserAttachment.SetRelativeLocation(altLaserAttachmentOffset);
}
ConstantColor'ScrnTex.Laser.LaserColor'.Color = LaserDot.GetLaserColor();
LaserAttachment.bHidden = false;
altLaserAttachment.bHidden = false;
if (bLaserActive)
{
if (LaserDot == none)
LaserDot = Spawn(LaserDotClass, self);
LaserDot.SetLaserType(LaserType);
if (altLaserAttachmentBone != '')
{
if (altLaserDot == none)
altLaserDot = Spawn(LaserDotClass, self);
altLaserDot.SetLaserType(LaserType);
}
// spawn 1-st person laser attachment for weapon owner
if (LaserAttachment == none)
{
SetBoneRotation(LaserAttachmentBone, LaserAttachmentRotation);
LaserAttachment = Spawn(LaserAttachmentClass,,,,);
if (LaserAttachment != none)
{
AttachToBone(LaserAttachment, LaserAttachmentBone);
LaserAttachment.SetRelativeLocation(LaserAttachmentOffset);
}
}
else
LaserAttachment.bHidden = false;
if (altLaserAttachment == none)
{
if (altLaserAttachmentBone != '')
{
SetBoneRotation(altLaserAttachmentBone, altLaserAttachmentRotation);
altLaserAttachment = Spawn(LaserAttachmentClass,,,,);
if (altLaserAttachment != none)
{
AttachToBone(altLaserAttachment, altLaserAttachmentBone);
altLaserAttachment.SetRelativeLocation(altLaserAttachmentOffset);
}
}
}
else
altLaserAttachment.bHidden = false;
ConstantColor'ScrnTex.Laser.LaserColor'.Color = LaserDot.GetLaserColor();
}
else{
if(LaserAttachment != none)
LaserAttachment.bHidden = true;
if(altLaserAttachment != none)
altLaserAttachment.bHidden = true;
if(LaserDot != none)
LaserDot.Destroy();
if(altLaserDot != none)
altLaserDot.Destroy();
else
{
if (LaserAttachment != none)
LaserAttachment.bHidden = true;
if (altLaserAttachment != none)
altLaserAttachment.bHidden = true;
if (LaserDot != none)
LaserDot.Destroy();
if (altLaserDot != none)
altLaserDot.Destroy();
}
}
simulated function ToggleLaser(){
if(!Instigator.IsLocallyControlled())
return;
@ -1578,12 +1598,36 @@ simulated function Destroyed(){
super(KFWeapon).Destroyed();
}
simulated function float GetAmmoMulti()
{
if (NextAmmoCheckTime > Level.TimeSeconds)
{
return LastAmmoResult;
}
NextAmmoCheckTime = Level.TimeSeconds + 1;
// Instigator accessed none fix
if (FireMode[0] != none && FireMode[0].AmmoClass != none && Instigator != none && KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo) != none &&
KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo).ClientVeteranSkill != none )
{
LastAmmoResult = KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo).ClientVeteranSkill.static.AddExtraAmmoFor(KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo), FireMode[0].AmmoClass);
}
else
{
LastAmmoResult = 1;
}
return LastAmmoResult;
}
defaultproperties
{
recordedZoomTime=-1.000000
SecondaryCharge=1
LaserAttachmentClass=Class'ScrnBalanceSrv.ScrnLaserAttachmentFirstPerson'
LaserDotClass=Class'ScrnBalanceSrv.ScrnLocalLaserDot'
LaserAttachmentClass=Class'ScrnLaserAttachmentFirstPerson'
LaserDotClass=Class'ScrnLocalLaserDot'
LaserAttachmentBone="LightBone"
MagazineBone="Magazine"
bHasChargePhase=True

View file

@ -2,11 +2,11 @@ class NiceAK12Ammo extends NiceAmmo;
#EXEC OBJ LOAD FILE=KillingFloorHUD.utx
defaultproperties
{
WeaponPickupClass=Class'NicePack.NiceAK12Pickup'
WeaponPickupClass=class'NiceAK12Pickup'
AmmoPickupAmount=30
MaxAmmo=270
InitialAmount=60
PickupClass=Class'NicePack.NiceAK12AmmoPickup'
PickupClass=class'NiceAK12AmmoPickup'
IconMaterial=Texture'KillingFloorHUD.Generic.HUD'
IconCoords=(X1=336,Y1=82,X2=382,Y2=125)
ItemName="5.45x39mm"

View file

@ -2,7 +2,7 @@ class NiceAK12AmmoPickup extends NiceAmmoPickup;
defaultproperties
{
AmmoAmount=30
InventoryType=Class'NicePack.NiceAK12Ammo'
InventoryType=class'NiceAK12Ammo'
PickupMessage="Rounds 5.45x39mm"
StaticMesh=StaticMesh'KillingFloorStatics.L85Ammo'
}

View file

@ -36,7 +36,7 @@ defaultproperties
SelectedHudImageRef="ScrnWeaponPack_T.AK12.AK12_select"
PlayerIronSightFOV=65.000000
ZoomedDisplayFOV=20.000000
FireModeClass(0)=Class'NicePack.NiceAK12Fire'
FireModeClass(0)=class'NiceAK12Fire'
FireModeClass(1)=Class'KFMod.NoFire'
PutDownAnim="PutDown"
SelectAnimRate=1.300000
@ -52,10 +52,10 @@ defaultproperties
CustomCrossHairTextureName="Crosshairs.HUD.Crosshair_Cross5"
InventoryGroup=4
GroupOffset=7
PickupClass=Class'NicePack.NiceAK12Pickup'
PickupClass=class'NiceAK12Pickup'
PlayerViewOffset=(X=-0.500000,Y=20.000000,Z=-3.000000)
BobDamping=6.000000
AttachmentClass=Class'NicePack.NiceAK12Attachment'
AttachmentClass=class'NiceAK12Attachment'
IconCoords=(X1=245,Y1=39,X2=329,Y2=79)
ItemName="AK12"
TransientSoundVolume=1.250000

View file

@ -15,7 +15,7 @@ defaultproperties
FireSoundRef="ScrnWeaponPack_SND.AK12.AK12_shot"
StereoFireSoundRef="ScrnWeaponPack_SND.AK12.AK12_shot"
NoAmmoSoundRef="ScrnWeaponPack_SND.AK12.AK12_empty"
DamageType=Class'NicePack.NiceDamTypeAK12AssaultRifle'
DamageType=class'NiceDamTypeAK12AssaultRifle'
DamageMax=68
Momentum=18500.000000
bPawnRapidFireAnim=True
@ -24,7 +24,7 @@ defaultproperties
TweenTime=0.025000
FireForce="AssaultRifleFire"
FireRate=0.095000
AmmoClass=Class'NicePack.NiceAK12Ammo'
AmmoClass=class'NiceAK12Ammo'
ShakeRotMag=(X=50.000000,Y=50.000000,Z=350.000000)
ShakeRotRate=(X=5000.000000,Y=5000.000000,Z=5000.000000)
ShakeRotTime=0.750000

View file

@ -15,7 +15,7 @@ defaultproperties
AmmoMesh=StaticMesh'KillingFloorStatics.L85Ammo'
CorrespondingPerkIndex=3
EquipmentCategoryID=2
InventoryType=Class'NicePack.NiceAK12AssaultRifle'
InventoryType=class'NiceAK12AssaultRifle'
PickupMessage="You got the AK-12"
PickupSound=Sound'ScrnWeaponPack_SND.AK12.AK12_select'
PickupForce="AssaultRiflePickup"

View file

@ -5,7 +5,7 @@ defaultproperties
bPenetrationHSOnly=True
MaxPenetrations=3
HeadShotDamageMult=1.300000
WeaponClass=Class'NicePack.NiceAK12AssaultRifle'
WeaponClass=class'NiceAK12AssaultRifle'
DeathString="%k killed %o (AK12)."
FemaleSuicide="%o shot herself in the foot."
MaleSuicide="%o shot himself in the foot."

View file

@ -2,11 +2,11 @@ class NiceAK47Ammo extends NiceAmmo;
#EXEC OBJ LOAD FILE=KillingFloorHUD.utx
defaultproperties
{
WeaponPickupClass=Class'NicePack.NiceAK47Pickup'
WeaponPickupClass=class'NiceAK47Pickup'
AmmoPickupAmount=30
MaxAmmo=240
InitialAmount=90
PickupClass=Class'NicePack.NiceAK47AmmoPickup'
PickupClass=class'NiceAK47AmmoPickup'
IconMaterial=Texture'KillingFloorHUD.Generic.HUD'
IconCoords=(X1=336,Y1=82,X2=382,Y2=125)
ItemName="AK47 bullets"

View file

@ -2,7 +2,7 @@ class NiceAK47AmmoPickup extends NiceAmmoPickup;
defaultproperties
{
AmmoAmount=30
InventoryType=Class'NicePack.NiceAK47Ammo'
InventoryType=class'NiceAK47Ammo'
PickupMessage="Rounds 7.62mm"
StaticMesh=StaticMesh'KillingFloorStatics.L85Ammo'
}

View file

@ -30,7 +30,7 @@ defaultproperties
SelectedHudImageRef="KillingFloor2HUD.WeaponSelect.Ak_47"
PlayerIronSightFOV=65.000000
ZoomedDisplayFOV=32.000000
FireModeClass(0)=Class'NicePack.NiceAK47Fire'
FireModeClass(0)=class'NiceAK47Fire'
FireModeClass(1)=Class'KFMod.NoFire'
PutDownAnim="PutDown"
SelectForce="SwitchToAssaultRifle"
@ -45,10 +45,10 @@ defaultproperties
CustomCrossHairTextureName="Crosshairs.HUD.Crosshair_Cross5"
InventoryGroup=3
GroupOffset=7
PickupClass=Class'NicePack.NiceAK47Pickup'
PickupClass=class'NiceAK47Pickup'
PlayerViewOffset=(X=18.000000,Y=22.000000,Z=-6.000000)
BobDamping=6.000000
AttachmentClass=Class'NicePack.NiceAK47Attachment'
AttachmentClass=class'NiceAK47Attachment'
IconCoords=(X1=245,Y1=39,X2=329,Y2=79)
ItemName="AK47"
TransientSoundVolume=1.250000

View file

@ -14,7 +14,7 @@ defaultproperties
FireSoundRef="KF_AK47Snd.AK47_Fire"
StereoFireSoundRef="KF_AK47Snd.AK47_FireST"
NoAmmoSoundRef="KF_AK47Snd.AK47_DryFire"
DamageType=Class'NicePack.NiceDamTypeAK47AssaultRifle'
DamageType=class'NiceDamTypeAK47AssaultRifle'
DamageMin=60
DamageMax=60
Momentum=8500.000000
@ -24,7 +24,7 @@ defaultproperties
TweenTime=0.025000
FireForce="AssaultRifleFire"
FireRate=0.109000
AmmoClass=Class'NicePack.NiceAK47Ammo'
AmmoClass=class'NiceAK47Ammo'
ShakeRotMag=(X=50.000000,Y=50.000000,Z=350.000000)
ShakeRotRate=(X=5000.000000,Y=5000.000000,Z=5000.000000)
ShakeRotTime=0.750000

View file

@ -17,7 +17,7 @@ defaultproperties
EquipmentCategoryID=2
VariantClasses(0)=Class'KFMod.GoldenAK47pickup'
VariantClasses(1)=Class'KFMod.NeonAK47Pickup'
InventoryType=Class'NicePack.NiceAK47AssaultRifle'
InventoryType=class'NiceAK47AssaultRifle'
PickupMessage="You got the AK47"
PickupSound=Sound'KF_AK47Snd.AK47_Pickup'
PickupForce="AssaultRiflePickup"

View file

@ -4,7 +4,7 @@ defaultproperties
{
MaxPenetrations=1
HeadShotDamageMult=2.000000
WeaponClass=Class'NicePack.NiceAK47AssaultRifle'
WeaponClass=class'NiceAK47AssaultRifle'
DeathString="%k killed %o (AK47)."
FemaleSuicide="%o shot herself in the foot."
MaleSuicide="%o shot himself in the foot."

View file

@ -3,7 +3,7 @@ class NiceDamTypeVALDT extends NiceDamageTypeVetCommando
defaultproperties
{
HeadShotDamageMult=1.500000
WeaponClass=Class'NicePack.NiceVALDTAssaultRifle'
WeaponClass=class'NiceVALDTAssaultRifle'
DeathString="%k killed %o (AS 'VAL')."
FemaleSuicide="%o shot herself in the foot."
MaleSuicide="%o shot himself in the foot."

View file

@ -2,11 +2,11 @@ class NiceVALDTAmmo extends NiceAmmo;
#EXEC OBJ LOAD FILE=KillingFloorHUD.utx
defaultproperties
{
WeaponPickupClass=Class'NicePack.NiceVALDTPickup'
WeaponPickupClass=class'NiceVALDTPickup'
AmmoPickupAmount=20
MaxAmmo=300
InitialAmount=75
PickupClass=Class'NicePack.NiceVALDTAmmoPickup'
PickupClass=class'NiceVALDTAmmoPickup'
IconMaterial=Texture'KillingFloorHUD.Generic.HUD'
IconCoords=(X1=336,Y1=82,X2=382,Y2=125)
ItemName="9x39mm"

View file

@ -2,7 +2,7 @@ class NiceVALDTAmmoPickup extends NiceAmmoPickup;
defaultproperties
{
AmmoAmount=20
InventoryType=Class'NicePack.NiceVALDTAmmo'
InventoryType=class'NiceVALDTAmmo'
PickupMessage="9x39mm"
StaticMesh=StaticMesh'KillingFloorStatics.L85Ammo'
}

View file

@ -29,8 +29,8 @@ defaultproperties
SelectedHudImageRef="ScrnWeaponPack_T.VAL.ValDT_selected"
PlayerIronSightFOV=65.000000
ZoomedDisplayFOV=32.000000
FireModeClass(0)=Class'NicePack.NiceVALDTFire'
FireModeClass(1)=Class'NicePack.NiceVALDTFire'
FireModeClass(0)=class'NiceVALDTFire'
FireModeClass(1)=class'NiceVALDTFire'
PutDownAnim="PutDown"
SelectForce="SwitchToAssaultRifle"
AIRating=0.550000
@ -44,7 +44,7 @@ defaultproperties
CustomCrossHairTextureName="Crosshairs.HUD.Crosshair_Cross5"
InventoryGroup=3
GroupOffset=7
PickupClass=Class'NicePack.NiceVALDTPickup'
PickupClass=class'NiceVALDTPickup'
PlayerViewOffset=(X=10.000000,Y=10.000000,Z=-5.000000)
BobDamping=5.000000
AttachmentClass=Class'ScrnWeaponPack.VALDTAttachment'

View file

@ -12,7 +12,7 @@ defaultproperties
FireSoundRef="ScrnWeaponPack_SND.VSS.VSS_Fire"
StereoFireSoundRef="ScrnWeaponPack_SND.VSS.VSS_Fire"
NoAmmoSoundRef="KF_AK47Snd.AK47_DryFire"
DamageType=Class'NicePack.NiceDamTypeVALDT'
DamageType=class'NiceDamTypeVALDT'
DamageMin=40
DamageMax=40
Momentum=18500.000000
@ -22,7 +22,7 @@ defaultproperties
TweenTime=0.025000
FireForce="AssaultRifleFire"
FireRate=0.089000
AmmoClass=Class'NicePack.NiceVALDTAmmo'
AmmoClass=class'NiceVALDTAmmo'
ShakeRotMag=(X=50.000000,Y=50.000000,Z=350.000000)
ShakeRotRate=(X=5000.000000,Y=5000.000000,Z=5000.000000)
ShakeRotTime=0.750000

View file

@ -14,7 +14,7 @@ defaultproperties
AmmoMesh=StaticMesh'KillingFloorStatics.L85Ammo'
CorrespondingPerkIndex=3
EquipmentCategoryID=2
InventoryType=Class'NicePack.NiceVALDTAssaultRifle'
InventoryType=class'NiceVALDTAssaultRifle'
PickupMessage="You've got a AS 'VAL'"
PickupSound=Sound'KF_AK47Snd.AK47_Pickup'
PickupForce="AssaultRiflePickup"

View file

@ -28,7 +28,7 @@ defaultproperties
SelectedHudImageRef="KillingFloorHUD.WeaponSelect.Bullpup"
PlayerIronSightFOV=65.000000
ZoomedDisplayFOV=40.000000
FireModeClass(0)=Class'NicePack.NiceBullpupFire'
FireModeClass(0)=class'NiceBullpupFire'
FireModeClass(1)=Class'KFMod.NoFire'
PutDownAnim="PutDown"
SelectForce="SwitchToAssaultRifle"
@ -43,10 +43,10 @@ defaultproperties
CustomCrossHairTextureName="Crosshairs.HUD.Crosshair_Cross5"
InventoryGroup=3
GroupOffset=1
PickupClass=Class'NicePack.NiceBullpupPickup'
PickupClass=class'NiceBullpupPickup'
PlayerViewOffset=(X=20.000000,Y=21.500000,Z=-9.000000)
BobDamping=6.000000
AttachmentClass=Class'NicePack.NiceBullpupAttachment'
AttachmentClass=class'NiceBullpupAttachment'
IconCoords=(X1=245,Y1=39,X2=329,Y2=79)
ItemName="Bullpup"
TransientSoundVolume=1.250000

View file

@ -2,11 +2,11 @@ class NiceBullpupAmmo extends NiceAmmo;
#EXEC OBJ LOAD FILE=KillingFloorHUD.utx
defaultproperties
{
WeaponPickupClass=Class'NicePack.NiceBullpupPickup'
WeaponPickupClass=class'NiceBullpupPickup'
AmmoPickupAmount=30
MaxAmmo=240
InitialAmount=45
PickupClass=Class'NicePack.NiceBullpupAmmoPickup'
PickupClass=class'NiceBullpupAmmoPickup'
IconMaterial=Texture'KillingFloorHUD.Generic.HUD'
IconCoords=(X1=336,Y1=82,X2=382,Y2=125)
ItemName="Bullpup bullets"

View file

@ -2,7 +2,7 @@ class NiceBullpupAmmoPickup extends NiceAmmoPickup;
defaultproperties
{
AmmoAmount=30
InventoryType=Class'NicePack.NiceBullpupAmmo'
InventoryType=class'NiceBullpupAmmo'
PickupMessage="Rounds (5.56 NATO)"
StaticMesh=StaticMesh'KillingFloorStatics.L85Ammo'
}

View file

@ -13,7 +13,7 @@ defaultproperties
FireSoundRef="KF_BullpupSnd.Bullpup_Fire"
StereoFireSoundRef="KF_BullpupSnd.Bullpup_FireST"
NoAmmoSoundRef="KF_9MMSnd.9mm_DryFire"
DamageType=Class'NicePack.NiceDamTypeBullpup'
DamageType=class'NiceDamTypeBullpup'
DamageMin=48
DamageMax=48
Momentum=8500.000000
@ -23,7 +23,7 @@ defaultproperties
TweenTime=0.025000
FireForce="AssaultRifleFire"
FireRate=0.100000
AmmoClass=Class'NicePack.NiceBullpupAmmo'
AmmoClass=class'NiceBullpupAmmo'
ShakeRotMag=(X=75.000000,Y=75.000000,Z=250.000000)
ShakeRotRate=(X=10000.000000,Y=10000.000000,Z=10000.000000)
ShakeRotTime=0.500000

View file

@ -16,7 +16,7 @@ defaultproperties
AmmoMesh=StaticMesh'KillingFloorStatics.L85Ammo'
CorrespondingPerkIndex=3
EquipmentCategoryID=2
InventoryType=Class'NicePack.NiceBullpup'
InventoryType=class'NiceBullpup'
PickupMessage="You got the Bullpup"
PickupForce="AssaultRiflePickup"
StaticMesh=StaticMesh'KF_pickups_Trip.Rifle.Bullpup_Pickup'

View file

@ -3,7 +3,7 @@ class NiceDamTypeBullpup extends NiceDamageTypeVetCommando
defaultproperties
{
HeadShotDamageMult=1.500000
WeaponClass=Class'NicePack.NiceBullpup'
WeaponClass=class'NiceBullpup'
DeathString="%k killed %o (Bullpup)."
FemaleSuicide="%o shot herself in the foot."
MaleSuicide="%o shot himself in the foot."

View file

@ -1,8 +1,8 @@
class NiceCZ805M extends CZ805M;
defaultproperties
{
FireModeClass(0)=Class'NicePack.NiceCZ805MFire'
FireModeClass(1)=Class'NicePack.NiceCZ805MAltFire'
PickupClass=Class'NicePack.NiceCZ805MPickup'
FireModeClass(0)=class'NiceCZ805MFire'
FireModeClass(1)=class'NiceCZ805MAltFire'
PickupClass=class'NiceCZ805MPickup'
ItemName="CZ-805M Medic/Assault Rifle NW"
}

View file

@ -1,5 +1,5 @@
class NiceCZ805MAltFire extends CZ805MAltFire;
defaultproperties
{
ProjectileClass=Class'NicePack.NiceCZ805MHealingProjectile'
ProjectileClass=class'NiceCZ805MHealingProjectile'
}

View file

@ -3,5 +3,5 @@ defaultproperties
{
MaxAmmo=300
InitialAmount=150
PickupClass=Class'NicePack.NiceCZ805MAmmoPickup'
PickupClass=class'NiceCZ805MAmmoPickup'
}

View file

@ -1,5 +1,5 @@
class NiceCZ805MAmmoPickup extends CZ805MAmmoPickup;
defaultproperties
{
InventoryType=Class'NicePack.NiceCZ805MAmmo'
InventoryType=class'NiceCZ805MAmmo'
}

View file

@ -3,7 +3,7 @@ defaultproperties
{
maxVerticalRecoilAngle=270
maxHorizontalRecoilAngle=135
DamageType=Class'NicePack.NiceDamTypeCZ805M'
DamageType=class'NiceDamTypeCZ805M'
DamageMax=40
AmmoClass=Class'NicePack.NiceCZ805MAmmo'
AmmoClass=class'NiceCZ805MAmmo'
}

View file

@ -6,6 +6,6 @@ defaultproperties
Description="Horzine's modification of CZ-805 BREN rifle with attached healing dart launcher. Useful for both Medic and Commando perks."
ItemName="CZ-805M NW"
ItemShortName="CZ-805M NW"
InventoryType=Class'NicePack.NiceCZ805M'
InventoryType=class'NiceCZ805M'
PickupMessage="You got the CZ-805M NW"
}

View file

@ -3,7 +3,7 @@ class NiceDamTypeCZ805M extends NiceDamageTypeVetCommando
defaultproperties
{
HeadShotDamageMult=1.500000
WeaponClass=Class'NicePack.NiceCZ805M'
WeaponClass=class'NiceCZ805M'
DeathString="%k killed %o (CZ 805)."
FemaleSuicide="%o shot herself in the foot."
MaleSuicide="%o shot himself in the foot."

View file

@ -5,7 +5,7 @@ defaultproperties
MaxPenetrations=3
flinchMultiplier=0.800000
HeadShotDamageMult=2.250000
WeaponClass=Class'NicePack.NiceFNFAL_ACOG_AssaultRifle'
WeaponClass=class'NiceFNFAL_ACOG_AssaultRifle'
DeathString="%k killed %o (FNFAL ACOG)."
FemaleSuicide="%o shot herself in the foot."
MaleSuicide="%o shot himself in the foot."

View file

@ -2,11 +2,11 @@ class NiceFNFALAmmo extends NiceAmmo;
#EXEC OBJ LOAD FILE=KillingFloorHUD.utx
defaultproperties
{
WeaponPickupClass=Class'NicePack.NiceFNFAL_ACOG_Pickup'
WeaponPickupClass=class'NiceFNFAL_ACOG_Pickup'
AmmoPickupAmount=20
MaxAmmo=180
InitialAmount=45
PickupClass=Class'NicePack.NiceFNFALAmmoPickup'
PickupClass=class'NiceFNFALAmmoPickup'
IconMaterial=Texture'KillingFloorHUD.Generic.HUD'
IconCoords=(X1=336,Y1=82,X2=382,Y2=125)
ItemName="FNFAL bullets"

View file

@ -2,7 +2,7 @@ class NiceFNFALAmmoPickup extends NiceAmmoPickup;
defaultproperties
{
AmmoAmount=20
InventoryType=Class'NicePack.NiceFNFALAmmo'
InventoryType=class'NiceFNFALAmmo'
PickupMessage="Rounds 7.62x51mm"
StaticMesh=StaticMesh'KillingFloorStatics.L85Ammo'
}

View file

@ -16,7 +16,7 @@ defaultproperties
FireSoundRef="KF_FNFALSnd.FNFAL_Fire_Single_M"
StereoFireSoundRef="KF_FNFALSnd.FNFAL_Fire_Single_S"
NoAmmoSoundRef="KF_SCARSnd.SCAR_DryFire"
DamageType=Class'NicePack.NiceDamTypeFNFALAssaultRifle'
DamageType=class'NiceDamTypeFNFALAssaultRifle'
DamageMin=66
DamageMax=66
Momentum=8500.000000
@ -27,7 +27,7 @@ defaultproperties
TweenTime=0.025000
FireForce="AssaultRifleFire"
FireRate=0.100000
AmmoClass=Class'NicePack.NiceFNFALAmmo'
AmmoClass=class'NiceFNFALAmmo'
ShakeRotMag=(X=80.000000,Y=80.000000,Z=450.000000)
ShakeRotRate=(X=7500.000000,Y=7500.000000,Z=7500.000000)
ShakeRotTime=0.650000

View file

@ -26,7 +26,7 @@ defaultproperties
SelectedHudImageRef="KillingFloor2HUD.WeaponSelect.FNFAL"
PlayerIronSightFOV=55.000000
ZoomedDisplayFOV=15.000000
FireModeClass(0)=Class'NicePack.NiceFNFALFire'
FireModeClass(0)=class'NiceFNFALFire'
FireModeClass(1)=Class'KFMod.NoFire'
PutDownAnim="PutDown"
SelectForce="SwitchToAssaultRifle"
@ -41,10 +41,10 @@ defaultproperties
CustomCrossHairTextureName="Crosshairs.HUD.Crosshair_Cross5"
InventoryGroup=4
GroupOffset=12
PickupClass=Class'NicePack.NiceFNFAL_ACOG_Pickup'
PickupClass=class'NiceFNFAL_ACOG_Pickup'
PlayerViewOffset=(X=3.000000,Y=15.000000,Z=-6.000000)
BobDamping=6.000000
AttachmentClass=Class'NicePack.NiceFNFAL_ACOG_Attachment'
AttachmentClass=class'NiceFNFAL_ACOG_Attachment'
IconCoords=(X1=245,Y1=39,X2=329,Y2=79)
ItemName="FNFAL"
TransientSoundVolume=1.250000

View file

@ -15,7 +15,7 @@ defaultproperties
AmmoMesh=StaticMesh'KillingFloorStatics.L85Ammo'
CorrespondingPerkIndex=3
EquipmentCategoryID=3
InventoryType=Class'NicePack.NiceFNFAL_ACOG_AssaultRifle'
InventoryType=class'NiceFNFAL_ACOG_AssaultRifle'
PickupMessage="You got the FN FAL with ACOG Sight"
PickupSound=Sound'KF_FNFALSnd.FNFAL_Pickup'
PickupForce="AssaultRiflePickup"

View file

@ -3,7 +3,7 @@ defaultproperties
{
MaxPenetrations=2
HeadShotDamageMult=2.000000
WeaponClass=Class'NicePack.NiceHK417AR'
WeaponClass=class'NiceHK417AR'
DeathString="%k killed %o (HK-417)."
FemaleSuicide="%o shot herself in the foot."
MaleSuicide="%o shot himself in the foot."

View file

@ -41,7 +41,7 @@ defaultproperties
SelectedHudImageRef="ScrnWeaponPack_T.HK417AR.HK417_selected"
PlayerIronSightFOV=32.000000
ZoomedDisplayFOV=60.000000
FireModeClass(0)=Class'NicePack.NiceHK417Fire'
FireModeClass(0)=class'NiceHK417Fire'
FireModeClass(1)=Class'KFMod.NoFire'
PutDownAnim="PutDown"
SelectAnimRate=2.000000
@ -56,10 +56,10 @@ defaultproperties
CustomCrossHairTextureName="Crosshairs.HUD.Crosshair_Cross5"
InventoryGroup=4
GroupOffset=3
PickupClass=Class'NicePack.NiceHK417Pickup'
PickupClass=class'NiceHK417Pickup'
PlayerViewOffset=(X=14.000000,Y=7.000000,Z=-4.000000)
BobDamping=6.000000
AttachmentClass=Class'NicePack.NiceHK417Attachment'
AttachmentClass=class'NiceHK417Attachment'
IconCoords=(X1=253,Y1=146,X2=333,Y2=181)
ItemName="HK-417"
}

View file

@ -2,7 +2,7 @@ class NiceHK417Ammo extends NiceAmmo;
#EXEC OBJ LOAD FILE=InterfaceContent.utx
defaultproperties
{
WeaponPickupClass=Class'NicePack.NiceHK417Pickup'
WeaponPickupClass=class'NiceHK417Pickup'
AmmoPickupAmount=20
MaxAmmo=180
InitialAmount=45

View file

@ -2,6 +2,6 @@ class NiceHK417AmmoPickup extends NiceAmmoPickup;
defaultproperties
{
AmmoAmount=20
InventoryType=Class'NicePack.NiceHK417Ammo'
InventoryType=class'NiceHK417Ammo'
PickupMessage="7.62x51mm NATO"
}

View file

@ -11,7 +11,7 @@ defaultproperties
FireSoundRef="ScrnWeaponPack_SND.HK417AR.HK417_shot"
StereoFireSoundRef="ScrnWeaponPack_SND.HK417AR.HK417_shot"
NoAmmoSoundRef="ScrnWeaponPack_SND.HK417AR.HK417_empty"
DamageType=Class'NicePack.NiceDamTypeHK417AR'
DamageType=class'NiceDamTypeHK417AR'
DamageMin=75
DamageMax=75
Momentum=20000.000000
@ -22,7 +22,7 @@ defaultproperties
TweenTime=0.025000
FireForce="AssaultRifleFire"
FireRate=0.230000
AmmoClass=Class'NicePack.NiceHK417Ammo'
AmmoClass=class'NiceHK417Ammo'
ShakeRotMag=(X=50.000000,Y=50.000000,Z=300.000000)
ShakeRotRate=(X=9500.000000,Y=9500.000000,Z=9500.000000)
ShakeRotTime=0.650000

View file

@ -13,7 +13,7 @@ defaultproperties
AmmoItemName="7.62x51mm NATO"
CorrespondingPerkIndex=3
EquipmentCategoryID=2
InventoryType=Class'NicePack.NiceHK417AR'
InventoryType=class'NiceHK417AR'
PickupMessage="You've got a HK-417"
PickupSound=Sound'ScrnWeaponPack_SND.HK417AR.HK417_pickup'
PickupForce="AssaultRiflePickup"

View file

@ -5,7 +5,7 @@ defaultproperties
badDecapMod=0.8000
HeadShotDamageMult=1.400000
bSniperWeapon=True
WeaponClass=Class'NicePack.NiceL85A2Z'
WeaponClass=class'NiceL85A2Z'
DeathString="%k killed %o."
FemaleSuicide="%o shot herself in the foot."
MaleSuicide="%o shot himself in the foot."

View file

@ -2,11 +2,11 @@ class NiceL85A2Ammo extends NiceAmmo;
#EXEC OBJ LOAD FILE=InterfaceContent.utx
defaultproperties
{
WeaponPickupClass=Class'NicePack.NiceL85A2Pickup'
WeaponPickupClass=class'NiceL85A2Pickup'
AmmoPickupAmount=30
MaxAmmo=210
InitialAmount=45
PickupClass=Class'NicePack.NiceL85A2AmmoPickup'
PickupClass=class'NiceL85A2AmmoPickup'
IconMaterial=Texture'KillingFloorHUD.Generic.HUD'
IconCoords=(X1=413,Y1=82,X2=457,Y2=125)
ItemName="Stanag Magazines"

View file

@ -2,7 +2,7 @@ class NiceL85A2AmmoPickup extends NiceAmmoPickup;
defaultproperties
{
AmmoAmount=30
InventoryType=Class'NicePack.NiceL85A2Ammo'
InventoryType=class'NiceL85A2Ammo'
RespawnTime=0.000000
PickupMessage="Mag (5.56mm)"
StaticMesh=StaticMesh'KillingFloorStatics.DualiesAmmo'

View file

@ -14,7 +14,7 @@ defaultproperties
FireSoundRef="KF_M4RifleSnd.M4Rifle_Fire_Single_M"
StereoFireSoundRef="KF_M4RifleSnd.M4Rifle_Fire_Single_S"
NoAmmoSoundRef="KF_AK47Snd.AK47_DryFire"
DamageType=Class'NicePack.NiceDamTypeL85A2Z'
DamageType=class'NiceDamTypeL85A2Z'
DamageMin=81
DamageMax=81
Momentum=10000.000000
@ -25,7 +25,7 @@ defaultproperties
TweenTime=0.025000
FireForce="AssaultRifleFire"
FireRate=0.250000
AmmoClass=Class'NicePack.NiceL85A2Ammo'
AmmoClass=class'NiceL85A2Ammo'
ShakeRotMag=(X=75.000000,Y=75.000000,Z=250.000000)
ShakeRotRate=(X=10000.000000,Y=10000.000000,Z=10000.000000)
ShakeRotTime=3.000000

View file

@ -15,7 +15,7 @@ defaultproperties
AmmoMesh=StaticMesh'KillingFloorStatics.L85Ammo'
CorrespondingPerkIndex=3
EquipmentCategoryID=3
InventoryType=Class'NicePack.NiceL85A2Z'
InventoryType=class'NiceL85A2Z'
PickupMessage="You got the L85A2"
PickupSound=Sound'KF_FNFALSnd.FNFAL_Pickup'
PickupForce="AssaultRiflePickup"

View file

@ -37,7 +37,7 @@ defaultproperties
SelectedHudImageRef="NicePackT.L85A2.L85A2_Selected"
PlayerIronSightFOV=40.000000
ZoomedDisplayFOV=65.000000
FireModeClass(0)=Class'NicePack.NiceL85A2Fire'
FireModeClass(0)=class'NiceL85A2Fire'
FireModeClass(1)=Class'KFMod.NoFire'
PutDownAnim="PutDown"
SelectAnimRate=1.500000
@ -53,10 +53,10 @@ defaultproperties
CustomCrossHairTextureName="Crosshairs.HUD.Crosshair_Cross5"
InventoryGroup=3
GroupOffset=1
PickupClass=Class'NicePack.NiceL85A2Pickup'
PickupClass=class'NiceL85A2Pickup'
PlayerViewOffset=(X=20.000000,Y=25.000000,Z=-10.000000)
BobDamping=6.000000
AttachmentClass=Class'NicePack.NiceL85A2Attachment'
AttachmentClass=class'NiceL85A2Attachment'
IconCoords=(X1=434,Y1=253,X2=506,Y2=292)
ItemName="L85A2"
}

View file

@ -3,7 +3,7 @@ class NiceDamTypeM4AssaultRifle extends NiceDamageTypeVetCommando
defaultproperties
{
HeadShotDamageMult=1.500000
WeaponClass=Class'NicePack.NiceM4AssaultRifle'
WeaponClass=class'NiceM4AssaultRifle'
DeathString="%k killed %o (M4)."
FemaleSuicide="%o shot herself in the foot."
MaleSuicide="%o shot himself in the foot."

View file

@ -2,11 +2,11 @@ class NiceM4Ammo extends NiceAmmo;
#EXEC OBJ LOAD FILE=KillingFloorHUD.utx
defaultproperties
{
WeaponPickupClass=Class'NicePack.NiceM4Pickup'
WeaponPickupClass=class'NiceM4Pickup'
AmmoPickupAmount=30
MaxAmmo=240
InitialAmount=60
PickupClass=Class'NicePack.NiceM4AmmoPickup'
PickupClass=class'NiceM4AmmoPickup'
IconMaterial=Texture'KillingFloorHUD.Generic.HUD'
IconCoords=(X1=336,Y1=82,X2=382,Y2=125)
ItemName="M4 bullets"

View file

@ -2,7 +2,7 @@ class NiceM4AmmoPickup extends NiceAmmoPickup;
defaultproperties
{
AmmoAmount=30
InventoryType=Class'NicePack.NiceM4Ammo'
InventoryType=class'NiceM4Ammo'
PickupMessage="Rounds 5.56mm"
StaticMesh=StaticMesh'KillingFloorStatics.L85Ammo'
}

View file

@ -29,7 +29,7 @@ defaultproperties
SelectedHudImageRef="KillingFloor2HUD.WeaponSelect.M4"
PlayerIronSightFOV=65.000000
ZoomedDisplayFOV=45.000000
FireModeClass(0)=Class'NicePack.NiceM4Fire'
FireModeClass(0)=class'NiceM4Fire'
FireModeClass(1)=Class'KFMod.NoFire'
PutDownAnim="PutDown"
SelectForce="SwitchToAssaultRifle"
@ -44,10 +44,10 @@ defaultproperties
CustomCrossHairTextureName="Crosshairs.HUD.Crosshair_Cross5"
InventoryGroup=3
GroupOffset=10
PickupClass=Class'NicePack.NiceM4Pickup'
PickupClass=class'NiceM4Pickup'
PlayerViewOffset=(X=25.000000,Y=18.000000,Z=-6.000000)
BobDamping=6.000000
AttachmentClass=Class'NicePack.NiceM4Attachment'
AttachmentClass=class'NiceM4Attachment'
IconCoords=(X1=245,Y1=39,X2=329,Y2=79)
ItemName="M4"
TransientSoundVolume=1.250000

View file

@ -14,12 +14,12 @@ defaultproperties
FireSoundRef="KF_M4RifleSnd.M4Rifle_Fire_Single_M"
StereoFireSoundRef="KF_M4RifleSnd.M4Rifle_Fire_Single_S"
NoAmmoSoundRef="KF_AK47Snd.AK47_DryFire"
DamageType=Class'NicePack.NiceDamTypeM4AssaultRifle'
DamageType=class'NiceDamTypeM4AssaultRifle'
DamageMin=69
DamageMax=69
Momentum=8500.000000
FireRate=0.075000
AmmoClass=Class'NicePack.NiceM4Ammo'
AmmoClass=class'NiceM4Ammo'
ShakeRotMag=(X=50.000000,Y=50.000000,Z=350.000000)
ShakeRotRate=(X=5000.000000,Y=5000.000000,Z=5000.000000)
ShakeRotTime=0.750000

View file

@ -16,7 +16,7 @@ defaultproperties
CorrespondingPerkIndex=3
EquipmentCategoryID=2
VariantClasses(0)=Class'KFMod.CamoM4Pickup'
InventoryType=Class'NicePack.NiceM4AssaultRifle'
InventoryType=class'NiceM4AssaultRifle'
PickupMessage="You got the M4"
PickupSound=Sound'KF_M4RifleSnd.foley.WEP_M4_Foley_Pickup'
PickupForce="AssaultRiflePickup"

Some files were not shown because too many files have changed in this diff Show more