First version

This commit is contained in:
2021-01-31 13:13:35 +03:00
parent 1697284b69
commit 67b37fab6c
12 changed files with 354 additions and 1 deletions

4
TAWOD/Classes/TAWOD.upkg Normal file
View File

@ -0,0 +1,4 @@
[Flags]
AllowDownload=True
ClientOptional=False
ServerSideOnly=False

33
TAWOD/Classes/TAWODMut.uc Normal file
View File

@ -0,0 +1,33 @@
Class TAWODMut extends KFMutator;
simulated event PostBeginPlay()
{
super.PostBeginPlay();
if (WorldInfo.Game.BaseMutator == None)
WorldInfo.Game.BaseMutator = Self;
else
WorldInfo.Game.BaseMutator.AddMutator(Self);
if (bDeleteMe)
return;
WorldInfo.Game.DefaultPawnClass = class'TAWODPawn_Human';
`Log("[TAWOD] Loaded mutator.");
}
function AddMutator(Mutator Mut)
{
if (Mut == Self)
return;
if (Mut.Class == Class)
Mut.Destroy();
else
Super.AddMutator(Mut);
}
defaultproperties
{
}

View File

@ -0,0 +1,28 @@
class TAWODPawn_Human extends KFPawn_Human;
function ThrowActiveWeapon( optional bool bDestroyWeap )
{
local KFWeapon TempWeapon;
if( Role < ROLE_Authority )
{
return;
}
if (Health <= 0)
{
if (InvManager != none)
foreach InvManager.InventoryActors(class'KFWeapon', TempWeapon)
if (TempWeapon.bDropOnDeath && TempWeapon.CanThrow())
if (TempWeapon != none)
TossInventory(TempWeapon);
}
else
{
super.ThrowActiveWeapon( bDestroyWeap );
}
}
defaultproperties
{
}