Zed fixes #16

Merged
dkanus merged 24 commits from :fpfix into master 2022-03-03 15:43:35 +03:00
23 changed files with 496 additions and 420 deletions

View File

@ -1,5 +1,6 @@
class NiceGUIBuyMenu extends UT2k4MainPage; class NiceGUIBuyMenu extends UT2k4MainPage;
//The "Header"
// The "Header"
var automated GUIImage HeaderBG_Left; var automated GUIImage HeaderBG_Left;
var automated GUIImage HeaderBG_Center; var automated GUIImage HeaderBG_Center;
var automated GUIImage HeaderBG_Right; var automated GUIImage HeaderBG_Right;
@ -11,12 +12,12 @@ var automated KFQuickPerkSelect QuickPerkSelect;
var automated KFBuyMenuFilter BuyMenuFilter; var automated KFBuyMenuFilter BuyMenuFilter;
var automated GUIButton StoreTabButton; var automated GUIButton StoreTabButton;
var automated GUIButton PerkTabButton; var automated GUIButton PerkTabButton;
//The "Footer" // The "Footer"
var automated GUIImage WeightBG; var automated GUIImage WeightBG;
var automated GUIImage WeightIcon; var automated GUIImage WeightIcon;
var automated GUIImage WeightIconBG; var automated GUIImage WeightIconBG;
var automated KFWeightBar WeightBar; var automated KFWeightBar WeightBar;
//const BUYLIST_CATS =7; // const BUYLIST_CATS =7;
var() editconst noexport float SavedPitch; var() editconst noexport float SavedPitch;
var color RedColor; var color RedColor;
var color GreenGreyColor; var color GreenGreyColor;
@ -26,9 +27,11 @@ var localized string NoActivePerk;
var localized string TraderClose; var localized string TraderClose;
var localized string WaveString; var localized string WaveString;
var localized string LvAbbrString; var localized string LvAbbrString;
function InitComponent(GUIController MyC, GUIComponent MyO) function InitComponent(GUIController MyC, GUIComponent MyO)
{ {
local int i; local int i;
super.InitComponent(MyC, MyO); super.InitComponent(MyC, MyO);
c_Tabs.BackgroundImage = none; c_Tabs.BackgroundImage = none;
c_Tabs.BackgroundStyle = none; c_Tabs.BackgroundStyle = none;
@ -39,14 +42,17 @@ function InitComponent(GUIController MyC, GUIComponent MyO)
} }
UpdateWeightBar(); UpdateWeightBar();
} }
function InitTabs() function InitTabs()
{ {
local int i; local int i;
for ( i = 0; i < PanelCaption.Length && i < PanelClass.Length && i < PanelHint.Length; i++ ) for ( i = 0; i < PanelCaption.Length && i < PanelClass.Length && i < PanelHint.Length; i++ )
{ {
c_Tabs.AddTab(PanelCaption[i], PanelClass[i],, PanelHint[i]); c_Tabs.AddTab(PanelCaption[i], PanelClass[i],, PanelHint[i]);
} }
} }
function UpdateWeightBar() function UpdateWeightBar()
{ {
if ( KFHumanPawn(PlayerOwner().Pawn) != none ) if ( KFHumanPawn(PlayerOwner().Pawn) != none )
@ -55,9 +61,11 @@ function UpdateWeightBar()
WeightBar.CurBoxes = KFHumanPawn(PlayerOwner().Pawn).CurrentWeight; WeightBar.CurBoxes = KFHumanPawn(PlayerOwner().Pawn).CurrentWeight;
} }
} }
event Opened(GUIComponent Sender) event Opened(GUIComponent Sender)
{ {
local rotator PlayerRot; local rotator PlayerRot;
super.Opened(Sender); super.Opened(Sender);
c_Tabs.ActivateTabByName(PanelCaption[0], true); c_Tabs.ActivateTabByName(PanelCaption[0], true);
// Tell the controller that he is on a shopping spree // Tell the controller that he is on a shopping spree
@ -78,29 +86,37 @@ event Opened(GUIComponent Sender)
PlayerOwner().SetRotation(PlayerRot); PlayerOwner().SetRotation(PlayerRot);
SetTimer(0.05f, true); SetTimer(0.05f, true);
} }
function Timer() function Timer()
{ {
UpdateHeader(); UpdateHeader();
UpdateWeightBar(); UpdateWeightBar();
} }
function InternalOnClose(optional bool bCanceled) function InternalOnClose(optional bool bCanceled)
{ {
local rotator NewRot; local rotator NewRot;
// Reset player // Reset player
NewRot = PlayerOwner().Rotation; NewRot = PlayerOwner().Rotation;
NewRot.Pitch = SavedPitch; NewRot.Pitch = SavedPitch;
PlayerOwner().SetRotation(NewRot); PlayerOwner().SetRotation(NewRot);
Super.OnClose(bCanceled); super.OnClose(bCanceled);
} }
function UpdateHeader() function UpdateHeader()
{ {
local int TimeLeftMin, TimeLeftSec; local int TimeLeftMin, TimeLeftSec;
local string TimeString; local string TimeString;
local KFGameReplicationInfo KFGRI;
if ( KFPlayerController(PlayerOwner()) == none || PlayerOwner().PlayerReplicationInfo == none || if ( KFPlayerController(PlayerOwner()) == none || PlayerOwner().PlayerReplicationInfo == none ||
PlayerOwner().GameReplicationInfo == none ) PlayerOwner().GameReplicationInfo == none )
{ {
return; return;
} }
KFGRI = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo);
// Current Perk // Current Perk
if ( KFPlayerController(PlayerOwner()).SelectedVeterancy != none ) if ( KFPlayerController(PlayerOwner()).SelectedVeterancy != none )
{ {
@ -110,9 +126,10 @@ function UpdateHeader()
{ {
CurrentPerkLabel.Caption = CurrentPerk$":" @ NoActivePerk; CurrentPerkLabel.Caption = CurrentPerk$":" @ NoActivePerk;
} }
// Trader time left // Trader time left
TimeLeftMin = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave / 60; TimeLeftMin = KFGRI.TimeToNextWave / 60;
TimeLeftSec = KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave % 60; TimeLeftSec = KFGRI.TimeToNextWave % 60;
if ( TimeLeftMin < 1 ) if ( TimeLeftMin < 1 )
{ {
TimeString = "00:"; TimeString = "00:";
@ -121,6 +138,7 @@ function UpdateHeader()
{ {
TimeString = "0" $ TimeLeftMin $ ":"; TimeString = "0" $ TimeLeftMin $ ":";
} }
if ( TimeLeftSec >= 10 ) if ( TimeLeftSec >= 10 )
{ {
TimeString = TimeString $ TimeLeftSec; TimeString = TimeString $ TimeLeftSec;
@ -129,8 +147,9 @@ function UpdateHeader()
{ {
TimeString = TimeString $ "0" $ TimeLeftSec; TimeString = TimeString $ "0" $ TimeLeftSec;
} }
TimeLeftLabel.Caption = TraderClose @ TimeString; TimeLeftLabel.Caption = TraderClose @ TimeString;
if ( KFGameReplicationInfo(PlayerOwner().GameReplicationInfo).TimeToNextWave < 10 ) if ( KFGRI.TimeToNextWave < 10 )
{ {
TimeLeftLabel.TextColor = RedColor; TimeLeftLabel.TextColor = RedColor;
} }
@ -138,26 +157,31 @@ function UpdateHeader()
{ {
TimeLeftLabel.TextColor = GreenGreyColor; TimeLeftLabel.TextColor = GreenGreyColor;
} }
// Wave Counter // 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) function KFBuyMenuClosed(optional bool bCanceled)
{ {
local rotator NewRot; local rotator NewRot;
// Reset player // Reset player
NewRot = PlayerOwner().Rotation; NewRot = PlayerOwner().Rotation;
NewRot.Pitch = SavedPitch; NewRot.Pitch = SavedPitch;
PlayerOwner().SetRotation(NewRot); PlayerOwner().SetRotation(NewRot);
Super.OnClose(bCanceled); super.OnClose(bCanceled);
if ( KFPlayerController(PlayerOwner()) != none ) if ( KFPlayerController(PlayerOwner()) != none )
{ {
KFPlayerController(PlayerOwner()).bShopping = false; KFPlayerController(PlayerOwner()).bShopping = false;
} }
} }
function CloseSale(bool savePurchases) function CloseSale(bool savePurchases)
{ {
Controller.CloseMenu(!savePurchases); Controller.CloseMenu(!savePurchases);
} }
function bool ButtonClicked(GUIComponent Sender) function bool ButtonClicked(GUIComponent Sender)
{ {
if ( Sender == PerkTabButton ) if ( Sender == PerkTabButton )
@ -170,6 +194,7 @@ function bool ButtonClicked(GUIComponent Sender)
} }
return true; return true;
} }
defaultproperties defaultproperties
{ {
Begin Object Class=GUIImage Name=HBGLeft Begin Object Class=GUIImage Name=HBGLeft

View File

@ -63,14 +63,14 @@ function PostRender(Canvas C)
local NicePlayerController nicePlayer; local NicePlayerController nicePlayer;
local ScrnHUD scrnHUDInstance; local ScrnHUD scrnHUDInstance;
// TODO maybe use scrnhud? // TODO maybe use scrnhud?
local HUDKillingFloor kfHud; // local HUDKillingFloor kfHud;
local Texture barTexture; local Texture barTexture;
local int x, y, center, barWidth, offset; local int x, y, center, barWidth, offset;
local int missesWidth, missesHeight, missesSpace; local int missesWidth, missesHeight, missesSpace;
local int missesX, missesY; local int missesX, missesY;
local Vector CamPos, ViewDir; // local Vector CamPos, ViewDir;
local Rotator CamRot; // local Rotator CamRot;
local float OffsetX, BarLength, BarHeight, XL, YL, posY; // local float OffsetX, BarLength, BarHeight, XL, YL, posY;
if(C == none) return; if(C == none) return;
if(C.ViewPort == none) return; if(C.ViewPort == none) return;
@ -170,17 +170,21 @@ function PostRender(Canvas C)
x += 128 + 4; x += 128 + 4;
} }
} }
//// Draw weapons progress bars //// Draw weapons progress bars
if(nicePlayer != none && nicePlayer.bFlagDisplayWeaponProgress) if (class'NiceVeterancyTypes'.static.hasSkill(nicePlayer, class'NiceSkillEnforcerMultitasker')
&& nicePlayer.bFlagDisplayWeaponProgress && niceMutator.niceWeapProgressSet.length > 0)
{ {
x = C.ClipX - InventoryBoxWidth * C.ClipX - 5; x = C.ClipX - InventoryBoxWidth * C.ClipX - 5;
y = C.ClipY * 0.5 - 0.5 * (InventoryBoxHeight * C.ClipX + 4) * niceMutator.niceWeapProgressSet.Length; y = C.ClipY * 0.5 - 0.5 * (InventoryBoxHeight * C.ClipX + 4) * niceMutator.niceWeapProgressSet.Length;
for(i = 0;i < niceMutator.niceWeapProgressSet.Length;i ++){ for (i = 0;i < niceMutator.niceWeapProgressSet.Length;i ++)
{
DrawWeaponProgress(C, niceMutator.niceWeapProgressSet[i], x, y, DrawWeaponProgress(C, niceMutator.niceWeapProgressSet[i], x, y,
C.ViewPort.Actor.Pawn.PlayerReplicationInfo.Team); C.ViewPort.Actor.Pawn.PlayerReplicationInfo.Team);
y += (InventoryBoxHeight * C.ClipX + 4); y += (InventoryBoxHeight * C.ClipX + 4);
} }
} }
//// Draw invincibility bar //// Draw invincibility bar
nicePawn = NiceHumanPawn(nicePlayer.pawn); nicePawn = NiceHumanPawn(nicePlayer.pawn);
if(nicePawn != none && nicePawn.invincibilityTimer != 0.0) if(nicePawn != none && nicePawn.invincibilityTimer != 0.0)
@ -355,15 +359,18 @@ function DrawCalibrationStars(Canvas C){
x += 32 + 16; x += 32 + 16;
} }
} }
function DrawWeaponProgress(Canvas C, NicePack.WeaponProgressDisplay weapProgress, int x, int y, TeamInfo team){
function DrawWeaponProgress(Canvas C, NicePack.WeaponProgressDisplay weapProgress, int x, int y, TeamInfo team)
{
local float textWidth, textHeight; local float textWidth, textHeight;
local string textToDraw; local string textToDraw;
local float TempWidth, TempHeight, TempBorder; local float TempWidth, TempHeight, TempBorder;
TempWidth = InventoryBoxWidth * C.ClipX; TempWidth = InventoryBoxWidth * C.ClipX;
TempHeight = InventoryBoxHeight * C.ClipX; TempHeight = InventoryBoxHeight * C.ClipX;
TempBorder = BorderSize * C.ClipX; TempBorder = BorderSize * C.ClipX;
// Draw background bar // Draw background bar
if(team.teamIndex == 0) if (team.teamIndex == 0)
C.SetDrawColor(255, 64, 64, 64); C.SetDrawColor(255, 64, 64, 64);
else else
C.SetDrawColor(team.teamColor.R, team.teamColor.G, team.teamColor.B, 64); C.SetDrawColor(team.teamColor.R, team.teamColor.G, team.teamColor.B, 64);
@ -387,7 +394,8 @@ function DrawWeaponProgress(Canvas C, NicePack.WeaponProgressDisplay weapProgres
C.SetDrawColor(255, 64, 64); C.SetDrawColor(255, 64, 64);
else else
C.SetDrawColor(team.teamColor.R, team.teamColor.G, team.teamColor.B); C.SetDrawColor(team.teamColor.R, team.teamColor.G, team.teamColor.B);
if(weapProgress.bShowCounter){ if(weapProgress.bShowCounter)
{
textToDraw = string(weapProgress.counter); textToDraw = string(weapProgress.counter);
C.Font = class'ROHUD'.Static.LoadSmallFontStatic(5); C.Font = class'ROHUD'.Static.LoadSmallFontStatic(5);
C.TextSize(textToDraw, textWidth, textHeight); C.TextSize(textToDraw, textWidth, textHeight);
@ -395,6 +403,7 @@ function DrawWeaponProgress(Canvas C, NicePack.WeaponProgressDisplay weapProgres
C.DrawText(textToDraw); 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 bool bNeedsReload;
local string Alias, LeftPart, RigthPart; local string Alias, LeftPart, RigthPart;

View File

@ -1,8 +1,10 @@
// made to fix KFStoryGameInfo loading for KFO maps // made to fix KFStoryGameInfo loading for KFO maps
class NiceGameType extends ScrnGameType; class NiceGameType extends ScrnGameType;
var NicePack NicePackMutator; var NicePack NicePackMutator;
var bool lessDramatic; var bool lessDramatic;
var float LesserZedTimeSlomoScale; var float LesserZedTimeSlomoScale;
function RegisterMutator(NicePack activePack){ function RegisterMutator(NicePack activePack){
NicePackMutator = activePack; NicePackMutator = activePack;
} }
@ -77,7 +79,7 @@ function ScoreKill(Controller Killer, Controller Other)
local Controller C; local Controller C;
OtherPRI = Other.PlayerReplicationInfo; OtherPRI = Other.PlayerReplicationInfo;
if ( OtherPRI != None ) if ( OtherPRI != none )
{ {
OtherPRI.NumLives++; OtherPRI.NumLives++;
OtherPRI.Score -= (OtherPRI.Score * (GameDifficulty * 0.05)); // you Lose 35% of your current cash on Hell on Earth, 15% on normal. 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.Team.NetUpdateTime = Level.TimeSeconds - 1;
OtherPRI.bOutOfLives = true; 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); 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); BroadcastLocalizedMessage(class'KFInvasionMessage',1,OtherPRI);
else BroadcastLocalizedMessage(class'KFInvasionMessage',1,OtherPRI,,Killer.Pawn.Class); else BroadcastLocalizedMessage(class'KFInvasionMessage',1,OtherPRI,,Killer.Pawn.Class);
CheckScore(None); CheckScore(none);
} }
if ( GameRulesModifiers != None ) if ( GameRulesModifiers != none )
GameRulesModifiers.ScoreKill(Killer, Other); GameRulesModifiers.ScoreKill(Killer, Other);
if ( MonsterController(Killer) != None ) if ( MonsterController(Killer) != none )
return; 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.Score -= 1;
Other.PlayerReplicationInfo.NetUpdateTime = Level.TimeSeconds - 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; return;
if ( Other.bIsPlayer ) if ( Other.bIsPlayer )
@ -126,7 +128,7 @@ function ScoreKill(Controller Killer, Controller Other)
ScoreEvent(Killer.PlayerReplicationInfo, -5, "team_frag"); ScoreEvent(Killer.PlayerReplicationInfo, -5, "team_frag");
return; return;
} }
if ( LastKilledMonsterClass == None ) if ( LastKilledMonsterClass == none )
KillScore = 1; KillScore = 1;
else if(Killer.PlayerReplicationInfo !=none) else if(Killer.PlayerReplicationInfo !=none)
{ {
@ -179,9 +181,9 @@ function ScoreKill(Controller Killer, Controller Other)
if( Class'HUDKillingFloor'.Default.MessageHealthLimit<=Other.Pawn.Default.Health || if( Class'HUDKillingFloor'.Default.MessageHealthLimit<=Other.Pawn.Default.Health ||
Class'HUDKillingFloor'.Default.MessageMassLimit<=Other.Pawn.Default.Mass ) 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); xPlayer(C).ReceiveLocalizedMessage(Class'KillsMessage',1,Killer.PlayerReplicationInfo,,Other.Pawn.Class);
} }
@ -189,7 +191,7 @@ function ScoreKill(Controller Killer, Controller Other)
} }
else else
{ {
if( xPlayer(Killer)!=None ) if( xPlayer(Killer)!=none )
{ {
xPlayer(Killer).ReceiveLocalizedMessage(Class'KillsMessage',,,,Other.Pawn.Class); xPlayer(Killer).ReceiveLocalizedMessage(Class'KillsMessage',,,,Other.Pawn.Class);
} }
@ -303,10 +305,31 @@ function int ReduceDamage(int Damage, pawn injured, pawn instigatedBy, vector Hi
} }
return Super.ReduceDamage(Damage, injured, InstigatedBy, HitLocation, Momentum, DamageType); 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 defaultproperties
{ {
GameName="Nice Floor" GameName="Nice Floor"
Description="Nice Edition of ScrN Killing Floor game mode (ScrnGameType)." 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 ZedTimeSlomoScale=0.4
LesserZedTimeSlomoScale=0.6 LesserZedTimeSlomoScale=0.6
} }

View File

@ -63,14 +63,17 @@ simulated function bool IsZedExtentionsRecorded(NiceMonster niceZed){
return true; return true;
return false; return false;
} }
function ReplaceRequiredEquipment(){
Super.ReplaceRequiredEquipment(); // TODO remove this Scrn func
RequiredEquipment[0] = String(class'NiceMachete'); function ReplaceRequiredEquipment()
RequiredEquipment[1] = String(class'Nice9mmPlus'); {
RequiredEquipment[2] = String(class'ScrnFrag'); RequiredEquipment[0] = string(class'NiceMachete');
RequiredEquipment[3] = String(class'ScrnSyringe'); RequiredEquipment[1] = string(class'Nice9mmPlus');
RequiredEquipment[4] = String(class'KFMod.Welder'); RequiredEquipment[2] = string(class'ScrnFrag');
RequiredEquipment[3] = string(class'ScrnSyringe');
RequiredEquipment[4] = string(class'KFMod.Welder');
} }
simulated function int CalculateCalibrationScore(){ simulated function int CalculateCalibrationScore(){
local float accuracy; local float accuracy;
accuracy = (float(calibrationHits)) / (float(calibrationTotalShots)); accuracy = (float(calibrationHits)) / (float(calibrationTotalShots));
@ -489,15 +492,17 @@ simulated function ClientChangeWeapon(NiceWeapon newWeap){
// Validate that client is not hacking. // Validate that client is not hacking.
function bool CanBuyNow() function bool CanBuyNow()
{ {
local NicePlayerController niceController; local NiceGameType NiceGT;
niceController = NicePlayerController(Controller); NiceGT = NiceGameType(Level.Game);
if (niceController == none) if (NicePlayerController(Controller) == none)
return false; return false;
if (NiceGameType(Level.Game) != none && NiceGameType(Level.Game).NicePackMutator != none if (NiceGT != none && NiceGT.NicePackMutator != none
&& NiceGameType(Level.Game).NicePackMutator.bIsPreGame) && NiceGT.NicePackMutator.bIsPreGame)
return true; return true;
return Super.CanBuyNow();
// skip Scrn code!
return super(KFPawn).CanBuyNow();
} }
// Overridden to not modify dual pistols' weapon group // Overridden to not modify dual pistols' weapon group

View File

@ -39,7 +39,6 @@ var config int mediumZedMinHealth;
var int maxPlayersInGame; var int maxPlayersInGame;
var bool bSpawnRateEnforced; // Set to true after spawn rate was altered
// 'Adrenaline junkie' zed-time extensions // 'Adrenaline junkie' zed-time extensions
var int junkieDoneGoals; // How many times we collected enough head-shots to trigger zed-time extension var int junkieDoneGoals; // How many times we collected enough head-shots to trigger zed-time extension
var int junkieNextGoal; // How many head-shots we need for next zed-time extension var int junkieNextGoal; // How many head-shots we need for next zed-time extension
@ -57,7 +56,6 @@ var NiceGameType NiceGT;
var NicePack Mut; var NicePack Mut;
var NiceRules GameRules; var NiceRules GameRules;
var NiceStorageServer serverStorage; var NiceStorageServer serverStorage;
var bool bClientLinkEstablished;
var bool interactionAdded; var bool interactionAdded;
var bool bIsPreGame; var bool bIsPreGame;
var bool bIsTraderTime; var bool bIsTraderTime;
@ -104,8 +102,6 @@ struct WeaponProgressDisplay{
var int counter; var int counter;
}; };
var array<WeaponProgressDisplay> niceWeapProgressSet; var array<WeaponProgressDisplay> niceWeapProgressSet;
// Map Description array
var const array<localized string> NiceUniversalDescriptions[4];
// Replication of config between player and server // Replication of config between player and server
var int SrvFlags; var int SrvFlags;
var array<NicePlayerController> playersList; var array<NicePlayerController> playersList;
@ -164,32 +160,26 @@ function PreBeginPlay()
AddToPackageMap("NicePackSnd.uax"); AddToPackageMap("NicePackSnd.uax");
AddToPackageMap("NicePackT.utx"); AddToPackageMap("NicePackT.utx");
} }
simulated function PostBeginPlay(){
local int i; simulated function PostBeginPlay()
local ZedRecord record; {
local ScrnVotingHandlerMut VH; local ScrnVotingHandlerMut VH;
local MeanVoting VO; local MeanVoting VO;
local NiceFFVoting FFVO; local NiceFFVoting FFVO;
super.PostBeginPlay(); super.PostBeginPlay();
class'ScrnLightVestPickup'.default.cost = 50; class'ScrnLightVestPickup'.default.cost = 50;
class'ScrnHorzineVestPickup'.default.weight = 2; class'ScrnHorzineVestPickup'.default.weight = 2;
class'ScrnHorzineVestPickup'.default.cost = 750; class'ScrnHorzineVestPickup'.default.cost = 750;
class'NicePack'.default.Mut = self; class'NicePack'.default.Mut = self;
// Gun skins
class'NiceMaulerPickup'.default.VariantClasses[class'NiceMaulerPickup'.default.VariantClasses.length] = class'ScrnSPSniperPickup';
class'NiceDeaglePickup'.default.VariantClasses[class'NiceDeaglePickup'.default.VariantClasses.length] = class'SkinExecutionerPickup';
class'NiceDualDeaglePickup'.default.VariantClasses[class'NiceDualDeaglePickup'.default.VariantClasses.length] = class'SkinDualExecutionerPickup';
class'NiceMagnumPickup'.default.VariantClasses[class'NiceMagnumPickup'.default.VariantClasses.length] = class'SkinCowboyMagnumPickup';
class'NiceDualMagnumPickup'.default.VariantClasses[class'NiceDualMagnumPickup'.default.VariantClasses.length] = class'SkinDualCowboyMagnumPickup';
class'NiceWinchesterPickup'.default.VariantClasses[class'NiceWinchesterPickup'.default.VariantClasses.length] = class'SkinRetroLARPickup';
class'NiceM14EBRPickup'.default.VariantClasses[class'NiceM14EBRPickup'.default.VariantClasses.length] = class'SkinM14EBR2ProPickup';
class'ScrnKrissMPickup'.default.VariantClasses[class'ScrnKrissMPickup'.default.VariantClasses.length] = class'SkinGoldenKrissPickup';
class'NiceSCARMK17Pickup'.default.VariantClasses[class'NiceSCARMK17Pickup'.default.VariantClasses.length] = class'SkinCamoSCARMK17Pickup';
// Abilities // Abilities
class'NiceAbilityManager'.default.events.static.AddAdapter(class'NiceSharpshooterAbilitiesAdapter', level); class'NiceAbilityManager'.default.events.static.AddAdapter(class'NiceSharpshooterAbilitiesAdapter', level);
class'NiceAbilityManager'.default.events.static.AddAdapter(class'NiceEnforcerAbilitiesAdapter', level); class'NiceAbilityManager'.default.events.static.AddAdapter(class'NiceEnforcerAbilitiesAdapter', level);
SetTimer(0.25, true); SetTimer(0.25, true);
if(Role < ROLE_Authority) if (Role < ROLE_Authority)
return; return;
// Create sync node // Create sync node
serverStorage = new class'NiceStorageServer'; serverStorage = new class'NiceStorageServer';
@ -198,152 +188,48 @@ simulated function PostBeginPlay(){
// Find game type and ScrN mutator // Find game type and ScrN mutator
ScrnGT = ScrnGameType(Level.Game); ScrnGT = ScrnGameType(Level.Game);
NiceGT = NiceGameType(Level.Game); NiceGT = NiceGameType(Level.Game);
if(ScrnGT == none){ if (NiceGT == none)
Log("ERROR: Wrong GameType (requires at least ScrnGameType)", Class.Outer.Name); {
Log("ERROR: Wrong GameType (requires NiceGameType)", class.Outer.Name);
Destroy(); Destroy();
return; return;
} }
// Skills menu // FIXME poosh forces this variable in his mutator...
ScrnGT.LoginMenuClass = string(class'NiceInvasionLoginMenu'); NiceGT.LoginMenuClass = "NicePack.NiceInvasionLoginMenu";
if(NiceGT != none) NiceGT.RegisterMutator(self);
NiceGT.RegisterMutator(Self); ScrnMut = NiceGT.ScrnBalanceMut;
ScrnMut = ScrnGT.ScrnBalanceMut;
if(bReplacePickups) if(bReplacePickups)
ScrnMut.bReplacePickups = false; ScrnMut.bReplacePickups = false;
// Replication of some variables // Replication of some variables
SetReplicationData(); SetReplicationData();
// New player controller class
if(!ClassIsChildOf(ScrnGT.PlayerControllerClass, class'NicePlayerController')){
ScrnGT.PlayerControllerClass = class'NicePlayerController';
ScrnGT.PlayerControllerClassName = string(class'NicePlayerController');
}
// Game rules // Game rules
GameRules = Spawn(class'NiceRules', self); GameRules = Spawn(class'NiceRules', self);
// -- Lower starting HL // -- Lower starting HL
ScrnMut.GameRules.HardcoreLevel -= 7; ScrnMut.GameRules.HardcoreLevel -= 7;
ScrnMut.GameRules.HardcoreLevelFloat -= 7; ScrnMut.GameRules.HardcoreLevelFloat -= 7;
// -- Fill-in zed info // -- Fill-in zed info
i = 0;
// - Clot // - Clot
record.ZedName = "Clot"; ZedDatabase[0].bNeedsReplacement = bReplaceClot;
record.ZedType = class'NiceZombieClot';
record.MeanZedType = class'MeanZombieClot';
record.HL = 0.0;
record.MeanHLBonus = 0.5;
record.bNeedsReplacement = bReplaceClot;
ZedDatabase[i++] = record;
// - Crawler // - Crawler
record.ZedName = "Crawler"; ZedDatabase[1].bNeedsReplacement = bReplaceCrawler;
record.ZedType = class'NiceZombieCrawler';
record.MeanZedType = class'MeanZombieCrawler';
record.HL = 0.5;
record.MeanHLBonus = 1.5;
record.bNeedsReplacement = bReplaceCrawler;
ZedDatabase[i++] = record;
// - Stalker // - Stalker
record.ZedName = "Stalker"; ZedDatabase[2].bNeedsReplacement = bReplaceStalker;
record.ZedType = class'NiceZombieStalker';
record.MeanZedType = class'MeanZombieStalker';
record.HL = 0.5;
record.MeanHLBonus = 0.5;
record.bNeedsReplacement = bReplaceStalker;
ZedDatabase[i++] = record;
// - Gorefast // - Gorefast
record.ZedName = "Gorefast"; ZedDatabase[3].bNeedsReplacement = bReplaceGorefast;
record.ZedType = class'NiceZombieGorefast';
record.MeanZedType = class'MeanZombieGorefast';
record.HL = 0.0;
record.MeanHLBonus = 0.5;
record.bNeedsReplacement = bReplaceGorefast;
ZedDatabase[i++] = record;
// - Bloat // - Bloat
record.ZedName = "Bloat"; ZedDatabase[4].bNeedsReplacement = bReplaceBloat;
record.ZedType = class'NiceZombieBloat';
record.MeanZedType = class'MeanZombieBloat';
record.HL = 0.0;
record.MeanHLBonus = 0.5;
record.bNeedsReplacement = bReplaceBloat;
ZedDatabase[i++] = record;
// - Siren // - Siren
record.ZedName = "Siren"; ZedDatabase[5].bNeedsReplacement = bReplaceSiren;
record.ZedType = class'NiceZombieSiren';
record.MeanZedType = class'MeanZombieSiren';
record.HL = 1.0;
record.MeanHLBonus = 1.0;
record.bNeedsReplacement = bReplaceSiren;
ZedDatabase[i++] = record;
// - Husk // - Husk
record.ZedName = "Husk"; ZedDatabase[6].bNeedsReplacement = bReplaceHusk;
record.ZedType = class'NiceZombieHusk';
record.MeanZedType = class'MeanZombieHusk';
record.HL = 1.0;
record.MeanHLBonus = 1.5;
record.bNeedsReplacement = bReplaceHusk;
ZedDatabase[i++] = record;
// - Scrake // - Scrake
record.ZedName = "Scrake"; ZedDatabase[7].bNeedsReplacement = bReplaceScrake;
record.ZedType = class'NiceZombieScrake';
record.MeanZedType = class'MeanZombieScrake';
record.HL = 1.5;
record.MeanHLBonus = 1.5;
record.bNeedsReplacement = bReplaceScrake;
ZedDatabase[i++] = record;
// - Fleshpound // - Fleshpound
lastStandardZed = i; ZedDatabase[8].bNeedsReplacement = bReplaceFleshpound;
record.ZedName = "Fleshpound"; // FIXME!!!
record.ZedType = class'NiceZombieFleshPound'; lastStandardZed = 8;
record.MeanZedType = class'MeanZombieFleshPound';
record.HL = 2.5;
record.MeanHLBonus = 1.5;
record.bNeedsReplacement = bReplaceFleshpound;
ZedDatabase[i++] = record;
// - Shiver
record.ZedName = "Shiver";
record.ZedType = class'NiceZombieShiver';
record.MeanZedType = none;
record.HL = 1;
record.bNeedsReplacement = false;
ZedDatabase[i++] = record;
// - Jason
record.ZedName = "Jason";
record.ZedType = class'NiceZombieJason';
record.MeanZedType = none;
record.HL = 1.5;
record.bNeedsReplacement = false;
ZedDatabase[i++] = record;
// - Tesla Husk
record.ZedName = "Tesla husk";
record.ZedType = class'NiceZombieTeslaHusk';
record.MeanZedType = none;
record.HL = 1.5;
record.bNeedsReplacement = false;
ZedDatabase[i++] = record;
// - Brute
record.ZedName = "Brute";
record.ZedType = class'NiceZombieBrute';
record.MeanZedType = none;
record.HL = 2;
record.bNeedsReplacement = false;
ZedDatabase[i++] = record;
// - Ghost
record.ZedName = "Ghost";
record.ZedType = class'NiceZombieGhost';
record.MeanZedType = none;
record.HL = 0.5;
record.bNeedsReplacement = false;
ZedDatabase[i++] = record;
// - Sick
record.ZedName = "Sick";
record.ZedType = class'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;
}
// Add voting for mean zeds // Add voting for mean zeds
VH = class'ScrnVotingHandlerMut'.static.GetVotingHandler(Level.Game); VH = class'ScrnVotingHandlerMut'.static.GetVotingHandler(Level.Game);
if(VH == none){ if(VH == none){
@ -361,25 +247,30 @@ simulated function PostBeginPlay(){
else else
log("Unable to spawn voting handler mutator", class.outer.name); log("Unable to spawn voting handler mutator", class.outer.name);
} }
simulated function PostNetBeginPlay() simulated function PostNetBeginPlay()
{ {
super.PostNetBeginPlay(); super.PostNetBeginPlay();
if(Role < ROLE_Authority)
if (Role < ROLE_Authority)
LoadReplicationData(); LoadReplicationData();
} }
function SetReplicationData(){
SrvFlags = 0; simulated function LoadReplicationData()
if(bInitialTrader) {
SrvFlags = SrvFlags | 0x00000001;
if(bStillDuringInitTrader)
SrvFlags = SrvFlags | 0x00000002;
}
simulated function LoadReplicationData(){
if(Role == ROLE_Authority)
return;
bInitialTrader = (SrvFlags & 0x00000001) > 0; bInitialTrader = (SrvFlags & 0x00000001) > 0;
bStillDuringInitTrader = (SrvFlags & 0x00000002) > 0; bStillDuringInitTrader = (SrvFlags & 0x00000002) > 0;
} }
function SetReplicationData()
{
SrvFlags = 0;
if (bInitialTrader)
SrvFlags = SrvFlags | 0x00000001;
if (bStillDuringInitTrader)
SrvFlags = SrvFlags | 0x00000002;
}
simulated function Timer(){ simulated function Timer(){
local KFHumanPawn nextPawn; local KFHumanPawn nextPawn;
local int currentPlayersMax; local int currentPlayersMax;
@ -409,30 +300,69 @@ simulated function Timer(){
} }
maxPlayersInGame = Max(maxPlayersInGame, currentPlayersMax); maxPlayersInGame = Max(maxPlayersInGame, currentPlayersMax);
} }
simulated function Tick(float Delta){
local int i; // initial tick, does some job and shuts down
auto state loadInteractionnSpawnRate
{
// state tick, overrides global
simulated function Tick(float Delta)
{
local NiceInteraction niceInt; local NiceInteraction niceInt;
local NicePlayerController localPlayer; local NicePlayerController localPlayer;
super.Tick(Delta);
if(ScrnGT != none && ScrnGT.WaveCountDown <= 5) if (level.netMode == NM_DedicatedServer)
bIsPreGame = false; {
if(ScrnMut != none && !bSpawnRateEnforced && ScrnMut.bTickExecuted){ // set spawn rate!
bSpawnRateEnforced = true; if (ScrnMut != none)
ScrnMut.OriginalWaveSpawnPeriod = FMax(minSpawnRate, FMin(maxSpawnRate, ScrnMut.OriginalWaveSpawnPeriod)); ScrnMut.OriginalWaveSpawnPeriod = FMax(minSpawnRate, FMin(maxSpawnRate, ScrnMut.OriginalWaveSpawnPeriod));
} // do not execute below code on dedicated servers!
localPlayer = NicePlayerController(Level.GetLocalPlayerController()); GoToState('');
// Check if the local PlayerController is available yet DisableServerGlobalTick();
if(localPlayer == none)
return; return;
if( Role < Role_AUTHORITY && !bClientLinkEstablished }
&& localPlayer.storageClient != none && localPlayer.remoteRI != none){
bClientLinkEstablished = true; 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.remoteRI = localPlayer.remoteRI;
localPlayer.storageClient.events.static.CallLinkEstablished(); localPlayer.storageClient.events.static.CallLinkEstablished();
} }
if(localPlayer.bFlagDisplayCounters){
for(i = 0;i < niceCounterSet.Length;i ++){ // Actually add the interaction
if(niceCounterSet[i].ownerSkill == none) 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)
return;
if (localPlayer.bFlagDisplayCounters)
{
for (i = 0; i < niceCounterSet.Length; i++)
{
if (niceCounterSet[i].ownerSkill == none)
niceCounterSet[i].value = UpdateCounterValue(niceCounterSet[i].cName); niceCounterSet[i].value = UpdateCounterValue(niceCounterSet[i].cName);
else if(class'NiceVeterancyTypes'.static.hasSkill(localPlayer, niceCounterSet[i].ownerSkill)) else if(class'NiceVeterancyTypes'.static.hasSkill(localPlayer, niceCounterSet[i].ownerSkill))
niceCounterSet[i].value = niceCounterSet[i].ownerSkill.static. niceCounterSet[i].value = niceCounterSet[i].ownerSkill.static.
@ -444,21 +374,16 @@ simulated function Tick(float Delta){
// Reset tick counter for traces // Reset tick counter for traces
localPlayer.tracesThisTick = 0; localPlayer.tracesThisTick = 0;
// Manage resetting of effects' limits // Manage resetting of effects' limits
if(Level.TimeSeconds >= localPlayer.nextEffectsResetTime){ if (Level.TimeSeconds >= localPlayer.nextEffectsResetTime)
{
localPlayer.nextEffectsResetTime = Level.TimeSeconds + 0.1; localPlayer.nextEffectsResetTime = Level.TimeSeconds + 0.1;
localPlayer.currentEffectTimeWindow ++; localPlayer.currentEffectTimeWindow ++;
if(localPlayer.currentEffectTimeWindow >= 10) if (localPlayer.currentEffectTimeWindow >= 10)
localPlayer.currentEffectTimeWindow = 0; localPlayer.currentEffectTimeWindow = 0;
localPlayer.effectsSpawned[localPlayer.currentEffectTimeWindow] = 0; localPlayer.effectsSpawned[localPlayer.currentEffectTimeWindow] = 0;
} }
// Add interaction
if(interactionAdded)
return;
// Actually add the interaction
niceInt = NiceInteraction(localPlayer.Player.InteractionMaster.AddInteraction(string(class'NiceInteraction'), localPlayer.Player));
niceInt.RegisterMutator(Self);
interactionAdded = true;
} }
simulated function bool CheckReplacement(Actor Other, out byte bSuperRelevant){ simulated function bool CheckReplacement(Actor Other, out byte bSuperRelevant){
local int i; local int i;
local NiceMonster niceMonster; local NiceMonster niceMonster;
@ -619,7 +544,9 @@ function GiveProgressiveDosh(NicePlayerController nicePlayer){
record.lastCashWave = nextWave; record.lastCashWave = nextWave;
UpdatePlayerRecord(record); UpdatePlayerRecord(record);
} }
simulated function Mutate(string MutateString, PlayerController kfPlayer){
simulated function Mutate(string MutateString, PlayerController kfPlayer)
{
local int i, readLenght; local int i, readLenght;
local NicePlayerController nicePlayer; local NicePlayerController nicePlayer;
local NiceServerData remoteData; local NiceServerData remoteData;
@ -633,10 +560,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. // 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. // Done for safe access without the need to check for bounds.
local array<String> modArray; local array<String> modArray;
super.Mutate(MutateString, kfPlayer);
// Helpful sequence // Helpful sequence
white = chr(27)$chr(200)$chr(200)$chr(200); white = chr(27)$chr(200)$chr(200)$chr(200);
// Transform our command into array for convenience // Transform our command into array for convenience
wordsArray = SplitString(MutateString, " "); Split(MutateString, " ", wordsArray);
// Exit if command is empty // Exit if command is empty
if(wordsArray.Length == 0) if(wordsArray.Length == 0)
return; return;
@ -731,7 +661,6 @@ simulated function Mutate(string MutateString, PlayerController kfPlayer){
nicePlayer.ClientMessage("Compressed lenght:" @ string(inputStream.GetSizeInBytes()) ); nicePlayer.ClientMessage("Compressed lenght:" @ string(inputStream.GetSizeInBytes()) );
nicePlayer.ClientMessage("Output:"@outputStream.ReadClassName(readLenght)); nicePlayer.ClientMessage("Output:"@outputStream.ReadClassName(readLenght));
} }
Super.Mutate(MutateString, kfPlayer);
} }
/* Good test for writer /* Good test for writer
else if(command ~= "TEST"){ else if(command ~= "TEST"){
@ -919,48 +848,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 for broadcasting messages to players
function BroadcastToAll(string message){ function BroadcastToAll(string message){
local Controller P; local Controller P;
@ -1030,8 +918,34 @@ static function string GetDescriptionText(string SettingName){
} }
return Super.GetDescriptionText(SettingName); return Super.GetDescriptionText(SettingName);
} }
defaultproperties 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 bScaleZedHealth=True
bReplacePickups=True bReplacePickups=True
bInitialTrader=True bInitialTrader=True
@ -1064,28 +978,19 @@ defaultproperties
bNoLateFFIncrease=True bNoLateFFIncrease=True
junkieNextGoal=1 junkieNextGoal=1
bIsPreGame=True bIsPreGame=True
pickupReplaceArray(0)=(vanillaClass=Class'KFMod.MAC10Pickup',scrnClass=Class'ScrnMAC10Pickup',NewClass=class'NiceMAC10Pickup')
pickupReplaceArray(1)=(vanillaClass=Class'KFMod.WinchesterPickup',scrnClass=Class'ScrnWinchesterPickup',NewClass=class'NiceWinchesterPickup') // replace pickups that map spawn's itself
pickupReplaceArray(2)=(vanillaClass=Class'KFMod.CrossbowPickup',scrnClass=Class'ScrnCrossbowPickup',NewClass=class'NiceCrossbowPickup') pickupReplaceArray(00)=(vanillaClass=Class'KFMod.MAC10Pickup',scrnClass=Class'ScrnMAC10Pickup',NewClass=class'NiceMAC10Pickup')
pickupReplaceArray(3)=(vanillaClass=Class'KFMod.SPSniperPickup',scrnClass=Class'ScrnSPSniperPickup',NewClass=class'NiceMaulerPickup') pickupReplaceArray(01)=(vanillaClass=Class'KFMod.WinchesterPickup',scrnClass=Class'ScrnWinchesterPickup',NewClass=class'NiceWinchesterPickup')
pickupReplaceArray(4)=(vanillaClass=Class'KFMod.M14EBRPickup',scrnClass=Class'ScrnM14EBRPickup',NewClass=class'NiceM14EBRPickup') pickupReplaceArray(02)=(vanillaClass=Class'KFMod.CrossbowPickup',scrnClass=Class'ScrnCrossbowPickup',NewClass=class'NiceCrossbowPickup')
pickupReplaceArray(5)=(vanillaClass=Class'KFMod.M99Pickup',scrnClass=Class'ScrnM99Pickup',NewClass=class'NiceM99Pickup') pickupReplaceArray(03)=(vanillaClass=Class'KFMod.SPSniperPickup',scrnClass=Class'ScrnSPSniperPickup',NewClass=class'NiceMaulerPickup')
pickupReplaceArray(6)=(vanillaClass=Class'KFMod.ShotgunPickup',scrnClass=Class'ScrnShotgunPickup',NewClass=class'NiceShotgunPickup') pickupReplaceArray(04)=(vanillaClass=Class'KFMod.M14EBRPickup',scrnClass=Class'ScrnM14EBRPickup',NewClass=class'NiceM14EBRPickup')
pickupReplaceArray(7)=(vanillaClass=Class'KFMod.BoomStickPickup',scrnClass=Class'ScrnBoomStickPickup',NewClass=class'NiceBoomStickPickup') pickupReplaceArray(05)=(vanillaClass=Class'KFMod.M99Pickup',scrnClass=Class'ScrnM99Pickup',NewClass=class'NiceM99Pickup')
pickupReplaceArray(8)=(vanillaClass=Class'KFMod.NailGunPickup',scrnClass=Class'ScrnNailGunPickup',NewClass=class'NiceNailGunPickup') pickupReplaceArray(06)=(vanillaClass=Class'KFMod.ShotgunPickup',scrnClass=Class'ScrnShotgunPickup',NewClass=class'NiceShotgunPickup')
pickupReplaceArray(9)=(vanillaClass=Class'KFMod.KSGPickup',scrnClass=Class'ScrnKSGPickup',NewClass=class'NiceKSGPickup') 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(10)=(vanillaClass=Class'KFMod.BenelliPickup',scrnClass=Class'ScrnBenelliPickup',NewClass=class'NiceBenelliPickup')
pickupReplaceArray(11)=(vanillaClass=Class'KFMod.AA12Pickup',scrnClass=Class'ScrnAA12Pickup',NewClass=class'NiceAA12Pickup') pickupReplaceArray(11)=(vanillaClass=Class'KFMod.AA12Pickup',scrnClass=Class'ScrnAA12Pickup',NewClass=class'NiceAA12Pickup')
pickupReplaceArray(12)=(vanillaClass=Class'KFMod.MachetePickup',scrnClass=Class'ScrnMachetePickup',NewClass=class'NiceMachetePickup') pickupReplaceArray(12)=(vanillaClass=Class'KFMod.MachetePickup',scrnClass=Class'ScrnMachetePickup',NewClass=class'NiceMachetePickup')
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
} }

View File

@ -1537,6 +1537,7 @@ function ClientLocationalVoiceMessage(PlayerReplicationInfo Sender,
defaultproperties defaultproperties
{ {
MidGameMenuClass="NicePack.NiceInvasionLoginMenu"
nicePlayerInfoVersionNumber=1 nicePlayerInfoVersionNumber=1
bAltSwitchesModes=True bAltSwitchesModes=True
bAdvReloadCheck=True bAdvReloadCheck=True

View File

@ -9,6 +9,7 @@ defaultproperties
PickupClasses(4)=Class'NiceWinchesterPickup' PickupClasses(4)=Class'NiceWinchesterPickup'
PickupClasses(5)=Class'NiceM79Pickup' PickupClasses(5)=Class'NiceM79Pickup'
PickupClasses(6)=Class'NiceAxePickup' PickupClasses(6)=Class'NiceAxePickup'
PickupClasses(7)=Class'ScrnVestPickup' // mut's checkreplcmt will change this to proper class!
PickupClasses(7)=Class'KFMod.Vest'
PickupClasses(8)=class'NiceMAC10Pickup' PickupClasses(8)=class'NiceMAC10Pickup'
} }

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

@ -450,44 +450,55 @@ function PlayFiring(){
if(!currentContext.bIsBursting) if(!currentContext.bIsBursting)
FireCount ++; FireCount ++;
} }
// Handle setting new recoil // Handle setting new recoil
simulated function HandleRecoil(float Rec){ simulated function HandleRecoil(float Rec)
{
local int stationarySeconds; local int stationarySeconds;
local rotator NewRecoilRotation; local rotator NewRecoilRotation;
local NicePlayerController nicePlayer; local NicePlayerController nicePlayer;
local NiceHumanPawn nicePawn; local NiceHumanPawn nicePawn;
local vector AdjustedVelocity; local vector AdjustedVelocity;
local float AdjustedSpeed; local float AdjustedSpeed;
local KFWeapon kfWeap; local KFWeapon KFW;
if(Instigator != none){
if(Instigator != none)
{
nicePlayer = NicePlayerController(Instigator.Controller); nicePlayer = NicePlayerController(Instigator.Controller);
nicePawn = NiceHumanPawn(Instigator); nicePawn = NiceHumanPawn(Instigator);
} }
if(nicePlayer == none || nicePawn == none) if(nicePlayer == none || nicePawn == none)
return; return;
if(bResetRecoil || nicePlayer.IsZedTimeActive() && class'NiceVeterancyTypes'.static.hasSkill(nicePlayer, class'NiceSkillEnforcerZEDBarrage')){ if(bResetRecoil || nicePlayer.IsZedTimeActive() && class'NiceVeterancyTypes'.static.hasSkill(nicePlayer, class'NiceSkillEnforcerZEDBarrage'))
{
Rec = 0.0; Rec = 0.0;
bResetRecoil = false; bResetRecoil = false;
} }
kfWeap= KFWeapon(Weapon); KFW= KFWeapon(Weapon);
if (kfWeap.bAimingRifle) { if (KFW.bAimingRifle)
{
Rec *= 0.5; Rec *= 0.5;
} }
if(nicePawn.stationaryTime > 0.0 && class'NiceVeterancyTypes'.static.hasSkill(nicePlayer, class'NiceSkillHeavyStablePosition')){ if (nicePawn.stationaryTime > 0.0 && class'NiceVeterancyTypes'.static.hasSkill(nicePlayer, class'NiceSkillHeavyStablePosition'))
{
stationarySeconds = Ceil(2 * nicePawn.stationaryTime) - 1; stationarySeconds = Ceil(2 * nicePawn.stationaryTime) - 1;
Rec *= FMax(0.0, 1.0 - (stationarySeconds * class'NiceSkillHeavyStablePosition'.default.recoilDampeningBonus)); Rec *= FMax(0.0, 1.0 - (stationarySeconds * class'NiceSkillHeavyStablePosition'.default.recoilDampeningBonus));
} }
if(!nicePlayer.bFreeCamera){ if (!nicePlayer.bFreeCamera)
if(Weapon.GetFireMode(ThisModeNum).bIsFiring || currentContext.bIsBursting){ {
if (Weapon.GetFireMode(ThisModeNum).bIsFiring || currentContext.bIsBursting)
{
NewRecoilRotation.Pitch = RandRange(maxVerticalRecoilAngle * 0.5, maxVerticalRecoilAngle); NewRecoilRotation.Pitch = RandRange(maxVerticalRecoilAngle * 0.5, maxVerticalRecoilAngle);
NewRecoilRotation.Yaw = RandRange(maxHorizontalRecoilAngle * 0.5, maxHorizontalRecoilAngle); NewRecoilRotation.Yaw = RandRange(maxHorizontalRecoilAngle * 0.5, maxHorizontalRecoilAngle);
if(!bRecoilRightOnly && Rand(2) == 1) if (!bRecoilRightOnly && Rand(2) == 1)
NewRecoilRotation.Yaw *= -1; NewRecoilRotation.Yaw *= -1;
if(RecoilVelocityScale > 0){ if (RecoilVelocityScale > 0)
if(Weapon.Owner != none && Weapon.Owner.Physics == PHYS_Falling && {
Weapon.Owner.PhysicsVolume.Gravity.Z > class'PhysicsVolume'.default.Gravity.Z){ if (Weapon.Owner != none && Weapon.Owner.Physics == PHYS_Falling &&
Weapon.Owner.PhysicsVolume.Gravity.Z > class'PhysicsVolume'.default.Gravity.Z)
{
AdjustedVelocity = Weapon.Owner.Velocity; AdjustedVelocity = Weapon.Owner.Velocity;
// Ignore Z velocity in low grav so we don't get massive recoil // Ignore Z velocity in low grav so we don't get massive recoil
AdjustedVelocity.Z = 0; AdjustedVelocity.Z = 0;
@ -497,7 +508,8 @@ simulated function HandleRecoil(float Rec){
NewRecoilRotation.Pitch += (AdjustedSpeed * RecoilVelocityScale * 0.5); NewRecoilRotation.Pitch += (AdjustedSpeed * RecoilVelocityScale * 0.5);
NewRecoilRotation.Yaw += (AdjustedSpeed * RecoilVelocityScale * 0.5); NewRecoilRotation.Yaw += (AdjustedSpeed * RecoilVelocityScale * 0.5);
} }
else{ else
{
NewRecoilRotation.Pitch += (VSize(Weapon.Owner.Velocity) * RecoilVelocityScale); NewRecoilRotation.Pitch += (VSize(Weapon.Owner.Velocity) * RecoilVelocityScale);
NewRecoilRotation.Yaw += (VSize(Weapon.Owner.Velocity) * RecoilVelocityScale); NewRecoilRotation.Yaw += (VSize(Weapon.Owner.Velocity) * RecoilVelocityScale);
} }
@ -507,13 +519,14 @@ simulated function HandleRecoil(float Rec){
NewRecoilRotation.Yaw += (Instigator.HealthMax / Instigator.Health * 5); NewRecoilRotation.Yaw += (Instigator.HealthMax / Instigator.Health * 5);
NewRecoilRotation *= Rec; NewRecoilRotation *= Rec;
if(default.FireRate <= 0) if (default.FireRate <= 0)
nicePlayer.SetRecoil(NewRecoilRotation, RecoilRate); nicePlayer.SetRecoil(NewRecoilRotation, RecoilRate);
else else
nicePlayer.SetRecoil(NewRecoilRotation, RecoilRate * (FireRate / default.FireRate)); nicePlayer.SetRecoil(NewRecoilRotation, RecoilRate * (FireRate / default.FireRate));
} }
} }
} }
function DoFireEffect(){ function DoFireEffect(){
local bool bIsShotgunBullet, bForceComplexTraj; local bool bIsShotgunBullet, bForceComplexTraj;
local bool bPinpoint; local bool bPinpoint;

View File

@ -1,6 +1,9 @@
class NiceSCARMK17Pickup extends NiceWeaponPickup; class NiceSCARMK17Pickup extends NiceWeaponPickup;
defaultproperties defaultproperties
{ {
VariantClasses(0)=class'KFMod.NeonSCARMK17Pickup'
VariantClasses(1)=class'SkinCamoSCARMK17Pickup'
Weight=8.000000 Weight=8.000000
cost=1250 cost=1250
AmmoCost=28 AmmoCost=28
@ -15,7 +18,6 @@ defaultproperties
AmmoMesh=StaticMesh'KillingFloorStatics.L85Ammo' AmmoMesh=StaticMesh'KillingFloorStatics.L85Ammo'
CorrespondingPerkIndex=3 CorrespondingPerkIndex=3
EquipmentCategoryID=3 EquipmentCategoryID=3
VariantClasses(0)=Class'KFMod.NeonSCARMK17Pickup'
InventoryType=class'NiceSCARMK17AssaultRifle' InventoryType=class'NiceSCARMK17AssaultRifle'
PickupMessage="You got the SCARMK17" PickupMessage="You got the SCARMK17"
PickupSound=Sound'KF_SCARSnd.SCAR_Pickup' PickupSound=Sound'KF_SCARSnd.SCAR_Pickup'

View File

@ -1,6 +1,9 @@
class NiceDeaglePickup extends NiceSinglePickup; class NiceDeaglePickup extends NiceSinglePickup;
defaultproperties defaultproperties
{ {
VariantClasses(0)=class'SkinExecutionerPickup'
VariantClasses(1)=class'SkinGoldenDeaglePickup'
Weight=2.000000 Weight=2.000000
cost=250 cost=250
AmmoCost=14 AmmoCost=14
@ -13,7 +16,6 @@ defaultproperties
ItemShortName="Deagle" ItemShortName="Deagle"
AmmoItemName=".300 JHP Ammo" AmmoItemName=".300 JHP Ammo"
AmmoMesh=None AmmoMesh=None
VariantClasses(0)=class'SkinGoldenDeaglePickup'
InventoryType=class'NiceDeagle' InventoryType=class'NiceDeagle'
PickupMessage="You got the Desert Eagle" PickupMessage="You got the Desert Eagle"
PickupSound=Sound'KF_HandcannonSnd.50AE_Pickup' PickupSound=Sound'KF_HandcannonSnd.50AE_Pickup'

View File

@ -1,6 +1,9 @@
class NiceDualDeaglePickup extends NiceDualiesPickup; class NiceDualDeaglePickup extends NiceDualiesPickup;
defaultproperties defaultproperties
{ {
VariantClasses(0)=class'SkinDualExecutionerPickup'
VariantClasses(1)=class'SkinGoldenDualDeaglePickup'
Weight=4.000000 Weight=4.000000
cost=500 cost=500
AmmoCost=28 AmmoCost=28
@ -13,7 +16,6 @@ defaultproperties
ItemShortName="Dual Deagles" ItemShortName="Dual Deagles"
AmmoItemName=".300 JHP Ammo" AmmoItemName=".300 JHP Ammo"
AmmoMesh=StaticMesh'KillingFloorStatics.DeagleAmmo' AmmoMesh=StaticMesh'KillingFloorStatics.DeagleAmmo'
VariantClasses(0)=class'SkinGoldenDualDeaglePickup'
InventoryType=class'NiceDualDeagle' InventoryType=class'NiceDualDeagle'
PickupMessage="You found another Handcannon" PickupMessage="You found another Handcannon"
PickupSound=Sound'KF_HandcannonSnd.50AE_Pickup' PickupSound=Sound'KF_HandcannonSnd.50AE_Pickup'

View File

@ -1,6 +1,8 @@
class NiceDualMagnumPickup extends NiceDualiesPickup; class NiceDualMagnumPickup extends NiceDualiesPickup;
defaultproperties defaultproperties
{ {
VariantClasses(0)=class'SkinDualCowboyMagnumPickup'
Weight=4.000000 Weight=4.000000
cost=250 cost=250
AmmoCost=10 AmmoCost=10

View File

@ -1,6 +1,8 @@
class NiceMagnumPickup extends NiceSinglePickup; class NiceMagnumPickup extends NiceSinglePickup;
defaultproperties defaultproperties
{ {
VariantClasses(0)=class'SkinCowboyMagnumPickup'
Weight=2.000000 Weight=2.000000
cost=125 cost=125
AmmoCost=5 AmmoCost=5

View File

@ -1,6 +1,9 @@
class NiceKrissMPickup extends NiceWeaponPickup; class NiceKrissMPickup extends NiceWeaponPickup;
defaultproperties defaultproperties
{ {
VariantClasses(0)=class'KFMod.NeonKrissMPickup'
VariantClasses(1)=class'SkinGoldenKrissPickup'
Weight=4.000000 Weight=4.000000
cost=750 cost=750
AmmoCost=22 AmmoCost=22
@ -15,7 +18,6 @@ defaultproperties
AmmoMesh=StaticMesh'KillingFloorStatics.L85Ammo' AmmoMesh=StaticMesh'KillingFloorStatics.L85Ammo'
EquipmentCategoryID=3 EquipmentCategoryID=3
CorrespondingPerkIndex=3 CorrespondingPerkIndex=3
VariantClasses(0)=Class'KFMod.NeonKrissMPickup'
InventoryType=class'NiceKrissMMedicGun' InventoryType=class'NiceKrissMMedicGun'
PickupMessage="You got the KRISS Vector Medic Gun" PickupMessage="You got the KRISS Vector Medic Gun"
PickupSound=Sound'KF_KrissSND.Handling.KF_WEP_KRISS_Handling_Pickup' PickupSound=Sound'KF_KrissSND.Handling.KF_WEP_KRISS_Handling_Pickup'

View File

@ -1,6 +1,8 @@
class NiceM14EBRPickup extends NiceWeaponPickup; class NiceM14EBRPickup extends NiceWeaponPickup;
defaultproperties defaultproperties
{ {
VariantClasses(0)=class'SkinM14EBR2ProPickup'
Weight=8.000000 Weight=8.000000
cost=1000 cost=1000
AmmoCost=25 AmmoCost=25

View File

@ -1,6 +1,8 @@
class NiceMaulerPickup extends NiceWeaponPickup; class NiceMaulerPickup extends NiceWeaponPickup;
defaultproperties defaultproperties
{ {
VariantClasses(0)=class'ScrnSPSniperPickup'
Weight=6.000000 Weight=6.000000
cost=750 cost=750
AmmoCost=22 AmmoCost=22

View File

@ -2,6 +2,7 @@ class NiceWinchesterPickup extends NiceWeaponPickup;
defaultproperties defaultproperties
{ {
VariantClasses(0)=class'SkinRetroLARPickup'
Weight=6.000000 Weight=6.000000
AmmoCost=13 AmmoCost=13
cost=250 cost=250

View File

@ -48,7 +48,7 @@ function RangedAttack(Actor A) {
defaultproperties defaultproperties
{ {
maxNormalShots=3 maxNormalShots=3
HuskFireProjClass=class'MeanHuskFireProjectile' AmmunitionClass=class'MeanZombieHuskAmmo'
remainingStuns=1 remainingStuns=1
MenuName="Mean Husk" MenuName="Mean Husk"
ControllerClass=class'MeanZombieHuskController' ControllerClass=class'MeanZombieHuskController'

View File

@ -0,0 +1,7 @@
class MeanZombieHuskAmmo extends NiceZombieHuskAmmo;
defaultproperties
{
ProjectileClass=class'MeanHuskFireProjectile'
}

View File

@ -132,7 +132,8 @@ function TakeDamageClient(int Damage, Pawn InstigatedBy, Vector Hitlocation, Vec
PostNetReceive(); PostNetReceive();
Super.TakeDamageClient(Damage, instigatedBy, hitLocation, momentum, damageType, headshotLevel, lockonTime); Super.TakeDamageClient(Damage, instigatedBy, hitLocation, momentum, damageType, headshotLevel, lockonTime);
TwoSecondDamageTotal += OldHealth - Health; TwoSecondDamageTotal += OldHealth - Health;
if( !bDecapitated && TwoSecondDamageTotal > RageDamageThreshold && !bChargingPlayer && // fixed their one hit kill ability when you spam attack during hit animation
if( !bDecapitated && TwoSecondDamageTotal > RageDamageThreshold && !bChargingPlayer && !bShotAnim &&
(!(bWasBurning && bCrispified) || bFrustrated) ) (!(bWasBurning && bCrispified) || bFrustrated) )
StartChargingFP(InstigatedBy); StartChargingFP(InstigatedBy);
} }

View File

@ -21,14 +21,20 @@ simulated function HeatTick(){
} }
super.HeatTick(); super.HeatTick();
} }
simulated function PostBeginPlay() simulated function PostBeginPlay()
{ {
// Difficulty Scaling // Difficulty Scaling
if (Level.Game != none && !bDiffAdjusted){ if (Level.Game != none && !bDiffAdjusted)
{
ProjectileFireInterval = default.ProjectileFireInterval * 0.6; ProjectileFireInterval = default.ProjectileFireInterval * 0.6;
} }
// and why TWI removed this feature...
MyAmmo = spawn(AmmunitionClass);
super.PostBeginPlay(); super.PostBeginPlay();
} }
// don't interrupt the bloat while he is puking // don't interrupt the bloat while he is puking
simulated function bool HitCanInterruptAction() simulated function bool HitCanInterruptAction()
{ {
@ -146,14 +152,14 @@ function SpawnTwoShots()
if (!SavedFireProperties.bInitialized) if (!SavedFireProperties.bInitialized)
{ {
SavedFireProperties.AmmoClass = class'SkaarjAmmo'; SavedFireProperties.AmmoClass = MyAmmo.Class;
SavedFireProperties.ProjectileClass = HuskFireProjClass; SavedFireProperties.ProjectileClass = MyAmmo.ProjectileClass;
SavedFireProperties.WarnTargetPct = 1; SavedFireProperties.WarnTargetPct = MyAmmo.WarnTargetPct;
SavedFireProperties.MaxRange = 65535; SavedFireProperties.MaxRange = MyAmmo.MaxRange;
SavedFireProperties.bTossed = false; SavedFireProperties.bTossed = MyAmmo.bTossed;
SavedFireProperties.bTrySplash = true; SavedFireProperties.bTrySplash = MyAmmo.bTrySplash;
SavedFireProperties.bLeadTarget = true; SavedFireProperties.bLeadTarget = MyAmmo.bLeadTarget;
SavedFireProperties.bInstantHit = false; SavedFireProperties.bInstantHit = MyAmmo.bInstantHit;
SavedFireProperties.bInitialized = true; SavedFireProperties.bInitialized = true;
} }
@ -173,7 +179,7 @@ function SpawnTwoShots()
} }
// added projectile owner... // added projectile owner...
Spawn(HuskFireProjClass, self, , FireStart, FireRotation); Spawn(SavedFireProperties.ProjectileClass, self, , FireStart, FireRotation);
// Turn extra collision back on // Turn extra collision back on
ToggleAuxCollision(true); ToggleAuxCollision(true);
@ -379,7 +385,7 @@ static simulated function PreCacheMaterials(LevelInfo myLevel)
} }
defaultproperties defaultproperties
{ {
HuskFireProjClass=class'NiceHuskFireProjectile' AmmunitionClass=class'NiceZombieHuskAmmo'
stunLoopStart=0.080000 stunLoopStart=0.080000
stunLoopEnd=0.900000 stunLoopEnd=0.900000
idleInsertFrame=0.930000 idleInsertFrame=0.930000

View File

@ -0,0 +1,13 @@
class NiceZombieHuskAmmo extends Ammunition;
defaultproperties
{
ProjectileClass=class'NiceHuskFireProjectile'
WarnTargetPct=1
MaxRange=65535
bTossed=False
bTrySplash=True
bLeadTarget=True
bInstantHit=False
}