First version
This commit is contained in:
4
TAWOD/Classes/TAWOD.upkg
Normal file
4
TAWOD/Classes/TAWOD.upkg
Normal file
@ -0,0 +1,4 @@
|
||||
[Flags]
|
||||
AllowDownload=True
|
||||
ClientOptional=False
|
||||
ServerSideOnly=False
|
33
TAWOD/Classes/TAWODMut.uc
Normal file
33
TAWOD/Classes/TAWODMut.uc
Normal 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
|
||||
{
|
||||
}
|
28
TAWOD/Classes/TAWODPawn_Human.uc
Normal file
28
TAWOD/Classes/TAWODPawn_Human.uc
Normal 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
|
||||
{
|
||||
}
|
Reference in New Issue
Block a user