Prepare fixtures

This commit is contained in:
dkanus 2026-07-14 20:27:09 +07:00
commit 9c94356263
6021 changed files with 722805 additions and 22 deletions

View file

@ -0,0 +1,57 @@
class Mut extends Mutator
config(KFPatcher);
//=============================================================================
struct FunctionRecord
{
var config string Info, Replace, With;
};
var config array<FunctionRecord> List;
//=============================================================================
event PreBeginPlay()
{
super.PreBeginPlay();
// temp hack fix for tosscahs!
class'stub_Pawn'.default.cashtimer = 0.0f;
// replacing vanilla functions with ours
ReplaceFunctions();
}
final function ReplaceFunctions()
{
local uFunction A, B;
local int i;
for (i = 0; i < List.Length; i++)
{
// This removes the need to declare variables for every new class we make.
DynamicLoadObject(class.outer.name $ "." $ Left(List[i].With,InStr(List[i].With,".")), class'class', true);
A = class'UFunction'.static.CastFunction(FindObject(List[i].Replace, class'function'));
B = class'UFunction'.static.CastFunction(FindObject(List[i].With, class'function'));
if (A == none)
{
log("> Failed to process " $ List[i].Replace);
continue;
}
if (B == none)
{
log("> Failed to process " $ List[i].With);
continue;
}
A.Script = B.Script;
log("> Processing: " $ List[i].Replace $ " ----> " $ List[i].With);
}
}
//=============================================================================
defaultproperties{}

View file

@ -0,0 +1,36 @@
<html>
<head><title>Index of /kf_sources/KFPatcher/Classes/</title></head>
<body>
<h1>Index of /kf_sources/KFPatcher/Classes/</h1><hr><pre><a href="../">../</a>
<a href="Mut.uc">Mut.uc</a> 28-Jun-2021 13:12 1468
<a href="o_Helper.uc">o_Helper.uc</a> 28-Jun-2021 13:12 12444
<a href="o_Settings.uc">o_Settings.uc</a> 28-Jun-2021 13:12 460
<a href="stub_CashPickup.uc">stub_CashPickup.uc</a> 28-Jun-2021 13:12 1111
<a href="stub_Door.uc">stub_Door.uc</a> 28-Jun-2021 13:12 645
<a href="stub_DualPistol.uc">stub_DualPistol.uc</a> 28-Jun-2021 13:12 4181
<a href="stub_DualiesFire.uc">stub_DualiesFire.uc</a> 28-Jun-2021 13:12 3893
<a href="stub_FPAvoidArea.uc">stub_FPAvoidArea.uc</a> 28-Jun-2021 13:12 707
<a href="stub_FragFire.uc">stub_FragFire.uc</a> 28-Jun-2021 13:12 1335
<a href="stub_GT.uc">stub_GT.uc</a> 28-Jun-2021 13:12 40445
<a href="stub_KFWeaponPickup.uc">stub_KFWeaponPickup.uc</a> 28-Jun-2021 13:12 331
<a href="stub_LAWProj.uc">stub_LAWProj.uc</a> 28-Jun-2021 13:12 2590
<a href="stub_ModelSelect.uc">stub_ModelSelect.uc</a> 28-Jun-2021 13:12 4475
<a href="stub_Monster.uc">stub_Monster.uc</a> 28-Jun-2021 13:12 17407
<a href="stub_Nade.uc">stub_Nade.uc</a> 28-Jun-2021 13:12 1432
<a href="stub_PC.uc">stub_PC.uc</a> 28-Jun-2021 13:12 6972
<a href="stub_P_Shotgun.uc">stub_P_Shotgun.uc</a> 28-Jun-2021 13:12 2607
<a href="stub_Pawn.uc">stub_Pawn.uc</a> 28-Jun-2021 13:12 9823
<a href="stub_Pipe.uc">stub_Pipe.uc</a> 28-Jun-2021 13:12 5730
<a href="stub_Rule.uc">stub_Rule.uc</a> 28-Jun-2021 13:12 328
<a href="stub_ShopVolume.uc">stub_ShopVolume.uc</a> 28-Jun-2021 13:12 4322
<a href="stub_Syringe.uc">stub_Syringe.uc</a> 28-Jun-2021 13:12 560
<a href="stub_VotingHandler.uc">stub_VotingHandler.uc</a> 28-Jun-2021 13:12 5484
<a href="stub_VotingReplicationInfo.uc">stub_VotingReplicationInfo.uc</a> 28-Jun-2021 13:12 391
<a href="stub_Z_Bloat.uc">stub_Z_Bloat.uc</a> 28-Jun-2021 13:12 1576
<a href="stub_Z_Boss.uc">stub_Z_Boss.uc</a> 28-Jun-2021 13:12 5725
<a href="stub_Z_Husk.uc">stub_Z_Husk.uc</a> 28-Jun-2021 13:12 2500
<a href="stub_Z_Scrake.uc">stub_Z_Scrake.uc</a> 28-Jun-2021 13:12 3703
<a href="stub_Z_Scrake_Ctrl.uc">stub_Z_Scrake_Ctrl.uc</a> 28-Jun-2021 13:12 230
<a href="stub_Z_Siren.uc">stub_Z_Siren.uc</a> 28-Jun-2021 13:12 2460
</pre><hr></body>
</html>

Binary file not shown.

View file

@ -0,0 +1,21 @@
class o_Settings extends object
config(KFPatcher);
var() config bool bBuyEverywhere;
// player info
var() config string sAlive, sDead, sSpectator, sReady, sNotReady, sAwaiting;
var() config string sTagHP, sTagKills;
var() config bool bShowPerk;
var() config float fRefreshTime;
// zedtime
var() config bool bAllowZedTime;
// all traders
var() config bool bAllTradersOpen;
var() config string bAllTradersMessage;
defaultproperties{}

View file

@ -0,0 +1,25 @@
class stub_CashPickup extends CashPickup;
function GiveCashTo( Pawn Other )
{
// mental-mad typecasting one love from TWI
if (!bDroppedCash)
CashAmount = (rand(0.5 * default.CashAmount) + default.CashAmount) * (KFGameReplicationInfo(Level.GRI).GameDiff * 0.5) ;
// FIX!
// added DroppedBy none check
else if ( Other.PlayerReplicationInfo != none && DroppedBy != none && DroppedBy.PlayerReplicationInfo != none &&
((DroppedBy.PlayerReplicationInfo.Score + float(CashAmount)) / Other.PlayerReplicationInfo.Score) >= 0.50 &&
PlayerController(DroppedBy) != none && KFSteamStatsAndAchievements(PlayerController(DroppedBy).SteamStatsAndAchievements) != none )
{
if (Other.PlayerReplicationInfo != DroppedBy.PlayerReplicationInfo)
KFSteamStatsAndAchievements(PlayerController(DroppedBy).SteamStatsAndAchievements).AddDonatedCash(CashAmount);
}
if (Other.Controller != none && Other.Controller.PlayerReplicationInfo != none)
Other.Controller.PlayerReplicationInfo.Score += CashAmount;
AnnouncePickup(Other);
SetRespawn();
}

View file

@ -0,0 +1,24 @@
class stub_Door extends KFDoorMover;
// Forces zeds to actually ignore doors instead of just standing at them if bZombiesIgnore is true
function Tick(float Delta)
{
if (DoorPathNode != none && PathUdpTimer < Level.TimeSeconds)
{
PathUdpTimer = Level.TimeSeconds + 0.5;
DoorPathNode.ExtraCost = InitExtraCost;
if (bSealed && MyTrigger != none)
{
// Zeds will always ignore the path node associated with this door.
if (bZombiesIgnore)
DoorPathNode.ExtraCost = 9999999;
else
DoorPathNode.ExtraCost += 500 + MyTrigger.WeldStrength * 6;
}
}
}
defaultproperties{}

View file

@ -0,0 +1,146 @@
class stub_DualPistol extends DualDeagle;
var KFWeaponPickup WPickup;
var KFWeapon SingleKFW;
var class<KFWeapon> SingleClass;
function DropFrom(vector StartLocation)
{
local int m;
local Pickup Pickup;
// local Inventory I;
local int AmmoThrown, OtherAmmo;
if (!bCanThrow)
return;
AmmoThrown = AmmoAmount(0);
ClientWeaponThrown();
for (m = 0; m < NUM_FIRE_MODES; m++)
{
if (FireMode[m].bIsFiring)
StopFire(m);
}
if (Instigator != none)
DetachFromPawn(Instigator);
if (Instigator.Health > 0)
{
OtherAmmo = AmmoThrown / 2;
AmmoThrown -= OtherAmmo;
// CHANGED HERE
class'stub_DualPistol'.default.SingleKFW = Instigator.spawn(class'stub_DualPistol'.static.GetSingleWC(self));
if (class'stub_DualPistol'.default.SingleKFW != none)
{
class'stub_DualPistol'.default.SingleKFW.GiveTo(Instigator);
class'stub_DualPistol'.default.SingleKFW.Ammo[0].AmmoAmount = OtherAmmo;
// cursed TWI does this check only for left ammo
MagAmmoRemaining = max(MagAmmoRemaining / 2, 0);
class'stub_DualPistol'.default.SingleKFW.MagAmmoRemaining = MagAmmoRemaining;
}
else
log("ALERT!!!!! WEAPON NOT SPAWNED FOR PAWN!!!");
// I = spawn(class'stub_DualPistol'.static.GetSingleWC(self));
// if (I == none)
// log("ALERT!! NO INVENTORY!!!");
// I.GiveTo(Instigator);
// if (Weapon(I) == none)
// log("ALERT!! NO Weapon(I)!!!");
// Weapon(I).Ammo[0].AmmoAmount = OtherAmmo;
// CHANGED HERE
// OLD: Deagle(I).MagAmmoRemaining = MagAmmoRemaining / 2;
// if (KFWeapon(I) == none)
// log("ALERT!! NO KFWeapon(I)!!!");
// KFWeapon(I).MagAmmoRemaining = MagAmmoRemaining / 2;
// CHANGED HERE
// OLD: MagAmmoRemaining = Max(MagAmmoRemaining - Deagle(I).MagAmmoRemaining, 0);
// MagAmmoRemaining = Max(MagAmmoRemaining - KFWeapon(I).MagAmmoRemaining, 0);
}
// CHANGE HERE
// OLD: Pickup = spawn(class'DeaglePickup',,, StartLocation);
Pickup = spawn(class'stub_DualPistol'.default.SingleKFW.default.PickupClass,,, StartLocation);
if (Pickup != none)
{
Pickup.InitDroppedPickupFor(self);
Pickup.Velocity = Velocity;
WeaponPickup(Pickup).AmmoAmount[0] = AmmoThrown;
if (KFWeaponPickup(Pickup) != none)
KFWeaponPickup(Pickup).MagAmmoRemaining = MagAmmoRemaining;
if (Instigator.Health > 0)
WeaponPickup(Pickup).bThrown = true;
}
class'stub_DualPistol'.default.SingleKFW = none;
// class'stub_DualPistol'.default.SingleKFW.Destroy();
Destroyed();
Destroy();
}
// static final function class<KFWeapon> GetSingleWC(KFWeapon KFWeapon)
// {
// if (KFWeapon == none)
// {
// log("Something is VERY WRONG, couldn't find single weapon class for pistol " $ KFWeapon);
// // drop beretas as a fail safe
// return class'Single';
// }
// switch (KFWeapon.class.name)
// {
// case 'Dualies':
// return class'Single';
// case 'DualDeagle':
// return class'Deagle';
// case 'GoldenDualDeagle':
// return class'GoldenDeagle';
// case 'Dual44Magnum':
// return class'Magnum44Pistol';
// case 'DualMK23Pistol':
// return class'MK23Pistol';
// case 'DualFlareRevolver':
// return class'FlareRevolver';
// }
// }
static final function class<KFWeapon> GetSingleWC(KFWeapon KFWeapon)
{
if (KFWeapon == none)
{
log("Something is VERY WRONG, couldn't find single weapon class for pistol " $ KFWeapon);
// drop beretas as a fail safe
return class'Single';
}
switch (KFWeapon.class.name)
{
case 'Dualies':
return class'Single';
case 'DualDeagle':
return class'Deagle';
case 'GoldenDualDeagle':
return class'GoldenDeagle';
case 'Dual44Magnum':
return class'Magnum44Pistol';
case 'DualMK23Pistol':
return class'MK23Pistol';
case 'DualFlareRevolver':
return class'FlareRevolver';
}
}
// allow variants of weapons to be picked up
function bool HandlePickupQuery(pickup Item)
{
return super(Weapon).HandlePickupQuery(Item);
}
defaultproperties{}

View file

@ -0,0 +1,131 @@
class stub_DualiesFire extends DualiesFire;
var int penValue;
function DoTrace(Vector Start, Rotator Dir)
{
local Vector X,Y,Z, End, HitLocation, HitNormal, ArcEnd;
local Actor Other;
local byte HitCount,HCounter;
local float HitDamage;
local array<int> HitPoints;
local KFPawn HitPawn;
local array<Actor> IgnoreActors;
local Actor DamageActor;
local int i;
MaxRange();
Weapon.GetViewAxes(X, Y, Z);
if ( Weapon.WeaponCentered() )
{
ArcEnd = (Instigator.Location + Weapon.EffectOffset.X * X + 1.5 * Weapon.EffectOffset.Z * Z);
}
else
{
ArcEnd = (Instigator.Location + Instigator.CalcDrawOffset(Weapon) + Weapon.EffectOffset.X * X +
Weapon.Hand * Weapon.EffectOffset.Y * Y + Weapon.EffectOffset.Z * Z);
}
X = Vector(Dir);
End = Start + TraceRange * X;
HitDamage = DamageMax;
// MK23Fire, DualMK23Fire = 3
// DeagleFire, DualDeagleFire, Magnum44Fire, Dual44MagnumFire = 10
if (self.class.name == 'MK23Fire' || self.class.name == 'DualMK23Fire')
class'stub_DualiesFire'.default.penValue = 3;
else
class'stub_DualiesFire'.default.penValue = 10;
while( (HitCount++) < class'stub_DualiesFire'.default.penValue ) // there was fixed value here per parent class
{
DamageActor = none;
Other = Instigator.HitPointTrace(HitLocation, HitNormal, End, HitPoints, Start,, 1);
if( Other==None )
{
break;
}
else if( Other==Instigator || Other.Base == Instigator )
{
IgnoreActors[IgnoreActors.Length] = Other;
Other.SetCollision(false);
Start = HitLocation;
continue;
}
if( ExtendedZCollision(Other)!=None && Other.Owner!=None )
{
IgnoreActors[IgnoreActors.Length] = Other;
IgnoreActors[IgnoreActors.Length] = Other.Owner;
Other.SetCollision(false);
Other.Owner.SetCollision(false);
DamageActor = Pawn(Other.Owner);
}
if ( !Other.bWorldGeometry && Other!=Level )
{
HitPawn = KFPawn(Other);
if ( HitPawn != none )
{
// Hit detection debugging
/*log("PreLaunchTrace hit "$HitPawn.PlayerReplicationInfo.PlayerName);
HitPawn.HitStart = Start;
HitPawn.HitEnd = End;*/
if(!HitPawn.bDeleteMe)
HitPawn.ProcessLocationalDamage(int(HitDamage), Instigator, HitLocation, Momentum*X,DamageType,HitPoints);
// Hit detection debugging
/*if( Level.NetMode == NM_Standalone)
HitPawn.DrawBoneLocation();*/
IgnoreActors[IgnoreActors.Length] = Other;
IgnoreActors[IgnoreActors.Length] = HitPawn.AuxCollisionCylinder;
Other.SetCollision(false);
HitPawn.AuxCollisionCylinder.SetCollision(false);
DamageActor = Other;
}
else
{
if ( KFMonster(Other)!=None )
{
IgnoreActors[IgnoreActors.Length] = Other;
Other.SetCollision(false);
DamageActor = Other;
}
else if ( DamageActor == none )
{
DamageActor = Other;
}
Other.TakeDamage(int(HitDamage), Instigator, HitLocation, Momentum*X, DamageType);
}
if ( (HCounter++) >= 4 || Pawn(DamageActor) == None )
{
break;
}
HitDamage/=2;
Start = HitLocation;
}
else if ( HitScanBlockingVolume(Other) == None )
{
if ( KFWeaponAttachment(Weapon.ThirdPersonActor) != none )
KFWeaponAttachment(Weapon.ThirdPersonActor).UpdateHit(Other,HitLocation,HitNormal);
Break;
}
}
// Turn the collision back on for any actors we turned it off
// FIXED accessed none IgnoreActors !
if (IgnoreActors.Length <= 0)
return;
for (i=0; i<IgnoreActors.Length; i++)
{
if (IgnoreActors[i] != none)
IgnoreActors[i].SetCollision(true);
}
}

View file

@ -0,0 +1,20 @@
class stub_FPAvoidArea extends FleshPoundAvoidArea;
// added KFMonsterController check
function Touch(actor Other)
{
if ((Pawn(Other) != none) && KFMonsterController(Pawn(Other).Controller) != none && RelevantTo(Pawn(Other)))
KFMonsterController(Pawn(Other).Controller).AvoidThisMonster(KFMonst);
}
// added health check, 1500 is FP's base health
function bool RelevantTo(Pawn P)
{
if (KFMonster(p) != none && KFMonster(p).default.Health >= 1500) // || KFMonster(p).IsInState('')) )
return false;
return ( KFMonst != none && VSizeSquared(KFMonst.Velocity) >= 75 && super(AvoidMarker).RelevantTo(P)
&& KFMonst.Velocity dot (P.Location - KFMonst.Location) > 0 );
}

View file

@ -0,0 +1,43 @@
class stub_FragFire extends FragFire;
var transient float PrevAmmo;
function DoFireEffect()
{
local float MaxAmmo, CurAmmo;
local Vector StartProj, StartTrace, X,Y,Z;
local Rotator Aim;
local Vector HitLocation, HitNormal;
local Actor Other;
local int Hand;
// added working ammo check
Weapon.GetAmmoCount(MaxAmmo,CurAmmo);
if (CurAmmo == 0 && class'stub_FragFire'.default.PrevAmmo == 0)
return;
class'stub_FragFire'.default.PrevAmmo = CurAmmo;
Instigator.MakeNoise(1.0);
Weapon.GetViewAxes(X,Y,Z);
StartTrace = Instigator.Location + Instigator.EyePosition();// + X*Instigator.CollisionRadius;
StartProj = StartTrace + X*ProjSpawnOffset.X;
if( PlayerController(Instigator.Controller)!=None )
{ // We must do this as server dosen't get a chance to set weapon handedness.
Hand = int(PlayerController(Instigator.Controller).Handedness);
if( Hand==-1 || Hand==1 )
StartProj = StartProj + Hand * Y*ProjSpawnOffset.Y + Z*ProjSpawnOffset.Z;
}
// check if projectile would spawn through a wall and adjust start location accordingly
Other = Weapon.Trace(HitLocation, HitNormal, StartProj, StartTrace, false);
if (Other != None)
StartProj = HitLocation;
Aim = AdjustAim(StartProj, AimError);
SpawnProjectile(StartProj, Aim);
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,11 @@
class stub_KFWeaponPickup extends KFWeaponPickup;
// fix accessed none Inventory for destroyed weapon pickups
function Destroyed()
{
if ( bDropped && Inventory != none && KFGameType(Level.Game) != none )
KFGameType(Level.Game).WeaponDestroyed(class<Weapon>(Inventory.Class));
super(WeaponPickup).Destroyed();
}

View file

@ -0,0 +1,72 @@
class stub_LAWProj extends LAWProj;
// removed SirenScream damage type check since 90% of the time they don't disentigrate anyway...
// also prevents detonation from fire or other explosives
function TakeDamage(int Damage, Pawn InstigatedBy, Vector Hitlocation, Vector Momentum, class<DamageType> damageType, optional int HitIndex)
{
if(!bDud
&& DamageType != class'DamTypeFlamethrower'
&& DamageType != class'DamTypeFrag'
&& DamageType != class'DamTypeLaw'
&& DamageType != class'DamTypeM203Grenade'
&& DamageType != class'DamTypeM32Grenade'
&& DamageType != class'DamTypeM79Grenade'
&& DamageType != class'DamTypePipeBomb'
&& DamageType != class'DamTypeSealSquealExplosion'
&& DamageType != class'DamTypeSeekerSixRocket'
&& DamageType != class'DamTypeSPGrenade'
&& DamageType != class'SirenScreamDamage'
&& !ClassIsChildOf(damageType, class'DamTypeBurned'))
{
Explode(HitLocation, vect(0,0,0));
}
}
// RepInfo == none fix
simulated function ProcessTouch(Actor Other, Vector HitLocation)
{
// Don't let it hit this player, or blow up on another player
// added bBlockHitPointTraces check
if (Other == none || Other == Instigator || Other.Base == Instigator || !Other.bBlockHitPointTraces)
return;
// Don't collide with bullet whip attachments
if (KFBulletWhipAttachment(Other) != none)
return;
// Don't allow hits on poeple on the same team
// fixing RepInfo == none error, and using KFPawn instead of KFHumanPawn
if (KFPawn(Other) != none && Instigator != none && KFPawn(Other).GetTeamNum() == Instigator.GetTeamNum())
return;
// Use the instigator's location if it exists. This fixes issues with
// the original location of the projectile being really far away from
// the real Origloc due to it taking a couple of milliseconds to
// replicate the location to the client and the first replicated location has
// already moved quite a bit.
if (Instigator != none)
OrigLoc = Instigator.Location;
if (!bDud && ((VSizeSquared(Location - OrigLoc) < ArmDistSquared) || OrigLoc == vect(0,0,0)))
{
if( Role == ROLE_Authority )
{
AmbientSound = none;
PlaySound(sound'ProjectileSounds.PTRD_deflect04',,2.0);
Other.TakeDamage(ImpactDamage, Instigator, HitLocation, Normal(Velocity), ImpactDamageType);
}
bDud = true;
Velocity = vect(0,0,0);
LifeSpan = 1.0;
SetPhysics(PHYS_Falling);
}
if (!bDud)
Explode(HitLocation,Normal(HitLocation-Other.Location));
}
defaultproperties{}

View file

@ -0,0 +1,169 @@
class stub_ModelSelect extends KFModelSelect;
// // Overridden to get rid of the Race combo
// function InitComponent(GUIController MyController, GUIComponent MyOwner)
// {
// super(LockedFloatingWindow).Initcomponent(MyController, MyOwner);
// sb_Main.SetPosition(0.040000,0.075000,0.680742,0.555859);
// sb_Main.RightPadding = 0.5;
// sb_Main.ManageComponent(CharList);
// class'xUtil'.static.GetPlayerList(PlayerList);
// RefreshCharacterList("DUP");
// // Spawn spinning character actor
// if ( SpinnyDude == None )
// SpinnyDude = PlayerOwner().spawn(class'XInterface.SpinnyWeap');
// SpinnyDude.SetDrawType(DT_Mesh);
// SpinnyDude.SetDrawScale(0.9);
// SpinnyDude.SpinRate = 0;
// }
function RefreshCharacterList(string ExcludedChars, optional string Race)
{
local int i, j;
local array<string> Excluded;
// Prevent list from calling OnChange events
CharList.List.bNotify = False;
CharList.Clear();
Split(ExcludedChars, ";", Excluded);
for ( i = 0; i < PlayerList.Length; i++ )
{
// Check that this character is selectable
if ( PlayerList[i].Menu != "" )
{
for (j = 0; j < Excluded.Length; j++)
if ( InStr(";" $ Playerlist[i].Menu $ ";", ";" $ Excluded[j] $ ";") != -1 )
break;
if ( j < Excluded.Length )
continue;
}
// if ( IsUnLocked(PlayerList[i]) )
// {
CharList.List.Add(Playerlist[i].Portrait, i, 0);
// }
// else if ( Playerlist[i].LockedPortrait == none )
// {
// CharList.List.Add(Playerlist[i].Portrait, i, 1);
// }
// else
// {
// CharList.List.Add(Playerlist[i].LockedPortrait, i, 1);
// }
}
CharList.List.LockedMat = LockedImage;
CharList.List.bNotify = True;
}
function HandleParameters( string Who, string Team )
{
local int i;
for ( i = 0; i < PlayerList.Length; i++)
{
if ( PlayerList[i].DefaultName ~= Who )
{
CharList.List.SetIndex(CharList.List.FindItem(i));
}
}
UpdateSpinnyDude();
}
// // Overridden to set Idle Animation
// function UpdateSpinnyDude()
// {
// local int idx;
// local xUtil.PlayerRecord Rec;
// local Mesh PlayerMesh;
// local Material BodySkin, HeadSkin;
// local string BodySkinName, HeadSkinName, TeamSuffix;
// idx = CharList.List.GetItem();
// if ( idx < 0 || idx >= Playerlist.Length )
// return;
// Rec = PlayerList[idx];
// if (Rec.Race ~= "Juggernaut" || Rec.DefaultName~="Axon" || Rec.DefaultName~="Cyclops" || Rec.DefaultName ~="Virus" )
// SpinnyDudeOffset=vect(250.0,1.00,-14.00);
// else
// SpinnyDudeOffset=vect(250.0,1.00,-24.00);
// PlayerMesh = Mesh(DynamicLoadObject(Rec.MeshName, class'Mesh'));
// if(PlayerMesh == None)
// {
// Log("Could not load mesh: "$Rec.MeshName$" For player: "$Rec.DefaultName);
// return;
// }
// // Get the body skin
// BodySkinName = Rec.BodySkinName;
// // Get the head skin
// HeadSkinName = Rec.FaceSkinName;
// if ( Rec.TeamFace )
// HeadSkinName $= TeamSuffix;
// BodySkin = Material(DynamicLoadObject(BodySkinName, class'Material'));
// if(BodySkin == None)
// {
// Log("Could not load body material: "$Rec.BodySkinName$" For player: "$Rec.DefaultName);
// return;
// }
// HeadSkin = Material(DynamicLoadObject(HeadSkinName, class'Material'));
// if(HeadSkin == None)
// {
// Log("Could not load head material: "$HeadSkinName$" For player: "$Rec.DefaultName);
// return;
// }
// SpinnyDude.LinkMesh(PlayerMesh);
// SpinnyDude.Skins[0] = BodySkin;
// SpinnyDude.Skins[1] = HeadSkin;
// SpinnyDude.LoopAnim('Profile_idle');
// }
// // Overridden to stop log spam
// function PopulateRaces()
// {
// }
// function HandleLockedCharacterClicked(int NewIndex)
// {
// if ( PlayerOwner() != none && PlayerOwner().PurchaseCharacter(Playerlist[NewIndex].DefaultName) )
// {
// Controller.CloseMenu(true);
// }
// }
// defaultproperties
// {
// co_Race=none
// Begin Object class=KFGUIVertImageListBox name=vil_CharList
// bScaleToParent=true
// bBoundToParent=true
// WinWidth=0.403407
// WinHeight=0.658125
// WinLeft=0.102888
// WinTop=0.185119
// CellStyle=Cell_FixedCount
// NoVisibleRows=3
// NoVisibleCols=4
// TabOrder=0
// OnChange=ListChange
// End Object
// CharList=vil_CharList
// }

View file

@ -0,0 +1,503 @@
class stub_Monster extends KFMonster;
var transient float fLastAttackTime;
//=============================================================================
// controller == none fix
//=============================================================================
// when you kill zeds before they fall into stun
// should i check it before whole function body??
function bool FlipOver()
{
if (Physics == PHYS_Falling)
SetPhysics(PHYS_Walking);
bShotAnim = true;
SetAnimAction('KnockDown');
Acceleration = vect(0, 0, 0);
Velocity.X = 0;
Velocity.Y = 0;
// fix!
if (Controller != none && KFMonsterController(Controller) != none)
{
Controller.GoToState('WaitForAnim');
KFMonsterController(Controller).bUseFreezeHack = true;
}
return true;
}
simulated function HandleBumpGlass()
{
Acceleration = vect(0,0,0);
Velocity = vect(0,0,0);
SetAnimAction(MeleeAnims[0]);
bShotAnim = true;
// fix!
if (Controller != none)
controller.GotoState('WaitForAnim');
}
//=============================================================================
// instigatedBy == none fix
//=============================================================================
function TakeDamage(int Damage, Pawn instigatedBy, Vector hitlocation, Vector momentum, class<DamageType> damageType, optional int HitIndex )
{
local bool bIsHeadshot;
local KFPlayerReplicationInfo KFPRI;
local float HeadShotCheckScale;
// if (InstigatedBy == none || class<KFWeaponDamageType>(DamType) == none)
LastDamagedBy = instigatedBy;
LastDamagedByType = damageType;
HitMomentum = VSize(momentum);
LastHitLocation = hitlocation;
LastMomentum = momentum;
if ( instigatedBy != none && KFPawn(instigatedBy) != none && instigatedBy.PlayerReplicationInfo != none )
KFPRI = KFPlayerReplicationInfo(instigatedBy.PlayerReplicationInfo);
// Scale damage if the Zed has been zapped
if ( bZapped )
Damage *= ZappedDamageMod;
// Zeds and fire dont mix.
if ( class<KFWeaponDamageType>(damageType) != none && class<KFWeaponDamageType>(damageType).default.bDealBurningDamage )
{
if( BurnDown<=0 || Damage > LastBurnDamage )
{
// LastBurnDamage variable is storing last burn damage (unperked) received,
// which will be used to make additional damage per every burn tick (second).
LastBurnDamage = Damage;
// FireDamageClass variable stores damage type, which started zed's burning
// and will be passed to this function again every next burn tick (as damageType argument)
if ( class<DamTypeTrenchgun>(damageType) != none ||
class<DamTypeFlareRevolver>(damageType) != none ||
class<DamTypeMAC10MPInc>(damageType) != none)
{
FireDamageClass = damageType;
}
else
{
FireDamageClass = class'DamTypeFlamethrower';
}
}
if ( class<DamTypeMAC10MPInc>(damageType) == none )
Damage *= 1.5; // Increase burn damage 1.5 times, except MAC10.
// BurnDown variable indicates how many ticks are remaining for zed to burn.
// It is 0, when zed isn't burning (or stopped burning).
// So all the code below will be executed only, if zed isn't already burning
if ( BurnDown <= 0 )
{
if( HeatAmount > 4 || Damage >= 15 )
{
bBurnified = true;
BurnDown = 10; // Inits burn tick count to 10
SetGroundSpeed(GroundSpeed *= 0.80); // Lowers movement speed by 20%
BurnInstigator = instigatedBy;
SetTimer(1.0,false); // Sets timer function to be executed each second
}
else
HeatAmount++;
}
}
if ( !bDecapitated && class<KFWeaponDamageType>(damageType)!=none &&
class<KFWeaponDamageType>(damageType).default.bCheckForHeadShots )
{
HeadShotCheckScale = 1.0;
// Do larger headshot checks if it is a melee attach
if( class<DamTypeMelee>(damageType) != none )
HeadShotCheckScale *= 1.25;
bIsHeadShot = IsHeadShot(hitlocation, normal(momentum), HeadShotCheckScale);
bLaserSightedEBRM14Headshotted = bIsHeadshot && M14EBRBattleRifle(instigatedBy.Weapon) != none && M14EBRBattleRifle(instigatedBy.Weapon).bLaserActive;
}
else
{
bLaserSightedEBRM14Headshotted = bLaserSightedEBRM14Headshotted && bDecapitated;
}
if ( KFPRI != none )
{
if ( KFPRI.ClientVeteranSkill != none )
{
Damage = KFPRI.ClientVeteranSkill.Static.AddDamage(KFPRI, self, KFPawn(instigatedBy), Damage, DamageType);
}
}
if ( LastDamagedBy != none && damageType != none && LastDamagedBy.IsPlayerPawn() && LastDamagedBy.Controller != none )
{
if ( KFMonsterController(Controller) != none )
{
KFMonsterController(Controller).AddKillAssistant(LastDamagedBy.Controller, FMin(Health, Damage));
}
}
if ( (bDecapitated || bIsHeadShot) && class<DamTypeBurned>(DamageType) == none && class<DamTypeFlamethrower>(DamageType) == none )
{
if(class<KFWeaponDamageType>(damageType)!=none)
Damage = Damage * class<KFWeaponDamageType>(damageType).default.HeadShotDamageMult;
if ( class<DamTypeMelee>(damageType) == none && KFPRI != none &&
KFPRI.ClientVeteranSkill != none )
{
Damage = float(Damage) * KFPRI.ClientVeteranSkill.Static.GetHeadShotDamMulti(KFPRI, KFPawn(instigatedBy), DamageType);
}
LastDamageAmount = Damage;
if( !bDecapitated )
{
if( bIsHeadShot )
{
// Play a sound when someone gets a headshot TODO: Put in the real sound here
if( bIsHeadShot )
{
PlaySound(sound'KF_EnemyGlobalSndTwo.Impact_Skull', SLOT_None,2.0,true,500);
}
HeadHealth -= LastDamageAmount;
if( HeadHealth <= 0 || Damage > Health )
{
RemoveHead();
}
}
// Award headshot here, not when zombie died.
if( bDecapitated && Class<KFWeaponDamageType>(damageType) != none && instigatedBy != none && KFPlayerController(instigatedBy.Controller) != none )
{
bLaserSightedEBRM14Headshotted = M14EBRBattleRifle(instigatedBy.Weapon) != none && M14EBRBattleRifle(instigatedBy.Weapon).bLaserActive;
Class<KFWeaponDamageType>(damageType).Static.ScoredHeadshot(KFSteamStatsAndAchievements(PlayerController(instigatedBy.Controller).SteamStatsAndAchievements), self.Class, bLaserSightedEBRM14Headshotted);
}
}
}
// Client check for Gore FX
// BodyPartRemoval(Damage,instigatedBy,hitlocation,momentum,damageType);
if( Health-Damage > 0 && DamageType!=class'DamTypeFrag' && DamageType!=class'DamTypePipeBomb'
&& DamageType!=class'DamTypeM79Grenade' && DamageType!=class'DamTypeM32Grenade'
&& DamageType!=class'DamTypeM203Grenade' && DamageType!=class'DamTypeDwarfAxe'
&& DamageType!=class'DamTypeSPGrenade' && DamageType!=class'DamTypeSealSquealExplosion'
&& DamageType!=class'DamTypeSeekerSixRocket')
{
Momentum = vect(0,0,0);
}
if(class<DamTypeVomit>(DamageType) != none) // Same rules apply to zombies as players.
{
BileCount=7;
if (instigatedBy != none)
BileInstigator = instigatedBy;
else
BileInstigator = self;
LastBileDamagedByType=class<DamTypeVomit>(DamageType);
if(NextBileTime< Level.TimeSeconds )
NextBileTime = Level.TimeSeconds+BileFrequency;
}
if ( KFPRI != none && Health-Damage <= 0 && KFPRI.ClientVeteranSkill != none && KFPRI.ClientVeteranSkill.static.KilledShouldExplode(KFPRI, KFPawn(instigatedBy)) )
{
Super(Monster).takeDamage(Damage + 600, instigatedBy, hitLocation, momentum, damageType);
HurtRadius(500, 1000, class'DamTypeFrag', 100000, Location);
}
else
{
Super(Monster).takeDamage(Damage, instigatedBy, hitLocation, momentum, damageType);
}
// if (Damage*1.5 >= default.Health || (Damage > 200 && KFDamType != none && KFDamType.default.bSniperWeapon && ZedVictim.IsA('ZombieHusk') ))
// {
// ZedVictim.Controller.Focus = none;
// ZedVictim.Controller.FocalPoint = ZedVictim.Location + 512 * vector(ZedVictim.Rotation);
// }
// block yet another zed time call
// if( bIsHeadShot && Health <= 0 )
// {
// KFGameType(Level.Game).DramaticEvent(0.03);
// }
bBackstabbed = false;
}
// attempt to fix ground speed bugs
function TakeFireDamage(int Damage,pawn Instigator)
{
local Vector DummyHitLoc,DummyMomentum;
TakeDamage(Damage, BurnInstigator, DummyHitLoc, DummyMomentum, FireDamageClass);
if ( BurnDown > 0 )
{
// Decrement the number of FireDamage calls left before our Zombie is extinguished :)
BurnDown --;
}
// Melt em' :)
if ( BurnDown < CrispUpThreshhold )
{
ZombieCrispUp();
}
if ( BurnDown == 0 )
{
bBurnified = false;
if( !bZapped )
{
// was `default.GroundSpeed`
SetGroundSpeed(GetOriginalGroundSpeed());
}
}
}
//=============================================================================
// fix for zed corpse collision shit
//=============================================================================
//Stops the green shit when a player dies.
simulated function PlayDying(class<DamageType> DamageType, vector HitLoc)
{
local float frame, rate;
local name seq;
local LavaDeath LD;
local MiscEmmiter BE;
AmbientSound = None;
bCanTeleport = false; // sjs - fix karma going crazy when corpses land on teleporters
bReplicateMovement = false;
bTearOff = true;
bPlayedDeath = true;
StopBurnFX();
if (CurrentCombo != None)
CurrentCombo.Destroy();
HitDamageType = DamageType; // these are replicated to other clients
TakeHitLocation = HitLoc;
bSTUNNED = false;
bMovable = true;
if ( class<DamTypeBurned>(DamageType) != none || class<DamTypeFlamethrower>(DamageType) != none )
{
ZombieCrispUp();
}
ProcessHitFX() ;
if ( DamageType != None )
{
if ( DamageType.default.bSkeletize )
{
SetOverlayMaterial(DamageType.Default.DamageOverlayMaterial, 4.0, true);
if (!bSkeletized)
{
if ( (Level.NetMode != NM_DedicatedServer) && (SkeletonMesh != None) )
{
if ( DamageType.default.bLeaveBodyEffect )
{
BE = spawn(class'MiscEmmiter',self);
if ( BE != None )
{
BE.DamageType = DamageType;
BE.HitLoc = HitLoc;
bFrozenBody = true;
}
}
GetAnimParams( 0, seq, frame, rate );
LinkMesh(SkeletonMesh, true);
Skins.Length = 0;
PlayAnim(seq, 0, 0);
SetAnimFrame(frame);
}
if (Physics == PHYS_Walking)
Velocity = Vect(0,0,0);
SetTearOffMomemtum(GetTearOffMomemtum() * 0.25);
bSkeletized = true;
if ( (Level.NetMode != NM_DedicatedServer) && (DamageType == class'FellLava') )
{
LD = spawn(class'LavaDeath', , , Location + vect(0, 0, 10), Rotation );
if ( LD != None )
LD.SetBase(self);
//PlaySound( sound'WeaponSounds.BExplosion5', SLOT_None, 1.5*TransientSoundVolume );
}
}
}
else if ( DamageType.Default.DeathOverlayMaterial != None )
SetOverlayMaterial(DamageType.Default.DeathOverlayMaterial, DamageType.default.DeathOverlayTime, true);
else if ( (DamageType.Default.DamageOverlayMaterial != None) && (Level.DetailMode != DM_Low) && !Level.bDropDetail )
SetOverlayMaterial(DamageType.Default.DamageOverlayMaterial, 2*DamageType.default.DamageOverlayTime, true);
}
// stop shooting
AnimBlendParams(1, 0.0);
FireState = FS_None;
// Try to adjust around performance
//log(Level.DetailMode);
LifeSpan = RagdollLifeSpan;
GotoState('ZombieDying');
if ( BE != None )
return;
PlayDyingAnimation(DamageType, HitLoc);
// ADDITION for collision fix
bBlockActors = false;
bBlockPlayers = false;
bBlockProjectiles = false;
bProjTarget = false;
bBlockZeroExtentTraces = false;
bBlockNonZeroExtentTraces = false;
bBlockHitPointTraces = false;
}
state ZombieDying
{
simulated function BeginState()
{
// ADDITION for collision fix
bBlockActors = false;
bBlockPlayers = false;
bBlockProjectiles = false;
bProjTarget = false;
bBlockZeroExtentTraces = false;
bBlockNonZeroExtentTraces = false;
bBlockHitPointTraces = false;
if (bDestroyNextTick)
{
// If we've flagged this character to be destroyed next tick, handle that
if (TimeSetDestroyNextTickTime < Level.TimeSeconds)
Destroy();
else
SetTimer(0.01, false);
}
else
{
if (bTearOff && (Level.NetMode == NM_DedicatedServer) || class'GameInfo'.static.UseLowGore())
LifeSpan = 1.0;
else
SetTimer(2.0, false);
}
SetPhysics(PHYS_Falling);
if (Controller != None)
Controller.Destroy();
}
}
//=============================================================================
// lets limit some zeds attack abilities
//=============================================================================
function bool MeleeDamageTarget(int hitdamage, vector pushdir)
{
local vector HitLocation, HitNormal;
local actor HitActor;
local Name TearBone;
local float dummy;
local Emitter BloodHit;
// local vector TraceDir;
// Never should be done on client.
if (Level.NetMode == NM_Client || Controller == None)
return false;
// try to limit some zeds
if ((ClassIsChildOf(self.class, class'ZombieCrawler') || ClassIsChildOf(self.class, class'ZombieFleshpound')) && (Level.TimeSeconds < class'stub_Monster'.default.fLastAttackTime))
return false;
// ATTENTION!!! is 0.3 secs ok?
class'stub_Monster'.default.fLastAttackTime = Level.TimeSeconds + 0.3f;
if (Controller.Target!=none && Controller.Target.IsA('KFDoorMover'))
{
Controller.Target.TakeDamage(hitdamage, self ,HitLocation,pushdir, CurrentDamType);
return true;
}
// need to uncomment this and check :D
// ClearStayingDebugLines();
// TraceDir = Normal(Controller.Target.Location - Location);
// DrawStayingDebugLine(Location, Location + (TraceDir * (MeleeRange * 1.4 + Controller.Target.CollisionRadius + CollisionRadius)) , 255,255,0);
// check if still in melee range
if ( (Controller.target != None) && (bSTUNNED == false) && (DECAP == false) && (VSize(Controller.Target.Location - Location) <= MeleeRange * 1.4 + Controller.Target.CollisionRadius + CollisionRadius)
&& ((Physics == PHYS_Flying) || (Physics == PHYS_Swimming) || (Abs(Location.Z - Controller.Target.Location.Z)
<= FMax(CollisionHeight, Controller.Target.CollisionHeight) + 0.5 * FMin(CollisionHeight, Controller.Target.CollisionHeight))) )
{
// See if a trace would hit a pawn (Have to turn of hit point collision so trace doesn't hit the Human Pawn's bullet whiz cylinder)
bBlockHitPointTraces = false;
HitActor = Trace(HitLocation, HitNormal, Controller.Target.Location , Location + EyePosition(), true);
bBlockHitPointTraces = true;
// If the trace wouldn't hit a pawn, do the old thing of just checking if there is something blocking the trace
if (Pawn(HitActor) == none)
{
// Have to turn of hit point collision so trace doesn't hit the Human Pawn's bullet whiz cylinder
bBlockHitPointTraces = false;
HitActor = Trace(HitLocation, HitNormal, Controller.Target.Location, Location, false);
bBlockHitPointTraces = true;
if (HitActor != none)
return false;
}
if (KFHumanPawn(Controller.Target) != none)
{
//TODO - line below was KFPawn. Does this whole block need to be KFPawn, or is it OK as KFHumanPawn?
KFHumanPawn(Controller.Target).TakeDamage(hitdamage, Instigator ,HitLocation,pushdir, CurrentDamType); //class 'KFmod.ZombieMeleeDamage');
if (KFHumanPawn(Controller.Target).Health <=0)
{
if (!class'GameInfo'.static.UseLowGore())
{
BloodHit = Spawn(class'KFMod.FeedingSpray',self,,Controller.Target.Location,rotator(pushdir)); //
KFHumanPawn(Controller.Target).SpawnGibs(rotator(pushdir), 1);
TearBone=KFPawn(Controller.Target).GetClosestBone(HitLocation,Velocity,dummy);
KFHumanPawn(Controller.Target).HideBone(TearBone);
}
// Give us some Health back
if (Health <= (1.0-FeedThreshold)*HealthMax)
{
Health += FeedThreshold*HealthMax * Health/HealthMax;
}
}
}
else if (Controller.target != None)
{
// Do more damage if you are attacking another zed so that zeds don't just stand there whacking each other forever! - Ramm
if (KFMonster(Controller.Target) != none)
hitdamage *= DamageToMonsterScale;
Controller.Target.TakeDamage(hitdamage, self ,HitLocation,pushdir, CurrentDamType); //class 'KFmod.ZombieMeleeDamage');
}
return true;
}
return false;
}

View file

@ -0,0 +1,51 @@
class stub_Nade extends Nade;
var array<sound> BoomSounds;
// EXPERIMENTAL!!
// fixes nade crashes, but obviously we can't use this :yoba:
function TakeDamage( int Damage, Pawn InstigatedBy, Vector Hitlocation, Vector Momentum, class<DamageType> damageType, optional int HitIndex){}
simulated function Explode(vector HitLocation, vector HitNormal)
{
local PlayerController LocalPlayer;
local Projectile P;
local byte i;
bHasExploded = True;
BlowUp(HitLocation);
PlaySound(class'stub_Nade'.default.BoomSounds[rand(3)],,2.0);
// Shrapnel
for( i=Rand(6); i<10; i++ )
{
P = Spawn(ShrapnelClass,,,,RotRand(True));
if( P!=None )
P.RemoteRole = ROLE_None;
}
if ( EffectIsRelevant(Location,false) )
{
Spawn(Class'KFmod.KFNadeExplosion',,, HitLocation, rotator(vect(0,0,1)));
Spawn(ExplosionDecal,self,,HitLocation, rotator(-HitNormal));
}
// Shake nearby players screens
LocalPlayer = Level.GetLocalPlayerController();
if ( (LocalPlayer != None) && (VSize(Location - LocalPlayer.ViewTarget.Location) < (DamageRadius * 1.5)) )
LocalPlayer.ShakeView(RotMag, RotRate, RotTime, OffsetMag, OffsetRate, OffsetTime);
Destroy();
}
defaultproperties
{
BoomSounds[0]=SoundGroup'KF_GrenadeSnd.Nade_Explode_1'
BoomSounds[1]=SoundGroup'KF_GrenadeSnd.Nade_Explode_2'
BoomSounds[2]=SoundGroup'KF_GrenadeSnd.Nade_Explode_3'
}

View file

@ -0,0 +1,212 @@
class stub_PC extends KFPlayerController_Story;
var byte MaxVoiceMsgIn10s, contsMaxMsg;
//=============================================================================
// slomo + voice messages fuckup fix
//=============================================================================
// all 3 functions are from ScrN
simulated function ClientEnterZedTime()
{
// this 'xPlayer' bool is not being used anywhere so let's use it
// we need this bool for voice messages
autozoom = true;
CheckZEDMessage();
if (Pawn != none && Pawn.Weapon != none)
Pawn.Weapon.PlaySound(Sound'KF_PlayerGlobalSnd.Zedtime_Enter', SLOT_Talk, 2.0,false,500.0,1.1/Level.TimeDilation,false);
else
PlaySound(Sound'KF_PlayerGlobalSnd.Zedtime_Enter', SLOT_Talk, 2.0,false,500.0,1.1/Level.TimeDilation,false);
}
simulated function ClientExitZedTime()
{
// this 'xPlayer' bool is not being used anywhere so let's use it
// we need this bool for voice messages
autozoom = false;
if (Pawn != none && Pawn.Weapon != none)
Pawn.Weapon.PlaySound(Sound'KF_PlayerGlobalSnd.Zedtime_Exit', SLOT_Talk, 2.0,false,500.0,1.1/Level.TimeDilation,false);
else
PlaySound(Sound'KF_PlayerGlobalSnd.Zedtime_Exit', SLOT_Talk, 2.0,false,500.0,1.1/Level.TimeDilation,false);
}
function bool AllowVoiceMessage(name MessageType)
{
local float TimeSinceLastMsg;
if (Level.NetMode == NM_Standalone || (PlayerReplicationInfo != none && (PlayerReplicationInfo.bAdmin || PlayerReplicationInfo.bSilentAdmin)))
return true;
TimeSinceLastMsg = Level.TimeSeconds - OldMessageTime;
if (TimeSinceLastMsg < 3)
{
if (MessageType == 'TAUNT' || MessageType == 'AUTOTAUNT')
return false;
if (TimeSinceLastMsg < 1 )
return false;
}
// zed time screws up voice messages
if (!autozoom && MessageType != 'TRADER' && MessageType != 'AUTO')
{
OldMessageTime = Level.TimeSeconds;
if (TimeSinceLastMsg < 10)
{
if (class'stub_PC'.default.MaxVoiceMsgIn10s > 0)
class'stub_PC'.default.MaxVoiceMsgIn10s--;
else
{
ClientMessage("Keep quiet for " $ ceil(10 - TimeSinceLastMsg) $"s");
return false;
}
}
else
class'stub_PC'.default.MaxVoiceMsgIn10s = class'stub_PC'.default.contsMaxMsg;
}
return true;
}
//=============================================================================
// no delay suicide
//=============================================================================
exec function Suicide()
{
if (Pawn != none)
Pawn.Suicide();
}
//=============================================================================
// you will become #perk spam
//=============================================================================
// simulated SendSelectedVeterancyToServer() -> to this
// no more "you will become %perk" spam when you join midgame
// can change perk unlimited amount of times
function SelectVeterancy(class<KFVeterancyTypes> VetSkill, optional bool bForceChange)
{
if (VetSkill == none || KFPlayerReplicationInfo(PlayerReplicationInfo) == none)
return;
if (KFSteamStatsAndAchievements(SteamStatsAndAchievements) != none)
{
// sets proper 'BuyMenuFilterIndex'
SetSelectedVeterancy(VetSkill);
if (KFGameReplicationInfo(GameReplicationInfo).bWaveInProgress && VetSkill != KFPlayerReplicationInfo(PlayerReplicationInfo).ClientVeteranSkill)
{
// FIX!
// this 'xPlayer' float is not being used anywhere so let's use it
// wait 2 seconds for ClientVeteranSkill replication
if (Level.TimeSeconds > MinAdrenalineCost)
{
// moved this aswell so message and perk switch will happen at the same time
// bChangedVeterancyThisWave = false;
ClientMessage(Repl(YouWillBecomePerkString, "%Perk%", VetSkill.Default.VeterancyName));
}
MinAdrenalineCost = Level.TimeSeconds + 2.0f;
}
else // if (!bChangedVeterancyThisWave || bForceChange)
{
if (VetSkill != KFPlayerReplicationInfo(PlayerReplicationInfo).ClientVeteranSkill)
ClientMessage(Repl(YouAreNowPerkString, "%Perk%", VetSkill.Default.VeterancyName));
// if (GameReplicationInfo.bMatchHasBegun)
// bChangedVeterancyThisWave = true;
KFPlayerReplicationInfo(PlayerReplicationInfo).ClientVeteranSkill = VetSkill;
KFPlayerReplicationInfo(PlayerReplicationInfo).ClientVeteranSkillLevel = KFSteamStatsAndAchievements(SteamStatsAndAchievements).PerkHighestLevelAvailable(VetSkill.default.PerkIndex);
// recalcs weight and ammo
if (KFHumanPawn(Pawn) != none)
KFHumanPawn(Pawn).VeterancyChanged();
}
// else
// ClientMessage(PerkChangeOncePerWaveString);
}
}
//=============================================================================
// blank spectator join message fix
//=============================================================================
// worst case since repInfo creates after this function call
// should I check its existance for other parts of this function???
function JoinedAsSpectatorOnly()
{
if (Pawn != none)
Pawn.Died(self, class'DamageType', Pawn.Location);
if (PlayerReplicationInfo.Team != none)
PlayerReplicationInfo.Team.RemoveFromTeam(self);
PlayerReplicationInfo.Team = none;
ServerSpectate();
ClientBecameSpectator();
// let's fix blank messages
// this 'xPlayer' float is not being used anywhere so let's use it
MinAdrenalineCost = Level.TimeSeconds + 10.0f;
// start a loop and wait 10 secs for repInfo to appear
while (Level.TimeSeconds <= MinAdrenalineCost)
{
if (PlayerReplicationInfo != none)
{
// BroadcastLocalizedMessage(Level.Game.GameMessageClass, 14, PlayerReplicationInfo);
class'o_Helper'.static.BroadcastText(Level, "^b" $ PlayerReplicationInfo.PlayerName $ "^w joined as spectator.");
break;
}
}
}
function BecomeSpectator()
{
if (Role < ROLE_Authority)
return;
if (!Level.Game.BecomeSpectator(self))
return;
if (Pawn != none)
Pawn.Died(self, class'DamageType', Pawn.Location);
if (PlayerReplicationInfo.Team != none)
PlayerReplicationInfo.Team.RemoveFromTeam(self);
PlayerReplicationInfo.Team = none;
ServerSpectate();
// no repInfo checks since player is not leaving atm, just moving around
// change the text a bit, this is an other case
class'o_Helper'.static.BroadcastText(Level, "^b" $ PlayerReplicationInfo.PlayerName $ "^w moved to spectator slot.");
ClientBecameSpectator();
}
function bool IsInInventory(class<Pickup> PickupToCheck, bool bCheckForEquivalent, bool bCheckForVariant)
{
return false;
}
defaultproperties
{
MaxVoiceMsgIn10s=7
contsMaxMsg=7
}

View file

@ -0,0 +1,74 @@
class stub_P_Shotgun extends ShotgunBullet;
var Pawn Victim;
simulated function ProcessTouch (Actor Other, vector HitLocation)
{
local vector X;
local Vector TempHitLocation, HitNormal;
local array<int> HitPoints;
local KFPawn HitPawn;
if ( Other == none || Other == Instigator || Other.Base == Instigator || !Other.bBlockHitPointTraces )
return;
X = Vector(Rotation);
if ( Instigator != none && ROBulletWhipAttachment(Other) != none )
{
// we touched player's auxilary collision cylinder, not let's trace to the player himself
// Other.Base = KFPawn
if( Other.Base == none || Other.Base.bDeleteMe )
return;
Other = Instigator.HitPointTrace(TempHitLocation, HitNormal, HitLocation + (200 * X), HitPoints, HitLocation,, 1);
// bullet didn't hit a pawn
if( Other == none || HitPoints.Length == 0 || Other.bDeleteMe)
return;
HitPawn = KFPawn(Other);
if ( HitPawn != none )
{
class'stub_P_Shotgun'.default.Victim = HitPawn;
// fixed point blank penetration -> X vector
HitPawn.ProcessLocationalDamage(Damage, Instigator, TempHitLocation, MomentumTransfer * X, MyDamageType,HitPoints);
}
}
else
{
if ( Pawn(Other) != none )
class'stub_P_Shotgun'.default.Victim = Pawn(Other);
// fixed point blank penetration -> X vector
if ( class'stub_P_Shotgun'.default.Victim != none && Victim.IsHeadShot(HitLocation, X, 1.0))
class'stub_P_Shotgun'.default.Victim.TakeDamage(Damage * HeadShotDamageMult, Instigator, HitLocation, MomentumTransfer * X, MyDamageType);
else
Other.TakeDamage(Damage, Instigator, HitLocation, MomentumTransfer * X, MyDamageType);
}
if ( Instigator != none && KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo) != none && KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo).ClientVeteranSkill != none )
{
PenDamageReduction = KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo).ClientVeteranSkill.static.GetShotgunPenetrationDamageMulti(KFPlayerReplicationInfo(Instigator.PlayerReplicationInfo),default.PenDamageReduction);
}
else
{
PenDamageReduction = default.PenDamageReduction;
}
// dead bodies reduce damage less
if ( class'stub_P_Shotgun'.default.Victim != none && class'stub_P_Shotgun'.default.Victim.Health <= 0 )
{
PenDamageReduction += (1.0 - PenDamageReduction) * 0.5;
}
Damage *= PenDamageReduction; // Keep going, but lose effectiveness each time.
// 10 is for tests, may be changed
if ( Damage < 10 )
Destroy();
}

View file

@ -0,0 +1,336 @@
class stub_Pawn extends KFHumanPawn_Story;
struct FDualList
{
var class<KFWeapon> Single,Dual;
};
var array<FDualList> DualMap;
var int OtherPrice;
var class<KFWeapon> SecType;
var transient float cashtimer;
var transient byte CashCount;
//=============================================================================
// weapon == none fix
//=============================================================================
function ServerChangedWeapon(Weapon OldWeapon, Weapon NewWeapon)
{
local float InvisTime;
if (bInvis)
{
if ( (OldWeapon != none) && (OldWeapon.OverlayMaterial == InvisMaterial) )
InvisTime = OldWeapon.ClientOverlayCounter;
else
InvisTime = 20000;
}
if (HasUDamage() || bInvis)
SetWeaponOverlay(None, 0.f, true);
super(Pawn).ServerChangedWeapon(OldWeapon, NewWeapon);
if (bInvis)
SetWeaponOverlay(InvisMaterial, InvisTime, true);
else if (HasUDamage())
SetWeaponOverlay(UDamageWeaponMaterial, UDamageTime - Level.TimeSeconds, false);
// the fix
if (weapon == none)
return;
if (bBerserk)
Weapon.StartBerserk();
else if ( Weapon.bBerserk )
Weapon.StopBerserk();
}
//=============================================================================
// Dosh shit
//=============================================================================
// toss some of your cash away. (to help a cash-strapped ally or perhaps just to party like its 1994)
exec function TossCash(int Amount)
{
local Vector X,Y,Z;
local CashPickup CashPickup;
local Vector TossVel;
local Actor A;
// NEW check! and 0.3 sec delay between throws
if (Level.TimeSeconds < class'stub_Pawn'.default.cashtimer || PlayerReplicationInfo == none)
return;
class'stub_Pawn'.default.cashtimer = Level.TimeSeconds + 0.3f;
// 30 dosh at min
Amount = clamp(Amount, 30, int(Controller.PlayerReplicationInfo.Score));
// if (Amount<=0)
// Amount = 50;
Controller.PlayerReplicationInfo.Score = int(Controller.PlayerReplicationInfo.Score); // To fix issue with throwing 0 pounds.
if (Controller.PlayerReplicationInfo.Score<=0 || Amount<=0)
return;
Amount = Min(Amount, int(Controller.PlayerReplicationInfo.Score));
GetAxes(Rotation,X,Y,Z);
TossVel = Vector(GetViewRotation());
TossVel = TossVel * ((Velocity Dot TossVel) + 500) + Vect(0,0,200);
// added owner to cash pickup, 2020 finally
CashPickup = spawn(class'CashPickup', self,, Location + 0.8 * CollisionRadius * X - 0.5 * CollisionRadius * Y);
if (CashPickup != none)
{
CashPickup.CashAmount = Amount;
CashPickup.bDroppedCash = true;
CashPickup.RespawnTime = 0; // Dropped cash doesnt respawn. For obvious reasons.
CashPickup.Velocity = TossVel;
CashPickup.DroppedBy = Controller;
CashPickup.InitDroppedPickupFor(None);
Controller.PlayerReplicationInfo.Score -= Amount;
if ( Level.Game.NumPlayers > 1 && Level.TimeSeconds - LastDropCashMessageTime > DropCashMessageDelay )
{
PlayerController(Controller).Speech('AUTO', 4, "");
}
// Hack to get Slot machines to accept dosh that's thrown inside their collision cylinder.
foreach CashPickup.TouchingActors(class 'Actor', A)
{
if(A.IsA('KF_Slot_Machine'))
{
A.Touch(Cashpickup);
}
}
}
}
//=============================================================================
// Sound none on player death
//=============================================================================
// fix for none soundgroup calls on death
function Sound GetSound(xPawnSoundGroup.ESoundType soundType)
{
local int SurfaceTypeID;
local actor A;
local vector HL,HN,Start,End;
local material FloorMat;
// added this in case when player joins using a custom skin with a custom SoundGroupClass,
// which not present on the server
if ( SoundGroupClass == none )
SoundGroupClass = class'KFMod.KFMaleSoundGroup';
if( soundType == EST_Land || soundType == EST_Jump )
{
if ( (Base!=None) && (!Base.IsA('LevelInfo')) && (Base.SurfaceType!=0) )
{
SurfaceTypeID = Base.SurfaceType;
}
else
{
Start = Location - Vect(0,0,1)*CollisionHeight;
End = Start - Vect(0,0,16);
A = Trace(hl,hn,End,Start,false,,FloorMat);
if (FloorMat !=None)
SurfaceTypeID = FloorMat.SurfaceType;
}
}
return SoundGroupClass.static.GetSound(soundType, SurfaceTypeID);
}
// allows us to buy from trader menu from anywhere
function bool CanBuyNow()
{
local ShopVolume Sh;
if (class'o_Settings'.default.bBuyEverywhere)
return true;
if (KFGameType(Level.Game) == none || KFGameType(Level.Game).bWaveInProgress || PlayerReplicationInfo == none)
return false;
foreach TouchingActors(class'ShopVolume', Sh)
return true;
return false;
}
//=============================================================================
// Dualies Print Fix
//=============================================================================
function ServerBuyWeapon( class<Weapon> WClass, float ItemWeight )
{
local Inventory I, J;
local float Price;
if ( !CanBuyNow() || class<KFWeapon>(WClass) == none || class<KFWeaponPickup>(WClass.Default.PickupClass) == none || class'stub_Pawn'.static.HasWeaponClass(WClass) )
{
return;
}
Price = class<KFWeaponPickup>(WClass.default.PickupClass).default.Cost;
if ( KFPlayerReplicationInfo(PlayerReplicationInfo).ClientVeteranSkill != none )
Price *= KFPlayerReplicationInfo(PlayerReplicationInfo).ClientVeteranSkill.static.GetCostScaling(KFPlayerReplicationInfo(PlayerReplicationInfo), WClass.Default.PickupClass);
// N.B. addition !
// ItemWeight = class<KFWeapon>(WClass).default.Weight;
if ( class'stub_Pawn'.static.IsDualWeapon(WClass,SecType) )
{
if ( WClass != class'Dualies' && class'stub_Pawn'.static.HasWeaponClass(class'stub_Pawn'.default.SecType, J) )
{
// ItemWeight -= class'stub_Pawn'.default.SecType.default.Weight;
Price *= 0.5f;
class'stub_Pawn'.default.OtherPrice = KFWeapon(J).SellValue;
if ( class'stub_Pawn'.default.OtherPrice == -1 )
{
class'stub_Pawn'.default.OtherPrice = class<KFWeaponPickup>(class'stub_Pawn'.default.SecType.Default.PickupClass).Default.Cost * 0.75;
if ( KFPlayerReplicationInfo(PlayerReplicationInfo).ClientVeteranSkill != none )
class'stub_Pawn'.default.OtherPrice *= KFPlayerReplicationInfo(PlayerReplicationInfo).ClientVeteranSkill.static.GetCostScaling(KFPlayerReplicationInfo(PlayerReplicationInfo), SecType.Default.PickupClass);
}
}
}
else if ( class'stub_Pawn'.static.HasDualies(WClass,Inventory) )
return;
// add
Price = int(Price); // Truncuate price.
if ( !CanCarry(ItemWeight) )
{
return;
}
if ( PlayerReplicationInfo.Score < Price )
{
ClientMessage("Error: "$WClass.Name$" is too expensive ("$int(Price)$">"$int(PlayerReplicationInfo.Score)$")");
return; // Not enough CASH.
}
I = Spawn(WClass);
if ( I != none )
{
if ( KFGameType(Level.Game) != none )
KFGameType(Level.Game).WeaponSpawned(I);
KFWeapon(I).UpdateMagCapacity(PlayerReplicationInfo);
KFWeapon(I).FillToInitialAmmo();
KFWeapon(I).SellValue = Price * 0.75;
if (class'stub_Pawn'.default.OtherPrice > 0)
KFWeapon(I).SellValue += class'stub_Pawn'.default.OtherPrice;
I.GiveTo(self);
PlayerReplicationInfo.Score -= Price;
ClientForceChangeWeapon(I);
}
else
ClientMessage("Error: "$WClass.Name$" failed to spawn.");
SetTraderUpdate();
}
static final function bool HasWeaponClass( class<Inventory> IC, optional out Inventory Res )
{
local Inventory I;
for ( I=default.Inventory; I!=None; I=I.default.Inventory )
{
if( I.Class == IC )
{
Res = I;
return true;
}
}
return false;
}
static final function bool IsDualWeapon(class<Weapon> W, optional out class<KFWeapon> SingleType )
{
local int i;
if (W.Default.DemoReplacement != none)
{
SingleType = class<KFWeapon>(W.Default.DemoReplacement);
return true;
}
for( i=(Default.DualMap.Length-1); i>=0; --i )
{
if( W==Default.DualMap[i].Dual )
{
SingleType = Default.DualMap[i].Single;
return true;
}
}
return false;
}
static final function bool HasDualies( class<Weapon> W, Inventory InvList, optional out class<KFWeapon> DualType )
{
local int i;
local Inventory In;
for ( In=InvList; In!=None; In=In.Inventory )
{
if( Weapon(In)!=None && Weapon(In).DemoReplacement==W )
{
DualType = class<KFWeapon>(In.Class);
return true;
}
}
for ( i=(Default.DualMap.Length-1); i>=0; --i )
{
if ( W == Default.DualMap[i].Single )
{
DualType = Default.DualMap[i].Dual;
W = Default.DualMap[i].Dual;
for ( In=InvList; In!=None; In=In.Inventory )
{
if (In.Class == W)
return true;
}
return false;
}
}
return false;
}
function AddDefaultInventory()
{
CreateInventory("KFMod.Knife");
CreateInventory("KFMod.Single");
CreateInventory("KFMod.Frag");
CreateInventory("KFMod.Syringe");
CreateInventory("KFMod.Welder");
}
defaultproperties
{
DualMap[0]=(Single=class'Single',Dual=class'Dualies')
DualMap[1]=(Single=class'Magnum44Pistol',Dual=class'Dual44Magnum')
DualMap[2]=(Single=class'Deagle',Dual=class'DualDeagle')
DualMap[3]=(Single=class'FlareRevolver',Dual=class'DualFlareRevolver')
DualMap[4]=(Single=class'MK23Pistol',Dual=class'DualMK23Pistol')
}

View file

@ -0,0 +1,208 @@
class stub_Pipe extends PipeBombProjectile;
var sound BoomSound;
static function PreloadAssets()
{
UpdateDefaultStaticMesh(StaticMesh(DynamicLoadObject(default.StaticMeshRef, class'StaticMesh', true)));
}
static function bool UnloadAssets()
{
UpdateDefaultStaticMesh(none);
return true;
}
// fix insane damage while being triggered with m1 spam
function TakeDamage( int Damage, Pawn InstigatedBy, Vector Hitlocation, Vector Momentum, class<DamageType> damageType, optional int HitIndex)
{
// added bTriggered check and moved damage check for siren scream
if ( bTriggered || Damage < 5 || damageType == class'DamTypePipeBomb' ||
ClassIsChildOf(damageType, class'DamTypeMelee') ||
(Damage < 25 && damageType.IsA('SirenScreamDamage')) )
{
return;
}
// Don't let our own explosives blow this up!!!
if ( InstigatedBy == none || InstigatedBy != none &&
InstigatedBy.PlayerReplicationInfo != none &&
InstigatedBy.PlayerReplicationInfo.Team != none &&
InstigatedBy.PlayerReplicationInfo.Team.TeamIndex == PlacedTeam &&
Class<KFWeaponDamageType>(damageType) != none &&
(Class<KFWeaponDamageType>(damageType).default.bIsExplosive ||
InstigatedBy != Instigator) )
{
return;
}
if ( damageType == class'SirenScreamDamage')
{
Disintegrate(HitLocation, vect(0,0,1));
}
else
{
Explode(HitLocation, vect(0,0,1));
}
}
// NPC, dead players trigger fix
function Timer()
{
local Pawn CheckPawn;
local float ThreatLevel;
// still not sure about creating new local vars
// but welp, it works fine
local vector DetectLocation;
// raise a detection poin half a meter up to prevent small objects on the ground bloking the trace
DetectLocation = Location;
DetectLocation.Z += 25;
if( !bHidden && !bTriggered )
{
if( ArmingCountDown >= 0 )
{
ArmingCountDown -= 0.1;
if( ArmingCountDown <= 0 )
{
SetTimer(1.0, true);
}
}
else
{
// Check for enemies
if( !bEnemyDetected )
{
bAlwaysRelevant = false;
PlaySound(BeepSound,,0.5,,50.0);
foreach VisibleCollidingActors( class 'Pawn', CheckPawn, DetectionRadius, DetectLocation )
{
// don't trigger pipes on NPC -- PooSH
if( CheckPawn == Instigator || KF_StoryNPC(CheckPawn) != none && KFGameType(Level.Game).FriendlyFireScale > 0 &&
CheckPawn.PlayerReplicationInfo != none &&
CheckPawn.PlayerReplicationInfo.Team.TeamIndex == PlacedTeam )
{
// Make the thing beep if someone on our team is within the detection radius
// This gives them a chance to get out of the way
ThreatLevel += 0.001;
}
else
{
// don't trigger pipes by dead bodies -- PooSH
if( CheckPawn.Health > 0 && CheckPawn != Instigator && (CheckPawn.Role == ROLE_Authority) &&
((CheckPawn.PlayerReplicationInfo != none && CheckPawn.PlayerReplicationInfo.Team.TeamIndex != PlacedTeam) ||
CheckPawn.GetTeamNum() != PlacedTeam))
{
if( KFMonster(CheckPawn) != none )
{
ThreatLevel += KFMonster(CheckPawn).MotionDetectorThreat;
if( ThreatLevel >= ThreatThreshhold )
{
bEnemyDetected = true;
SetTimer(0.15, true);
}
}
else
{
bEnemyDetected = true;
SetTimer(0.15, true);
}
}
}
}
if( ThreatLevel >= ThreatThreshhold )
{
bEnemyDetected = true;
SetTimer(0.15, true);
}
else if( ThreatLevel > 0 )
{
SetTimer(0.5, true);
}
else
{
SetTimer(1.0, true);
}
}
// Play some fast beeps and blow up
else
{
bAlwaysRelevant = true;
Countdown--;
if ( CountDown > 0 )
{
PlaySound(BeepSound, SLOT_Misc, 2.0,, 150.0);
}
else
{
Explode(DetectLocation, vector(Rotation));
}
}
}
}
else
{
Destroy();
}
}
// explode sounds none fix
simulated function Explode(vector HitLocation, vector HitNormal)
{
local PlayerController LocalPlayer;
local Projectile P;
local byte i;
bHasExploded = true;
BlowUp(HitLocation);
bTriggered = true;
if ( Role == ROLE_Authority )
{
SetTimer(0.1, false);
NetUpdateTime = Level.TimeSeconds - 1;
}
PlaySound(class'stub_Pipe'.default.BoomSound,,2.0);
// Shrapnel
for( i=Rand(6); i<10; i++ )
{
P = Spawn(ShrapnelClass,,,,RotRand(true));
if( P!=None )
P.RemoteRole = ROLE_None;
}
if ( EffectIsRelevant(Location,false) )
{
Spawn(Class'KFMod.KFNadeLExplosion',,, HitLocation, rotator(vect(0,0,1)));
Spawn(ExplosionDecal,self,,HitLocation, rotator(-HitNormal));
}
// Shake nearby players screens
LocalPlayer = Level.GetLocalPlayerController();
if ( (LocalPlayer != None) && (VSize(Location - LocalPlayer.ViewTarget.Location) < (DamageRadius * 1.5)) )
LocalPlayer.ShakeView(RotMag, RotRate, RotTime, OffsetMag, OffsetRate, OffsetTime);
if( Role < ROLE_Authority )
{
Destroy();
}
}
defaultproperties
{
BoomSound=SoundGroup'Inf_Weapons.antitankmine.antitankmine_explode01'
}

View file

@ -0,0 +1,14 @@
class stub_Rule extends GameRules;
// no map switch if we leave from lobby
function bool CheckEndGame(PlayerReplicationInfo Winner, string Reason)
{
if (Level.Game.IsInState('PendingMatch'))
return false;
if (NextGameRules != none)
return NextGameRules.CheckEndGame(Winner, Reason);
return true;
}

View file

@ -0,0 +1,149 @@
// imagine almost all main functions of this class are bugged
// amazing, i cummed twice
class stub_ShopVolume extends KFShopVolume_Story;
var string shopTag;
// fix for accessed nones
function Touch(Actor Other)
{
// to prevent accessed none warnings
if (Other == none)
return;
if ( Pawn(Other) != none && PlayerController(Pawn(Other).Controller) != none && KFGameType(Level.Game) != none && !KFGameType(Level.Game).bWaveInProgress )
{
if( !bCurrentlyOpen )
{
BootPlayers();
return;
}
// none check
if (MyTrader != none)
MyTrader.SetOpen(true);
if( KFPlayerController(Pawn(Other).Controller) !=None )
{
KFPlayerController(Pawn(Other).Controller).SetShowPathToTrader(false);
KFPlayerController(Pawn(Other).Controller).CheckForHint(52);
}
PlayerController(Pawn(Other).Controller).ReceiveLocalizedMessage(class'KFMainMessages',3);
if ( KFPlayerController(Pawn(Other).Controller) != none && !KFPlayerController(Pawn(Other).Controller).bHasHeardTraderWelcomeMessage )
{
// Have Trader say Welcome to players
if ( KFGameType(Level.Game).WaveCountDown >= 30 )
{
KFPlayerController(Pawn(Other).Controller).ClientLocationalVoiceMessage(Pawn(Other).PlayerReplicationInfo, none, 'TRADER', 7);
KFPlayerController(Pawn(Other).Controller).bHasHeardTraderWelcomeMessage = true;
}
}
}
else if( Other.IsA('KF_StoryInventoryPickup') )
{
if( !bCurrentlyOpen )
{
BootPlayers();
return;
}
}
}
function UnTouch( Actor Other )
{
// to prevent accessed none warnings
if (Other == none)
return;
// none check
if ( MyTrader != none && Pawn(Other) != none && PlayerController(Pawn(Other).Controller) != none && KFGameType(Level.Game) != none )
MyTrader.SetOpen(false);
}
function UsedBy(Pawn user)
{
// to prevent accessed none warnings
if (user == none || KFHumanPawn(user) == none)
return;
// Set the pawn to an idle anim so he wont keep making footsteps
User.SetAnimAction(User.IdleWeaponAnim);
// none check
if (MyTrader != none)
class'stub_ShopVolume'.default.shoptag = string(MyTrader.Tag);
if (KFPlayerController(user.Controller) != none && KFGameType(Level.Game) != none && !KFGameType(Level.Game).bWaveInProgress)
KFPlayerController(user.Controller).ShowBuyMenu(class'stub_ShopVolume'.default.shoptag, KFHumanPawn(user).MaxCarryWeight);
}
// touching out of bounds fix
function bool BootPlayers()
{
local KFHumanPawn Bootee;
local int i,idx;
local bool bResult;
local int NumTouching,NumBooted;
local array<Teleporter> UnusedSpots;
local bool bBooted;
// really wtf is this
if ( !bTelsInit )
InitTeleports();
if ( !bHasTeles )
Return False; // Wtf?
UnusedSpots = TelList;
for (idx = 0; idx < Touching.Length; idx++)
{
// none check so we wont go out of bounds
if (Touching[idx] == none)
continue;
if (Touching[idx].IsA('KFHumanPawn'))
{
Bootee = KFHumanPawn(Touching[idx]);
NumTouching ++ ;
if (PlayerController(Bootee.Controller) != none)
{
PlayerController(Bootee.Controller).ReceiveLocalizedMessage(class'KFMainMessages');
PlayerController(Bootee.Controller).ClientCloseMenu(true, true);
}
// Teleport to a random teleporter in this local area, if more than one pick random.
i = Rand(UnusedSpots.Length);
// removed pawn check coz WE ALREADY CHECKED IT !
Bootee.PlayTeleportEffect(false, true);
bBooted = UnusedSpots[i].Accept(Bootee, self);
if (bBooted)
{
NumBooted ++;
UnusedSpots.Remove(i,1); // someone is being teleported here. We can't have the next guy spawning on top of him.
}
}
else if (Touching[idx].IsA('KF_StoryInventoryPickup'))
{
Touching[idx].SetLocation(TelList[Rand(TelList.length)].Location + (vect(0,0,1) * Touching[idx].CollisionHeight)) ;
Touching[idx].SetPhysics(PHYS_Falling);
Touching[idx].SetOwner(Touching[idx].Owner); // to force NetDirty
}
}
bResult = NumBooted >= NumTouching;
return bResult;
}
defaultproperties{}

View file

@ -0,0 +1,25 @@
class stub_Syringe extends Syringe;
// fix syringe heal ammounts when players die
simulated function bool HackClientStartFire()
{
if (StartFire(1))
{
if (Role < ROLE_Authority)
{
// best idea i've come to
// at least im not running timer like Poosh
if (Level.Game.NumPlayers == 1)
HealBoostAmount = 50;
else
HealBoostAmount = default.HealBoostAmount;
ServerStartFire(1);
}
FireMode[1].ModeDoFire(); // Force to start animating.
return true;
}
return false;
}

View file

@ -0,0 +1,142 @@
class stub_VotingHandler extends xVotingHandler;
// only REAL players are counted. FUCKING IGNORES SPECS AND FAKES. FINALLY!!!!!!
function TallyVotes(bool bForceMapSwitch)
{
local int oldNumPlayers;
local Controller c;
// save the current player count
oldNumPlayers = Level.Game.NumPlayers;
// reset the player count
Level.Game.NumPlayers = 0;
// count real players to prevent fakes from or specs from preventing map switching
for (c=level.ControllerList; c!=none; c=c.nextController)
{
if (c.bIsPlayer && c.PlayerReplicationInfo != none && !c.PlayerReplicationInfo.bOnlySpectator)
Level.Game.NumPlayers++;
}
super(xVotingHandler).TallyVotes(bForceMapSwitch);
// restore the original number of players
Level.Game.NumPlayers = oldNumPlayers;
}
// this is just here to tell spectators that they can't vote
function SubmitMapVote(int MapIndex, int GameIndex, Actor Voter)
{
local int Index, VoteCount, PrevMapVote, PrevGameVote;
local MapHistoryInfo MapInfo;
local bool bAdminForce;
if (bLevelSwitchPending)
return;
Index = GetMVRIIndex(PlayerController(Voter));
if (GameIndex < 0)
{
bAdminForce = true;
GameIndex = (-GameIndex) - 1;
}
if (GameIndex >= GameConfig.Length || MapIndex < 0 || MapIndex >= MapList.Length)
return; // Something is wrong...
// check for invalid vote from unpatch players
if (!IsValidVote(MapIndex, GameIndex))
return;
// Administrator Vote
if (bAdminForce && (PlayerController(Voter).PlayerReplicationInfo.bAdmin || PlayerController(Voter).PlayerReplicationInfo.bSilentAdmin))
{
TextMessage = lmsgAdminMapChange;
TextMessage = Repl(TextMessage, "%mapname%", MapList[MapIndex].MapName $ "(" $ GameConfig[GameIndex].Acronym $ ")");
Level.Game.Broadcast(self,TextMessage);
log("Admin has forced map switch to " $ MapList[MapIndex].MapName $ "(" $ GameConfig[GameIndex].Acronym $ ")",'MapVote');
CloseAllVoteWindows();
bLevelSwitchPending = true;
MapInfo = History.PlayMap(MapList[MapIndex].MapName);
ServerTravelString = SetupGameMap(MapList[MapIndex], GameIndex, MapInfo);
log("ServerTravelString = " $ ServerTravelString ,'MapVoteDebug');
// change the map
Level.ServerTravel(ServerTravelString, false);
settimer(1,true);
return;
}
if (PlayerController(Voter).PlayerReplicationInfo.bOnlySpectator)
{
// Spectators cant vote
PlayerController(Voter).ClientMessage(lmsgSpectatorsCantVote);
return;
}
// check for invalid map, invalid gametype, player isnt revoting same as previous vote, and map choosen isnt disabled
if (MapIndex < 0 || MapIndex >= MapCount || GameIndex >= GameConfig.Length || (MVRI[Index].GameVote == GameIndex && MVRI[Index].MapVote == MapIndex) ||
!MapList[MapIndex].bEnabled)
return;
log("___" $ Index $ " - " $ PlayerController(Voter).PlayerReplicationInfo.PlayerName $ " voted for " $ MapList[MapIndex].MapName $ "(" $ GameConfig[GameIndex].Acronym $ ")",'MapVote');
PrevMapVote = MVRI[Index].MapVote;
PrevGameVote = MVRI[Index].GameVote;
MVRI[Index].MapVote = MapIndex;
MVRI[Index].GameVote = GameIndex;
if (bAccumulationMode)
{
if (bScoreMode)
{
VoteCount = GetAccVote(PlayerController(Voter)) + int(GetPlayerScore(PlayerController(Voter)));
TextMessage = lmsgMapVotedForWithCount;
TextMessage = repl(TextMessage, "%playername%", PlayerController(Voter).PlayerReplicationInfo.PlayerName );
TextMessage = repl(TextMessage, "%votecount%", string(VoteCount) );
TextMessage = repl(TextMessage, "%mapname%", MapList[MapIndex].MapName $ "(" $ GameConfig[GameIndex].Acronym $ ")" );
Level.Game.Broadcast(self,TextMessage);
}
else
{
VoteCount = GetAccVote(PlayerController(Voter)) + 1;
TextMessage = lmsgMapVotedForWithCount;
TextMessage = repl(TextMessage, "%playername%", PlayerController(Voter).PlayerReplicationInfo.PlayerName );
TextMessage = repl(TextMessage, "%votecount%", string(VoteCount) );
TextMessage = repl(TextMessage, "%mapname%", MapList[MapIndex].MapName $ "(" $ GameConfig[GameIndex].Acronym $ ")" );
Level.Game.Broadcast(self,TextMessage);
}
}
else
{
if (bScoreMode)
{
VoteCount = int(GetPlayerScore(PlayerController(Voter)));
TextMessage = lmsgMapVotedForWithCount;
TextMessage = repl(TextMessage, "%playername%", PlayerController(Voter).PlayerReplicationInfo.PlayerName );
TextMessage = repl(TextMessage, "%votecount%", string(VoteCount) );
TextMessage = repl(TextMessage, "%mapname%", MapList[MapIndex].MapName $ "(" $ GameConfig[GameIndex].Acronym $ ")" );
Level.Game.Broadcast(self,TextMessage);
}
else
{
VoteCount = 1;
TextMessage = lmsgMapVotedFor;
TextMessage = repl(TextMessage, "%playername%", PlayerController(Voter).PlayerReplicationInfo.PlayerName );
TextMessage = repl(TextMessage, "%mapname%", MapList[MapIndex].MapName $ "(" $ GameConfig[GameIndex].Acronym $ ")" );
Level.Game.Broadcast(self,TextMessage);
}
}
UpdateVoteCount(MapIndex, GameIndex, VoteCount);
if (PrevMapVote > -1 && PrevGameVote > -1)
UpdateVoteCount(PrevMapVote, PrevGameVote, -MVRI[Index].VoteCount); // undo previous vote
MVRI[Index].VoteCount = VoteCount;
TallyVotes(false);
}

View file

@ -0,0 +1,13 @@
class stub_VotingReplicationInfo extends VotingReplicationInfo;
function SendMapVote(int MapIndex, int p_GameIndex)
{
local KFPlayerController kfpc;
kfpc = KFPlayerController(Owner);
DebugLog("MVRI.SendMapVote(" $ MapIndex $ ", " $ p_GameIndex $ ")");
if (kfpc != none && !kfpc.PlayerReplicationInfo.bOnlySpectator)
VH.SubmitMapVote(MapIndex,p_GameIndex,Owner);
}

View file

@ -0,0 +1,48 @@
class stub_Z_Bloat extends ZombieBloat;
function SpawnTwoShots()
{
local vector X,Y,Z, FireStart;
local rotator FireRotation;
// check this from the very start to prevent any log spam
if (Controller == none || IsInState('ZombieDying'))
return;
if (KFDoorMover(Controller.Target) != none)
{
Controller.Target.TakeDamage(22, Self, Location, vect(0,0,0), class'DamTypeVomit');
return;
}
GetAxes(Rotation,X,Y,Z);
FireStart = Location+(vect(30,0,64) >> Rotation)*DrawScale;
if (!SavedFireProperties.bInitialized)
{
SavedFireProperties.AmmoClass = class'SkaarjAmmo';
SavedFireProperties.ProjectileClass = class'KFBloatVomit';
SavedFireProperties.WarnTargetPct = 1;
SavedFireProperties.MaxRange = 500;
SavedFireProperties.bTossed = false;
SavedFireProperties.bTrySplash = false;
SavedFireProperties.bLeadTarget = true;
SavedFireProperties.bInstantHit = true;
SavedFireProperties.bInitialized = true;
}
// Turn off extra collision before spawning vomit, otherwise spawn fails
ToggleAuxCollision(false);
FireRotation = Controller.AdjustAim(SavedFireProperties,FireStart,600);
Spawn(class'KFBloatVomit',self,,FireStart,FireRotation);
FireStart -= (0.5*CollisionRadius*Y);
FireRotation.Yaw -= 1200;
spawn(class'KFBloatVomit',self,,FireStart, FireRotation);
FireStart += (CollisionRadius*Y);
FireRotation.Yaw += 2400;
spawn(class'KFBloatVomit', self,, FireStart, FireRotation);
// Turn extra collision back on
ToggleAuxCollision(true);
}

View file

@ -0,0 +1,182 @@
class stub_Z_Boss extends ZombieBoss;
//=============================================================================
// ammo class == none fix
//=============================================================================
state FireMissile
{
function AnimEnd( int Channel )
{
local vector Start;
local Rotator R;
Start = GetBoneCoords('tip').Origin;
// at least shoot at someone, not walls
if (Controller.Target == none)
Controller.Target = Controller.Enemy;
// fix MyAmmo none logs
if (!SavedFireProperties.bInitialized)
{
SavedFireProperties.AmmoClass = class'SkaarjAmmo';
SavedFireProperties.ProjectileClass = class'BossLAWProj';
SavedFireProperties.WarnTargetPct = 0.15;
SavedFireProperties.MaxRange = 10000;
SavedFireProperties.bTossed = false;
SavedFireProperties.bTrySplash = false;
SavedFireProperties.bLeadTarget = true;
SavedFireProperties.bInstantHit = true;
SavedFireProperties.bInitialized = true;
}
R = AdjustAim(SavedFireProperties,Start,100);
PlaySound(RocketFireSound,SLOT_Interact,2.0,,TransientSoundRadius,,false);
// added projectile owner
spawn(class'BossLAWProj',self,,Start,R);
bShotAnim = true;
Acceleration = vect(0,0,0);
SetAnimAction('FireEndMissile');
HandleWaitForAnim('FireEndMissile');
// Randomly send out a message about Patriarch shooting a rocket(5% chance)
if ( FRand() < 0.05 && Controller.Enemy != none && PlayerController(Controller.Enemy.Controller) != none )
{
PlayerController(Controller.Enemy.Controller).Speech('AUTO', 10, "");
}
GoToState('');
}
}
//=============================================================================
// ctrl == none fixes
//=============================================================================
function bool MeleeDamageTarget(int hitdamage, vector pushdir)
{
// added 'Controller != none' check
if (Controller != none && Controller.Target != none && Controller.Target.IsA('NetKActor'))
pushdir = Normal(Controller.Target.Location-Location)*100000;
return super(KFMonster).MeleeDamageTarget(hitdamage, pushdir);
}
// non-state one
function ClawDamageTarget()
{
local vector PushDir;
local name Anim;
local float frame,rate;
local float UsedMeleeDamage;
local bool bDamagedSomeone;
local KFHumanPawn P;
local Actor OldTarget;
// check this from the very start to prevent any log spam
if (Controller == none || IsInState('ZombieDying'))
return;
if (MeleeDamage > 1)
UsedMeleeDamage = (MeleeDamage - (MeleeDamage * 0.05)) + (MeleeDamage * (FRand() * 0.1));
else
UsedMeleeDamage = MeleeDamage;
GetAnimParams(1, Anim,frame,rate);
if (Controller != none && Controller.Target != none)
PushDir = (damageForce * Normal(Controller.Target.Location - Location));
else
PushDir = damageForce * vector(Rotation);
// merging 2 similar checks
// dick animation
if (Anim == 'MeleeImpale')
{
MeleeRange = ImpaleMeleeDamageRange;
bDamagedSomeone = MeleeDamageTarget(UsedMeleeDamage, PushDir);
}
// the hand animation
else
{
MeleeRange = ClawMeleeDamageRange;
OldTarget = Controller.Target;
foreach DynamicActors(class'KFHumanPawn', P)
{
if ( (P.Location - Location) dot PushDir > 0.0 ) // Added dot Product check in Balance Round 3
{
Controller.Target = P;
bDamagedSomeone = bDamagedSomeone || MeleeDamageTarget(UsedMeleeDamage, damageForce * Normal(P.Location - Location)); // Always pushing players away added in Balance Round 3
}
}
Controller.Target = OldTarget;
}
MeleeRange = default.MeleeRange;
if (bDamagedSomeone)
{
if (Anim == 'MeleeImpale')
PlaySound(MeleeImpaleHitSound, SLOT_Interact, 2.0);
else
PlaySound(MeleeAttackHitSound, SLOT_Interact, 2.0);
}
}
//=============================================================================
// headshot fix while he is machinegunning
//=============================================================================
state FireChaingun
{
function TakeDamage( int Damage, Pawn InstigatedBy, Vector Hitlocation, Vector Momentum, class<DamageType> damageType, optional int HitIndex)
{
local float EnemyDistSq, DamagerDistSq;
// changed vect(0,0,0) with Momentum
global.TakeDamage(Damage,instigatedBy,hitlocation,Momentum,damageType);
// if someone close up is shooting us, just charge them
if (InstigatedBy != none)
{
DamagerDistSq = VSizeSquared(Location - InstigatedBy.Location);
if ( (ChargeDamage > 200 && DamagerDistSq < (500 * 500)) || DamagerDistSq < (100 * 100) )
{
SetAnimAction('transition');
GoToState('Charging');
return;
}
}
if (Controller.Enemy != none && InstigatedBy != none && InstigatedBy != Controller.Enemy)
{
EnemyDistSq = VSizeSquared(Location - Controller.Enemy.Location);
DamagerDistSq = VSizeSquared(Location - InstigatedBy.Location);
}
if (InstigatedBy != none && (DamagerDistSq < EnemyDistSq || Controller.Enemy == none) )
{
MonsterController(Controller).ChangeEnemy(InstigatedBy,Controller.CanSee(InstigatedBy));
Controller.Target = InstigatedBy;
Controller.Focus = InstigatedBy;
if( DamagerDistSq < (500 * 500) )
{
SetAnimAction('transition');
GoToState('Charging');
}
}
}
}
defaultproperties{}

View file

@ -0,0 +1,74 @@
class stub_Z_Husk extends ZombieHusk_HALLOWEEN;
function SpawnTwoShots()
{
local vector X,Y,Z, FireStart;
local rotator FireRotation;
local KFMonsterController KFMonstControl;
if (Controller == none || IsInState('ZombieDying') || IsInState('GettingOutOfTheWayOfShot') || Physics == PHYS_Falling)
return;
if (KFDoorMover(Controller.Target) != none)
{
Controller.Target.TakeDamage(22, Self, Location,vect(0,0,0), Class'DamTypeVomit');
return;
}
GetAxes(Rotation,X,Y,Z);
FireStart = GetBoneCoords('Barrel').Origin;
// detect outer and change projectile class
// since we use this function for all husk classes
if (ClassIsChildOf(self.class, class'ZombieHusk_HALLOWEEN'))
HuskFireProjClass = class'KFChar.HuskFireProjectile_HALLOWEEN';
else
HuskFireProjClass = class'KFChar.HuskFireProjectile';
// if (self.class.name == 'ZombieHusk_HALLOWEEN')
// HuskFireProjClass = class'KFChar.HuskFireProjectile_HALLOWEEN';
// else
// HuskFireProjClass = class'KFChar.HuskFireProjectile';
if (!SavedFireProperties.bInitialized)
{
SavedFireProperties.AmmoClass = class'SkaarjAmmo';
SavedFireProperties.ProjectileClass = HuskFireProjClass;
SavedFireProperties.WarnTargetPct = 1;
SavedFireProperties.MaxRange = 65535;
SavedFireProperties.bTossed = false;
SavedFireProperties.bTrySplash = true;
SavedFireProperties.bLeadTarget = true;
SavedFireProperties.bInstantHit = false;
SavedFireProperties.bInitialized = true;
}
// Turn off extra collision before spawning projectile, otherwise spawn fails
ToggleAuxCollision(false);
FireRotation = Controller.AdjustAim(SavedFireProperties, FireStart, 600);
// do not move fleshpounds !
foreach DynamicActors(class'KFMonsterController', KFMonstControl)
{
// I gotta love this one, Jaby
// ignore zeds that the husk can't see...
if (KFMonstControl== none || !LineOfSightTo(KFMonstControl))
continue;
if (KFMonstControl != Controller && !ClassIsChildOf(KFMonstControl, class'FleshpoundZombieController'))
{
if (PointDistToLine(KFMonstControl.Pawn.Location, vector(FireRotation), FireStart) < 75 )
{
KFMonstControl.GetOutOfTheWayOfShot(vector(FireRotation),FireStart);
}
}
}
// added projectile owner...
Spawn(HuskFireProjClass,self,,FireStart,FireRotation);
// Turn extra collision back on
ToggleAuxCollision(true);
}

View file

@ -0,0 +1,142 @@
class stub_Z_Scrake extends ZombieScrake;
var ZombieScrake sc;
// vector HeadOffset = vect(0,0,0)
// KFMonster = M
// Poosh (c) coz i was lazy to do lame hack
function bool IsHeadShot(vector HitLoc, vector ray, float AdditionalScale)
{
local coords C;
// we are not gonna use some local vars, sooo... lets hope it wont crash
local vector HeadLoc, diff; // B, M, not using these two
// local float t, DotMM, Distance;
local int look;
local bool bUseAltHeadShotLocation;
local bool bWasAnimating;
if (HeadBone == '')
return false;
if (Level.NetMode == NM_DedicatedServer && !bShotAnim) // addition!
{
// If we are a dedicated server estimate what animation is most likely playing on the client
switch (Physics)
{
case PHYS_Walking:
bWasAnimating = IsAnimating(0) || IsAnimating(1);
if (!bWasAnimating)
{
if (bIsCrouched)
{
PlayAnim(IdleCrouchAnim, 1.0, 0.0);
}
else
{
bUseAltHeadShotLocation=true;
}
}
if (bDoTorsoTwist && !bUseAltHeadShotLocation)
{
SmoothViewYaw = Rotation.Yaw;
SmoothViewPitch = ViewPitch;
look = (256 * ViewPitch) & 65535;
if (look > 32768)
look -= 65536;
SetTwistLook(0, look);
}
break;
case PHYS_Falling:
case PHYS_Flying:
PlayAnim(AirAnims[0], 1.0, 0.0);
break;
case PHYS_Swimming:
PlayAnim(SwimAnims[0], 1.0, 0.0);
break;
}
if (!bWasAnimating && !bUseAltHeadShotLocation)
{
SetAnimFrame(0.5);
}
}
if (bUseAltHeadShotLocation)
{
HeadLoc = Location + (OnlineHeadshotOffset >> Rotation);
AdditionalScale *= OnlineHeadshotScale;
}
else
{
diff = vect(0,0,0);
C = GetBoneCoords(HeadBone);
HeadLoc = C.Origin + (HeadHeight * HeadScale * AdditionalScale * C.XAxis) + diff.X * C.XAxis + diff.Y * C.YAxis + diff.Z * C.ZAxis;
}
return class'stub_Z_Scrake'.static.TestHitboxSphere(HitLoc, Ray, HeadLoc, HeadRadius * HeadScale * AdditionalScale);
}
// Poosh (c) coz i was lazy to do lame hack
static final function bool TestHitboxSphere(vector HitLoc, vector Ray, vector SphereLoc, float SphereRadius)
{
local vector HitToSphere; // vector from HitLoc to SphereLoc
local vector P;
SphereRadius *= SphereRadius; // square it to avoid doing sqrt()
HitToSphere = SphereLoc - HitLoc;
if (VSizeSquared(HitToSphere) < SphereRadius)
{
// HitLoc is already inside the sphere - no projection needed
return true;
}
// HitToSphere dot Ray = cos(A) * VSize(HitToSphere) = VSize(P - HitLoc)
P = HitLoc + Ray * (HitToSphere dot Ray);
return VSizeSquared(P - SphereLoc) < SphereRadius;
}
// Getter for the Original groundspeed of the zed (adjusted for difficulty, etc)
simulated function float GetOriginalGroundSpeed()
{
if (owner != none && owner.class.name == 'SawZombieController')
{
if (IsInState('RunningState'))
return OriginalGroundSpeed *= OriginalGroundSpeed;
else if (IsInState('SawingLoop'))
return OriginalGroundSpeed *= AttackChargeRate;
else if (IsInState(''))
return OriginalGroundSpeed;
}
if( bZedUnderControl )
{
return OriginalGroundSpeed * 1.25;
}
else
{
return OriginalGroundSpeed;
}
}
function EndState()
{
log("FUCK YEA!");
if( !bZapped )
{
SetGroundSpeed(GetOriginalGroundSpeed());
}
bCharging = False;
if( Level.NetMode!=NM_DedicatedServer )
PostNetReceive();
}

View file

@ -0,0 +1,11 @@
class stub_Z_Scrake_Ctrl extends SawZombieController;
function EndState()
{
if (Pawn != None)
{
Pawn.AccelRate = Pawn.Default.AccelRate;
Pawn.GroundSpeed = ZombieScrake(Pawn).GetOriginalGroundSpeed();
}
}

View file

@ -0,0 +1,67 @@
class stub_Z_Siren extends ZombieSiren;
// if decapped no scream
simulated function SpawnTwoShots()
{
// added bDecapitated check
// headless chickens can't cry
if (bZapped || bDecapitated)
return;
DoShakeEffect();
if (Level.NetMode != NM_Client)
{
if (Controller != none && KFDoorMover(Controller.Target) != none)
Controller.Target.TakeDamage(ScreamDamage*0.6,Self,Location,vect(0,0,0),ScreamDamageType);
else
HurtRadius(ScreamDamage ,ScreamRadius, ScreamDamageType, ScreamForce, Location);
}
}
simulated function HurtRadius( float DamageAmount, float DamageRadius, class<DamageType> DamageType, float Momentum, vector HitLocation )
{
local actor Victims;
local float damageScale, dist;
local vector dir;
local float UsedDamageAmount;
if (bHurtEntry)
return;
bHurtEntry = true;
foreach VisibleCollidingActors(class'Actor', Victims, DamageRadius, HitLocation)
{
// don't let blast damage affect fluid - VisibleCollisingActors doesn't really work for them - jag
// Or Karma actors in this case. Self inflicted Death due to flying chairs is uncool for a zombie of your stature.
if ( (Victims != self) && !Victims.IsA('FluidSurfaceInfo') && !Victims.IsA('KFMonster') && !Victims.IsA('ExtendedZCollision') )
{
Momentum = ScreamForce; // bugfix, when pull wasn't applied always -- PooSH
dir = Victims.Location - HitLocation;
dist = FMax(1,VSize(dir));
dir = dir/dist;
damageScale = 1 - FMax(0,(dist - Victims.CollisionRadius)/DamageRadius);
if (!Victims.IsA('KFHumanPawn')) // If it aint human, don't pull the vortex crap on it.
Momentum = 0;
if (Victims.IsA('KFGlassMover')) // Hack for shattering in interesting ways.
{
UsedDamageAmount = 100000; // Siren always shatters glass
}
else
{
UsedDamageAmount = DamageAmount;
}
// fixed instigator not set to self!
Victims.TakeDamage(damageScale * UsedDamageAmount, self, Victims.Location - 0.5 * (Victims.CollisionHeight + Victims.CollisionRadius) * dir,(damageScale * Momentum * dir),DamageType);
if (Instigator != None && Vehicle(Victims) != None && Vehicle(Victims).Health > 0)
Vehicle(Victims).DriverRadiusDamage(UsedDamageAmount, DamageRadius, Instigator.Controller, DamageType, Momentum, HitLocation);
}
}
bHurtEntry = false;
}

View file

@ -0,0 +1,113 @@
[KFPatcher.Mut]
# ======================================= KFGameType =======================================
List=(Info="move after game ends, prints Pat health",Replace="KFMod.KFGameType.CheckEndGame",With="stub_GT.CheckEndGame")
List=(Info="Zed Time: disable gametype tick",Replace="KFMod.KFGameType.Tick",With="stub_GT.Tick")
List=(Info="Zed Time: main control function",Replace="KFMod.KFGameType.DramaticEvent",With="stub_GT.DramaticEvent")
List=(Info="Zed Time: altered so it won't it",Replace="KFMod.KFGameType.DoBossDeath",With="stub_GT.DoBossDeath")
List=(Info="no more late joiner text shit",Replace="KFMod.KFGameType.PreLogin",With="stub_GT.PreLogin")
List=(Info="fix killzeds log spam",Replace="KFMod.KFGameType.KillZeds",With="stub_GT.KillZeds")
List=(Info="fix gamelength from cmdline, log monstercollection",Replace="KFMod.KFGameType.InitGame",With="stub_GT.InitGame")
List=(Info="camera fix after pat kills",Replace="KFMod.KFGameType.MatchInProgress.Timer",With="stub_GT.MatchInProgress.nTimer")
List=(Info="no more wave switch lags",Replace="KFMod.KFGameType.MatchInProgress.CloseShops",With="stub_GT.MatchInProgress.CloseShops")
List=(Info="all traders feature + broadcast",Replace="KFMod.KFGameType.MatchInProgress.OpenShops",With="stub_GT.MatchInProgress.OpenShops")
List=(Info="disable greylisting",Replace="KFMod.KFGameType.UpdateGameLength",With="stub_GT.UpdateGameLength")
List=(Info="disable greylisting",Replace="KFMod.KFGameType.AddNamedBot",With="stub_GT.AddNamedBot")
List=(Info="disable greylisting",Replace="KFMod.KFGameType.AddBots",With="stub_GT.AddBots")
List=(Info="disable greylisting",Replace="KFMod.KFGameType.PostLogin",With="stub_GT.PostLogin")
# ======================================= GameRule =======================================
List=(Info="no more game end when players leave the lobby",Replace="Engine.GameRules.CheckEndGame",With="stub_Rule.CheckEndGame")
# ======================================= Pawns =======================================
# List=(Info="KFHumanPawn: remove perk specific loadouts",Replace="KFMod.KFHumanPawn.AddDefaultInventory",With="stub_Pawn.AddDefaultInventory")
List=(Info="KFPawn: allows players to shop whenever",Replace="KFMod.KFPawn.CanBuyNow",With="stub_Pawn.CanBuyNow")
List=(Info="KFPawn: dosh and PRI none fixes",Replace="KFMod.KFPawn.TossCash",With="stub_Pawn.TossCash")
List=(Info="KFPawn: Soundgroup none fix",Replace="KFMod.KFPawn.GetSound",With="stub_Pawn.GetSound")
List=(Info="xPawn: weapon == none fix in serverchangedweapon",Replace="xGame.xPawn.ServerChangedWeapon",With="stub_Pawn.ServerChangedWeapon")
# ======================================= Controllers =======================================
List=(Info="no more 'you will become %perk' spam, unlimited perk swap",Replace="KFMod.KFPlayerController.SelectVeterancy",With="stub_PC.SelectVeterancy")
# List=(Info="voice message fix",Replace="KFMod.KFPlayerController.SendVoiceMessage",With="stub_PC.SendVoiceMessage")
List=(Info="fixed spectator join message",Replace="KFMod.KFPlayerController.JoinedAsSpectatorOnly",With="stub_PC.JoinedAsSpectatorOnly")
List=(Info="fixed spectator join message",Replace="KFMod.KFPlayerController.BecomeSpectator",With="stub_PC.BecomeSpectator")
List=(Info="0 delay suicide",Replace="Engine.PlayerController.Suicide",With="stub_PC.Suicide")
List=(Info="voice message fix",Replace="Engine.PlayerController.AllowVoiceMessage",With="stub_PC.AllowVoiceMessage")
# ======================================= Weapons =======================================
# List=(Info="fix for nade exploits",Replace="KFMod.FragFire.DoFireEffect",With="stub_FragFire.DoFireEffect")
List=(Info="fix sounds array errors",Replace="KFMod.Nade.Explode",With="stub_Nade.Explode")
List=(Info="fix accessed none Inventory for destroyed weapon pickups",Replace="KFMod.KFWeaponPickup.Destroyed",With="stub_KFWeaponPickup.Destroyed")
List=(Info="fix accessed none IgnoreActors ! and replace all copy paste code with 1",Replace="KFMod.MK23Fire.DoTrace",With="stub_DualiesFire.DoTrace")
List=(Info="fix accessed none IgnoreActors ! and replace all copy paste code with 1",Replace="KFMod.DualMK23Fire.DoTrace",With="stub_DualiesFire.DoTrace")
List=(Info="fix accessed none IgnoreActors ! and replace all copy paste code with 1",Replace="KFMod.DeagleFire.DoTrace",With="stub_DualiesFire.DoTrace")
List=(Info="fix accessed none IgnoreActors ! and replace all copy paste code with 1",Replace="KFMod.DualDeagleFire.DoTrace",With="stub_DualiesFire.DoTrace")
List=(Info="fix accessed none IgnoreActors ! and replace all copy paste code with 1",Replace="KFMod.Magnum44Fire.DoTrace",With="stub_DualiesFire.DoTrace")
List=(Info="fix accessed none IgnoreActors ! and replace all copy paste code with 1",Replace="KFMod.Dual44MagnumFire.DoTrace",With="stub_DualiesFire.DoTrace")
List=(Info="fix accessed none from DropFrom and replace all copy paste code with 1",Replace="KFMod.DualDeagle.DropFrom",With="stub_DualPistol.DropFrom")
List=(Info="fix uber damage exlpoit",Replace="KFMod.PipeBombProjectile.TakeDamage",With="stub_Pipe.TakeDamage")
List=(Info="no detonation on dead players, npc",Replace="KFMod.PipeBombProjectile.Timer",With="stub_Pipe.Timer")
List=(Info="fix sounds array errors",Replace="KFMod.PipeBombProjectile.Explode",With="stub_Pipe.Explode")
List=(Info="Pipe: Assets",Replace="KFMod.PipeBombProjectile.PreloadAssets",With="stub_Pipe.PreloadAssets")
List=(Info="Pipe: Assets",Replace="KFMod.PipeBombProjectile.UnloadAssets",With="stub_Pipe.UnloadAssets")
List=(Info="Syringe: 50 heals when last alive player",Replace="KFMod.Syringe.HackClientStartFire",With="stub_Syringe.HackClientStartFire")
List=(Info="LAWProj: RepInfo none fixes",Replace="KFMod.LAWProj.ProcessTouch",With="stub_LAWProj.ProcessTouch")
List=(Info="LAWProj: team detonation fixes",Replace="KFMod.LAWProj.TakeDamage",With="stub_LAWProj.TakeDamage")
List=(Info="M79GrenadeProjectile: team detonation fixes",Replace="KFMod.M79GrenadeProjectile.TakeDamage",With="stub_LAWProj.TakeDamage")
List=(Info="allows players to use double variants of weapons",Replace="KFMod.KFWeapon.HandlePickupQuery",With="stub_DualPistol.HandlePickupQuery")
List=(Info="allows players to use double variants of weapons",Replace="KFMod.KFPlayerController.IsInInventory",With="stub_PC.IsInInventory")
# ======================================= Zeds =======================================
List=(Info="Husks: fix none calls for toggleaux function",Replace="KFChar.ZombieHusk_HALLOWEEN.SpawnTwoShots",With="stub_Z_Husk.SpawnTwoShots")
List=(Info="Husks: fix none calls for toggleaux function",Replace="KFChar.ZombieHusk.SpawnTwoShots",With="stub_Z_Husk.SpawnTwoShots")
List=(Info="Sirens: fixed instigator call in takedamage and no more damage while dead / decapped",Replace="KFChar.ZombieSiren.SpawnTwoShots",With="stub_Z_Siren.SpawnTwoShots")
List=(Info="Sirens: fixed instigator call in takedamage and no more damage while dead / decapped",Replace="KFChar.ZombieSiren.HurtRadius",With="stub_Z_Siren.HurtRadius")
List=(Info="Sirens: fixed instigator call in takedamage and no more damage while dead / decapped",Replace="KFMod.KFMonster.TakeDamage",With="stub_Monster.TakeDamage")
List=(Info="Sirens: fixed instigator call in takedamage and no more damage while dead / decapped",Replace="KFChar.ZombieBloat.SpawnTwoShots",With="stub_Z_Bloat.SpawnTwoShots")
List=(Info="KFMonster: controller == none fix when you kill zeds before they fall into stun",Replace="KFMod.KFMonster.FlipOver",With="stub_Monster.FlipOver")
List=(Info="FP: do not spin",Replace="KFMod.FleshPoundAvoidArea.Touch",With="stub_FPAvoidArea.Touch")
List=(Info="FP: do not spin",Replace="KFMod.FleshPoundAvoidArea.RelevantTo",With="stub_FPAvoidArea.RelevantTo")
List=(Info="Boss: no burn skin",Replace="KFChar.ZombieBoss.FireMissile.AnimEnd",With="stub_Z_Boss.FireMissile.AnimEnd")
List=(Info="Boss: part 1 controller none fixes",Replace="KFChar.ZombieBoss.MeleeDamageTarget",With="stub_Z_Boss.MeleeDamageTarget")
List=(Info="Boss: part 2 controller none fixes",Replace="KFChar.ZombieBoss.ClawDamageTarget",With="stub_Z_Boss.ClawDamageTarget")
List=(Info="Boss: headshot fix on his machinegun state",Replace="KFChar.ZombieBoss.FireChaingun.TakeDamage",With="stub_Z_Boss.FireChaingun.TakeDamage")
List=(Info="SCRAKE ANIM FIX TEST!!!",Replace="KFMod.KFMonster.IsHeadShot",With="stub_Z_Scrake.IsHeadShot")
List=(Info="KFMonster: zed corpse collision fix #1",Replace="KFMod.KFMonster.PlayDying",With="stub_Monster.PlayDying")
List=(Info="KFMonster: zed corpse collision fix #2",Replace="KFMod.KFMonster.ZombieDying.BeginState",With="stub_Monster.ZombieDying.BeginState")
List=(Info="KFMonster: limit attacks per time",Replace="KFMod.KFMonster.MeleeDamageTarget",With="stub_Monster.MeleeDamageTarget")
#======================================= Shop Volume =======================================
List=(Info="ShopVolume: MyTrader: fix accessed none",Replace="KFMod.ShopVolume.Touch",With="stub_ShopVolume.Touch")
List=(Info="ShopVolume: MyTrader: fix accessed none",Replace="KFMod.ShopVolume.UnTouch",With="stub_ShopVolume.UnTouch")
List=(Info="ShopVolume: MyTrader: fix accessed none",Replace="KFMod.ShopVolume.UsedBy",With="stub_ShopVolume.UsedBy")
List=(Info="ShopVolume: fix bound check for Touching",Replace="KFMod.ShopVolume.BootPlayers",With="stub_ShopVolume.BootPlayers")
#======================================= Doors =======================================
List=(Info="forces zeds to actually ignore doors instead of just standing at them if bZombiesIgnore is true",Replace="KFMod.KFDoorMover.Tick",With="stub_Door.Tick")
#======================================= Voting Handler =======================================
List=(Info="KFMapVoteV2: prevents spectators from fucking voting!!!",Replace="KFMapVoteV2.KFVotingHandler.TallyVotes",With="stub_VotingHandler.TallyVotes")
List=(Info="KFMapVoteV2: prevents spectators from fucking voting!!!",Replace="KFMapVoteV2.KFVotingHandler.SubmitMapVote",With="stub_VotingHandler.SubmitMapVote")
#List=(Info="CSD replacement",Replace="Engine.GameInfo.GetServerDetails",With="stub_GT.GetServerDetails")
#List=(Info="CSD replacement",Replace="Engine.GameInfo.GetServerPlayers",With="stubGT.GetServerPlayers")
#List=(Replace="KFMod.KFMonster.GetOriginalGroundSpeed",With="stub_ZScrake.GetOriginalGroundSpeed")
#List=(Replace="KFChar.ZombieScrake.RunningState.EndState",With="stub_ZScrake.EndState")
#List=(Replace="KFChar.SawZombieController.DoorBashing.EndState",With="stub_ZScrakeCtrl.EndState")
#List=(Replace="KFMod.ShotgunBullet.ProcessTouch",With="stub_PShotgun.ProcessTouch")
#List=(Replace="KFChar.ZombieScrake.SawingLoop.GetOriginalGroundSpeed",With="stub_FPAvoidArea.GetSpeedSawing")
[KFPatcher.o_Settings]
sAlive="^y[#h hp] ^y[#k kills]^w"
sDead="^o[Dead] ^y[#k kills]^w"
sSpectator="^o[Spectator]"
sReady="^g[Ready]"
sNotReady="^g[Not Ready]"
sAwaiting="^g[Awaiting]"
sTagHP="#h"
sTagKills="#k"
fRefreshTime=5.0
bShowPerk=True
bAllowZedTime=False
bAllTradersOpen=True
bAllTradersMessage="^wAll traders are ^ropen^w!"
bBuyEverywhere=True

View file

@ -0,0 +1,7 @@
<html>
<head><title>Index of /kf_sources/KFPatcher/Configs/</title></head>
<body>
<h1>Index of /kf_sources/KFPatcher/Configs/</h1><hr><pre><a href="../">../</a>
<a href="KFPatcher.ini">KFPatcher.ini</a> 28-Jun-2021 13:12 11165
</pre><hr></body>
</html>

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,83 @@
> [go back to README](../ReadMe.md)
# Implemented Features and Fixes
## KFGameType
- Print **Pat** health after a team wipe.
- Allow players move after team wipe / win.
- Zed time switch. Much more efficent one than you can imagine.
- No more latejoiner text.
- Fixed `KillZeds` command. Now it wont break zed spawns and spam in logs.
- You can set `GameLength` from cmdline.
- `Monstercollection` logs itself. So you can easily know what seasonal zeds are on.
- Player cameras wont break after you kill the pat.
- Pre-wave garbage collection is disabled (no lags!). It was meaningless anyways.
- All traders feature + fancy broadcast.
- Disabled 4 idiotic functions in `KFGameType` that were causing greylist. Blame my ocd.
## GameRule
- Game doesnt end when players / spectators leave lobby.
## Pawns
- You can shop at ANY spot. Pst, don't ask why.
- Dosh fix.
- `SoundGroup == none` fix.
- `weapon == none` fix for xPawn.serverchangedweapon().
## Controllers
- No more 'you will become %perk' spam in players console.
- Unlimited perk switches during trader time.
- Spectator messages are now fixed, visible and fancy.
- 0 delay suicide.
- Voice messages doesn't break during zed time, admins can spam to death. And usual spammer players will be punished for ~2-12secs of SILENCE.
## Weapons
- Dual_pistol_fire: fixed `accessed none IgnoreActors`.
- Dual_pistol: fixed `accessed none DropFrom`.
- KFWeaponPickup: fixed `accessed none Inventory` for destroyed weapon pickups.
- Nade: sounds log spam fix.
- Pipes: no more uber damage glitch.
- Pipes: no more detonation on NPC's and dead players.
- Pipes: sounds log spam fix.
- Pipes: assest now are loaded properly without trader buy.
- Syringe: 50 heals when last alive player.
- LAWProj: `RepInfo none` fixes.
- `M79GrenadeProjectile` and `LAWProj` now can't be detonated by teammates. No more fun.
- Allow players to use double variants of skins.
## Zeds
- Husks: doesnt spam `toggleaux ctrl none` anymore.
- Husks: do NOT move zeds that they can NOT see physically.
- Husks: do NOT move FP's. Finally!
- Husks: do NOT start to shoot when other Husk moves him with projectile.
- Husks: do NOT start to shoot while in falling `Physics` mode.
- Sirens: do NOT damage players with no head / after death.
- Sirens: shit tons of `takedamage instigator none` log spam fixes.
- FP: now they do not spin. At all.
- Boss: he doesn't burn at all. He is chOnky.
- Boss: `controller == none` fixes.
- Boss: now you can actually headshot him during his machine gun animation.
- KFMonster: new headshot calculation method for tests.
- KFMonster: `controller == none` fix when you kill zeds before they fall into stun.
- KFMonster: zeds disable their collisions after death. Now steves and other zeds wont block your movement after you killed them.
- KFMonster: added 0.3 secs delay before any melee attack. Hopefully it will fix FP one shot kills and steves attack spam during jumps.
## Shop Volume
- Fixed shit tons of `MyTrader: fix accessed none` errors.
- Fixed player teleportation functions. Now log is completely clean.
## Doors
- Forces zeds to actually ignore `DoorMoover` pathnodes. Thanks TWI!
## Voting Handler
- Spectators can NOT vote.
- Added a message to warn spectators that they suck.

View file

@ -0,0 +1,31 @@
> [go back to README](../ReadMe.md)
# Intro
## Priority
- dosh sound spam
- scrake head fix
- fix fnfal sounds
- husk animations
## Pat
- [ ] Fix instand rockets at your face and other NOT smooth animations-actions.
## GamePlay
- [ ] Workaround for FPP gamelength (stubGT - initgame).
- [ ] Workaround for fp spin vanilla vs fpp gametype. Or add a cmd / bool to control it.
- [ ] add slomo bool - pat only, player death, etc
- [ ] Fix and poilsh player info.
- [ ] Add configurable server info.
- [ ] Cut very long messaged into several ones.
- [ ] DropFrom() on dual pistols is weirdly fucked. Find out why it spams in log first time you drop a dual pistol.
- [ ] Find a place for proper Garbage Collection. Atm its just shut down :V
- [ ] Fix the whole projectile class and end teamkilling bullshit.
- [ ] Polish player info.
- [ ] Remake player counting functions for native faked feature.
- [ ] disable some weapons for some waves
- [ ] don't let husks move while shooting
- [ ] don't let husks move each other with projectiles

View file

@ -0,0 +1,10 @@
<html>
<head><title>Index of /kf_sources/KFPatcher/Docs/</title></head>
<body>
<h1>Index of /kf_sources/KFPatcher/Docs/</h1><hr><pre><a href="../">../</a>
<a href="Complete%20Function%20List%20%2B%20Flags.md">Complete Function List + Flags.md</a> 28-Jun-2021 13:12 590511
<a href="Complete%20Function%20List.md">Complete Function List.md</a> 28-Jun-2021 13:12 452266
<a href="Feature%20List.md">Feature List.md</a> 28-Jun-2021 13:12 3348
<a href="To-Do.md">To-Do.md</a> 28-Jun-2021 13:12 1070
</pre><hr></body>
</html>

View file

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View file

@ -0,0 +1,29 @@
# KF Patcher Project
## Goal
This is an attempt to fix most game breaking bugs and log spam in **Killing Floor 1**. And some additional features to make some utility mutators 'OBSOLOTE' :innocent:
You can check the [To-Do](Docs/To-Do.md) and [Feature List](Docs/Feature&#32;List.md) for more details.
## Internals
At the moment of 29.07.2020 consists of 1 package and 1 **config** file that allows you to choose what fixes to enable.
Package contains:
- A simple *mutator* which uses [**CoreAPI**] functionality to hooks functions.
- *stub*'s that extend the very most child class of target. E.G. *stubPC* contains fixes for controllers and it extends *KFPlayerController_Story*.
## Dependancies
At the moment of 29.07.2020 only from [**CoreAPI**].
Use [KFCmdlet and it's batches](https://github.com/InsultingPros/KFCmdlet) for easy compilation.
```cpp
EditPackages=COREAPI
EditPackages=KFPatcher
```
[**CoreAPI**]: https://github.com/InsultingPros/CoreAPI 'jaja'

View file

@ -0,0 +1,11 @@
<html>
<head><title>Index of /kf_sources/KFPatcher/</title></head>
<body>
<h1>Index of /kf_sources/KFPatcher/</h1><hr><pre><a href="../">../</a>
<a href="Classes/">Classes/</a> 29-Jun-2025 19:43 -
<a href="Configs/">Configs/</a> 29-Jun-2025 19:43 -
<a href="Docs/">Docs/</a> 29-Jun-2025 19:43 -
<a href="LICENSE">LICENSE</a> 28-Jun-2021 13:12 35823
<a href="ReadMe.md">ReadMe.md</a> 28-Jun-2021 13:12 1005
</pre><hr></body>
</html>