diff --git a/TAWOD/Classes/TAWODMut.uc b/TAWOD/Classes/TAWODMut.uc index 13ffade..d50d0d0 100644 --- a/TAWOD/Classes/TAWODMut.uc +++ b/TAWOD/Classes/TAWODMut.uc @@ -12,8 +12,6 @@ simulated event PostBeginPlay() if (bDeleteMe) return; - WorldInfo.Game.DefaultPawnClass = class'TAWODPawn_Human'; - `Log("[TAWOD] Loaded mutator."); } @@ -28,6 +26,21 @@ function AddMutator(Mutator Mut) Super.AddMutator(Mut); } +function bool PreventDeath(Pawn Killed, Controller Killer, class damageType, vector HitLocation) +{ + local KFWeapon TempWeapon; + local KFPawn_Human KFP; + + KFP = KFPawn_Human(Killed); + + if (Role >= ROLE_Authority && KFP != None && KFP.InvManager != none) + foreach KFP.InvManager.InventoryActors(class'KFWeapon', TempWeapon) + if (TempWeapon != none && TempWeapon.bDropOnDeath && TempWeapon.CanThrow()) + KFP.TossInventory(TempWeapon); + + return Super.PreventDeath(Killed, Killer, damageType, HitLocation); +} + defaultproperties { } diff --git a/TAWOD/Classes/TAWODPawn_Human.uc b/TAWOD/Classes/TAWODPawn_Human.uc deleted file mode 100644 index aff78b4..0000000 --- a/TAWOD/Classes/TAWODPawn_Human.uc +++ /dev/null @@ -1,28 +0,0 @@ -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 -{ -}