Merge pull request #2 from x3Karma/patch-1
Fix crash when offhand is empty
This commit is contained in:
@@ -25,7 +25,7 @@ int recharge_remove = 1
|
||||
{
|
||||
if ( IsValid(player) && IsAlive( player ))
|
||||
{
|
||||
if(player.GetOffhandWeapon(1).GetWeaponClassName() == "mp_ability_holopilot"){
|
||||
if( IsValid(player.GetOffhandWeapon(1)) && player.GetOffhandWeapon(1).GetWeaponClassName() == "mp_ability_holopilot"){
|
||||
Assert(player)
|
||||
if(!player.IsPhaseShifted()){
|
||||
int chargeCount = player.GetOffhandWeapon(1).GetWeaponPrimaryClipCount()
|
||||
@@ -58,4 +58,4 @@ int recharge_remove = 1
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user