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;
//The "Header"
// The "Header"
var automated GUIImage HeaderBG_Left;
var automated GUIImage HeaderBG_Center;
var automated GUIImage HeaderBG_Right;
@ -11,12 +12,12 @@ var automated KFQuickPerkSelect QuickPerkSelect;
var automated KFBuyMenuFilter BuyMenuFilter;
var automated GUIButton StoreTabButton;
var automated GUIButton PerkTabButton;
//The "Footer"
// The "Footer"
var automated GUIImage WeightBG;
var automated GUIImage WeightIcon;
var automated GUIImage WeightIconBG;
var automated KFWeightBar WeightBar;
//const BUYLIST_CATS =7;
// const BUYLIST_CATS =7;
var() editconst noexport float SavedPitch;
var color RedColor;
var color GreenGreyColor;
@ -26,9 +27,11 @@ 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

View File

@ -63,14 +63,14 @@ function PostRender(Canvas C)
local NicePlayerController nicePlayer;
local ScrnHUD scrnHUDInstance;
// TODO maybe use scrnhud?
local HUDKillingFloor kfHud;
// local HUDKillingFloor kfHud;
local Texture barTexture;
local int x, y, center, barWidth, offset;
local int missesWidth, missesHeight, missesSpace;
local int missesX, missesY;
local Vector CamPos, ViewDir;
local Rotator CamRot;
local float OffsetX, BarLength, BarHeight, XL, YL, posY;
// local Vector CamPos, ViewDir;
// local Rotator CamRot;
// local float OffsetX, BarLength, BarHeight, XL, YL, posY;
if(C == none) return;
if(C.ViewPort == none) return;
@ -170,17 +170,21 @@ function PostRender(Canvas C)
x += 128 + 4;
}
}
//// 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;
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,
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)
@ -355,15 +359,18 @@ function DrawCalibrationStars(Canvas C){
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 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);
@ -387,7 +394,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);
@ -395,6 +403,7 @@ function DrawWeaponProgress(Canvas C, NicePack.WeaponProgressDisplay weapProgres
C.DrawText(textToDraw);
}
}
function bool KeyEvent(EInputKey Key, EInputAction Action, float Delta){
local bool bNeedsReload;
local string Alias, LeftPart, RigthPart;

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);
}
@ -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'NiceMachete');
RequiredEquipment[1] = String(class'Nice9mmPlus');
RequiredEquipment[2] = String(class'ScrnFrag');
RequiredEquipment[3] = String(class'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));
@ -489,15 +492,17 @@ simulated function ClientChangeWeapon(NiceWeapon newWeap){
// Validate that client is not hacking.
function bool CanBuyNow()
{
local NicePlayerController niceController;
local NiceGameType NiceGT;
niceController = NicePlayerController(Controller);
if (niceController == none)
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;
return Super.CanBuyNow();
// skip Scrn code!
return super(KFPawn).CanBuyNow();
}
// Overridden to not modify dual pistols' weapon group

View File

@ -39,7 +39,6 @@ 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
@ -57,7 +56,6 @@ var NiceGameType NiceGT;
var NicePack Mut;
var NiceRules GameRules;
var NiceStorageServer serverStorage;
var bool bClientLinkEstablished;
var bool interactionAdded;
var bool bIsPreGame;
var bool bIsTraderTime;
@ -104,8 +102,6 @@ struct WeaponProgressDisplay{
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;
@ -164,32 +160,26 @@ 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'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
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'NiceStorageServer';
@ -198,152 +188,48 @@ simulated function PostBeginPlay(){
// Find game type and ScrN mutator
ScrnGT = ScrnGameType(Level.Game);
NiceGT = NiceGameType(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'NiceInvasionLoginMenu');
if(NiceGT != none)
NiceGT.RegisterMutator(Self);
ScrnMut = ScrnGT.ScrnBalanceMut;
// FIXME poosh forces this variable in his mutator...
NiceGT.LoginMenuClass = "NicePack.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'NicePlayerController')){
ScrnGT.PlayerControllerClass = class'NicePlayerController';
ScrnGT.PlayerControllerClassName = string(class'NicePlayerController');
}
// Game rules
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'NiceZombieClot';
record.MeanZedType = class'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'NiceZombieCrawler';
record.MeanZedType = class'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'NiceZombieStalker';
record.MeanZedType = class'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'NiceZombieGorefast';
record.MeanZedType = class'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'NiceZombieBloat';
record.MeanZedType = class'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'NiceZombieSiren';
record.MeanZedType = class'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'NiceZombieHusk';
record.MeanZedType = class'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'NiceZombieScrake';
record.MeanZedType = class'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'NiceZombieFleshPound';
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;
}
ZedDatabase[8].bNeedsReplacement = bReplaceFleshpound;
// FIXME!!!
lastStandardZed = 8;
// Add voting for mean zeds
VH = class'ScrnVotingHandlerMut'.static.GetVotingHandler(Level.Game);
if(VH == none){
@ -361,25 +247,30 @@ simulated function PostBeginPlay(){
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;
@ -409,30 +300,69 @@ simulated function Timer(){
}
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 NicePlayerController localPlayer;
super.Tick(Delta);
if(ScrnGT != none && ScrnGT.WaveCountDown <= 5)
bIsPreGame = false;
if(ScrnMut != none && !bSpawnRateEnforced && ScrnMut.bTickExecuted){
bSpawnRateEnforced = true;
if (level.netMode == NM_DedicatedServer)
{
// set spawn rate!
if (ScrnMut != none)
ScrnMut.OriginalWaveSpawnPeriod = FMax(minSpawnRate, FMin(maxSpawnRate, ScrnMut.OriginalWaveSpawnPeriod));
}
localPlayer = NicePlayerController(Level.GetLocalPlayerController());
// Check if the local PlayerController is available yet
if(localPlayer == none)
// do not execute below code on dedicated servers!
GoToState('');
DisableServerGlobalTick();
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.events.static.CallLinkEstablished();
}
if(localPlayer.bFlagDisplayCounters){
for(i = 0;i < niceCounterSet.Length;i ++){
if(niceCounterSet[i].ownerSkill == none)
// 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)
return;
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.
@ -444,21 +374,16 @@ simulated function Tick(float Delta){
// Reset tick counter for traces
localPlayer.tracesThisTick = 0;
// Manage resetting of effects' limits
if(Level.TimeSeconds >= localPlayer.nextEffectsResetTime){
if (Level.TimeSeconds >= localPlayer.nextEffectsResetTime)
{
localPlayer.nextEffectsResetTime = Level.TimeSeconds + 0.1;
localPlayer.currentEffectTimeWindow ++;
if(localPlayer.currentEffectTimeWindow >= 10)
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(string(class'NiceInteraction'), localPlayer.Player));
niceInt.RegisterMutator(Self);
interactionAdded = true;
}
simulated function bool CheckReplacement(Actor Other, out byte bSuperRelevant){
local int i;
local NiceMonster niceMonster;
@ -619,7 +544,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;
@ -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.
// 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;
@ -731,7 +661,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"){
@ -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 BroadcastToAll(string message){
local Controller P;
@ -1030,8 +918,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
@ -1064,28 +978,19 @@ defaultproperties
bNoLateFFIncrease=True
junkieNextGoal=1
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')
pickupReplaceArray(2)=(vanillaClass=Class'KFMod.CrossbowPickup',scrnClass=Class'ScrnCrossbowPickup',NewClass=class'NiceCrossbowPickup')
pickupReplaceArray(3)=(vanillaClass=Class'KFMod.SPSniperPickup',scrnClass=Class'ScrnSPSniperPickup',NewClass=class'NiceMaulerPickup')
pickupReplaceArray(4)=(vanillaClass=Class'KFMod.M14EBRPickup',scrnClass=Class'ScrnM14EBRPickup',NewClass=class'NiceM14EBRPickup')
pickupReplaceArray(5)=(vanillaClass=Class'KFMod.M99Pickup',scrnClass=Class'ScrnM99Pickup',NewClass=class'NiceM99Pickup')
pickupReplaceArray(6)=(vanillaClass=Class'KFMod.ShotgunPickup',scrnClass=Class'ScrnShotgunPickup',NewClass=class'NiceShotgunPickup')
pickupReplaceArray(7)=(vanillaClass=Class'KFMod.BoomStickPickup',scrnClass=Class'ScrnBoomStickPickup',NewClass=class'NiceBoomStickPickup')
pickupReplaceArray(8)=(vanillaClass=Class'KFMod.NailGunPickup',scrnClass=Class'ScrnNailGunPickup',NewClass=class'NiceNailGunPickup')
pickupReplaceArray(9)=(vanillaClass=Class'KFMod.KSGPickup',scrnClass=Class'ScrnKSGPickup',NewClass=class'NiceKSGPickup')
// 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')
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
{
MidGameMenuClass="NicePack.NiceInvasionLoginMenu"
nicePlayerInfoVersionNumber=1
bAltSwitchesModes=True
bAdvReloadCheck=True

View File

@ -9,6 +9,7 @@ defaultproperties
PickupClasses(4)=Class'NiceWinchesterPickup'
PickupClasses(5)=Class'NiceM79Pickup'
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'
}

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)
FireCount ++;
}
// Handle setting new recoil
simulated function HandleRecoil(float Rec){
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){
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')){
if(bResetRecoil || nicePlayer.IsZedTimeActive() && class'NiceVeterancyTypes'.static.hasSkill(nicePlayer, class'NiceSkillEnforcerZEDBarrage'))
{
Rec = 0.0;
bResetRecoil = false;
}
kfWeap= KFWeapon(Weapon);
if (kfWeap.bAimingRifle) {
KFW= KFWeapon(Weapon);
if (KFW.bAimingRifle)
{
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;
Rec *= FMax(0.0, 1.0 - (stationarySeconds * class'NiceSkillHeavyStablePosition'.default.recoilDampeningBonus));
}
if(!nicePlayer.bFreeCamera){
if(Weapon.GetFireMode(ThisModeNum).bIsFiring || currentContext.bIsBursting){
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)
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){
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;
@ -497,7 +508,8 @@ simulated function HandleRecoil(float Rec){
NewRecoilRotation.Pitch += (AdjustedSpeed * RecoilVelocityScale * 0.5);
NewRecoilRotation.Yaw += (AdjustedSpeed * RecoilVelocityScale * 0.5);
}
else{
else
{
NewRecoilRotation.Pitch += (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 *= Rec;
if(default.FireRate <= 0)
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;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -48,7 +48,7 @@ function RangedAttack(Actor A) {
defaultproperties
{
maxNormalShots=3
HuskFireProjClass=class'MeanHuskFireProjectile'
AmmunitionClass=class'MeanZombieHuskAmmo'
remainingStuns=1
MenuName="Mean Husk"
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();
Super.TakeDamageClient(Damage, instigatedBy, hitLocation, momentum, damageType, headshotLevel, lockonTime);
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) )
StartChargingFP(InstigatedBy);
}

View File

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