feat: integrate TAWOD

This commit is contained in:
GenZmeY 2021-04-01 00:29:35 +03:00
parent 20153643ef
commit c46942a87b

View File

@ -118,6 +118,21 @@ function bool CheckRelevance(Actor Other)
return SuperRelevant;
}
function bool PreventDeath(Pawn Killed, Controller Killer, class<DamageType> 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
{
SteamIDLen=17