fix: wrong check order

This commit is contained in:
GenZmeY 2021-02-14 06:05:12 +03:00
parent 1edd965dbe
commit 305a1c6fd6

View File

@ -1319,8 +1319,7 @@ function ThrowActiveWeapon(optional bool bDestroyWeap)
{ {
if (InvManager != none) if (InvManager != none)
foreach InvManager.InventoryActors(class'KFWeapon', TempWeapon) foreach InvManager.InventoryActors(class'KFWeapon', TempWeapon)
if (TempWeapon.bDropOnDeath && TempWeapon.CanThrow()) if (TempWeapon != none && TempWeapon.bDropOnDeath && TempWeapon.CanThrow())
if (TempWeapon != none)
TossInventory(TempWeapon); TossInventory(TempWeapon);
} }
else else
@ -1328,6 +1327,7 @@ function ThrowActiveWeapon(optional bool bDestroyWeap)
super.ThrowActiveWeapon(bDestroyWeap); super.ThrowActiveWeapon(bDestroyWeap);
} }
} }
defaultproperties defaultproperties
{ {
KnockbackResist=1 KnockbackResist=1