fix bug when not using holo

This commit is contained in:
Nathan TIEN YOU
2022-02-03 21:57:05 +01:00
parent a78f459aa2
commit a41cd3fafc
2 changed files with 22 additions and 17 deletions
@@ -376,9 +376,11 @@ bool function PlayerCanUseDecoy( entity ownerPlayer ) //For holopilot and HoloPi
return false
}
if(ownerPlayer.GetOffhandWeapon(1).GetWeaponPrimaryClipCount()<100)
if(ownerPlayer.GetOffhandWeapon(1).GetWeaponClassName() == "mp_ability_holopilot" && ownerPlayer.GetOffhandWeapon(1).GetWeaponPrimaryClipCount()<100)
return false
if(ownerPlayer.GetOffhandWeapon(1).GetWeaponClassName() == "mp_ability_holopilot" && ownerPlayer.GetOffhandWeapon(1).GetWeaponPrimaryClipCount()<200 && !(ownerPlayer in playerDecoyList))
return false
//Do we need to check isPhaseShifted here? Re-examine when it's possible to get both Phase and Decoy (maybe through burn cards?)
return true