fix nade throwing

This commit is contained in:
Shtoyan 2022-01-23 17:48:15 +04:00
parent 8847ec0449
commit aba3d5ec4d

View File

@ -555,16 +555,21 @@ simulated function CookGrenade(){
niceWeap.ClientGrenadeState = GN_TempDown;
niceWeap.PutDown();
}
simulated function ThrowGrenade(){
simulated function ThrowGrenade()
{
local NiceWeapon niceWeap;
niceWeap = NiceWeapon(Weapon);
if(niceWeap != none)
niceWeap.ClientForceInterruptReload(CANCEL_NADE);
if(bThrowingNade || SecondaryItem != none)
return;
if( niceWeap == none
|| (niceWeap.bIsReloading && !niceWeap.InterruptReload()))
return;
if(niceWeap == none || (niceWeap.bIsReloading && !niceWeap.InterruptReload()))
{
super.ThrowGrenade();
return;
}
if(playerGrenade == none)
playerGrenade = FindPlayerGrenade();
if(playerGrenade != none && playerGrenade.HasAmmo()){