aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts
diff options
context:
space:
mode:
authorx3Karma <juliuslimck@gmail.com>2022-03-04 23:11:43 +0800
committerGitHub <noreply@github.com>2022-03-04 15:11:43 +0000
commitff38894d1a78a889013af5ed38e3a6d3919c7fdd (patch)
tree65013952c820b3845c21e1930a6a71769a64e9c6 /Northstar.CustomServers/mod/scripts
parent4582f57a5b82d8c75666010081573df0d86ee03a (diff)
downloadNorthstarMods-ff38894d1a78a889013af5ed38e3a6d3919c7fdd.tar.gz
NorthstarMods-ff38894d1a78a889013af5ed38e3a6d3919c7fdd.zip
prevent crash if offhand slot is not found when using Tactikill (#255)
Diffstat (limited to 'Northstar.CustomServers/mod/scripts')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/weapons/_weapon_utility.nut4
1 files changed, 4 insertions, 0 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/weapons/_weapon_utility.nut b/Northstar.CustomServers/mod/scripts/vscripts/weapons/_weapon_utility.nut
index b3e5f5a3..40d42fd1 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/weapons/_weapon_utility.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/weapons/_weapon_utility.nut
@@ -2774,6 +2774,8 @@ void function PAS_CooldownReduction_OnKill( entity victim, entity attacker, var
if ( GetCurrentPlaylistVarInt( "featured_mode_tactikill", 0 ) > 0 )
{
entity weapon = attacker.GetOffhandWeapon( OFFHAND_LEFT )
+ if ( !IsValid(weapon) )
+ return
switch ( GetWeaponInfoFileKeyField_Global( weapon.GetWeaponClassName(), "cooldown_type" ) )
{
@@ -2807,6 +2809,8 @@ void function PAS_CooldownReduction_OnKill( entity victim, entity attacker, var
return
entity weapon = attacker.GetOffhandWeapon( OFFHAND_LEFT )
+ if ( !IsValid(weapon) )
+ return
switch ( GetWeaponInfoFileKeyField_Global( weapon.GetWeaponClassName(), "cooldown_type" ) )
{