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,15 +1319,15 @@ 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
{ {
super.ThrowActiveWeapon(bDestroyWeap); super.ThrowActiveWeapon(bDestroyWeap);
} }
} }
defaultproperties defaultproperties
{ {
KnockbackResist=1 KnockbackResist=1