diff options
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/_xp.gnut')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/_xp.gnut | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/_xp.gnut b/Northstar.CustomServers/mod/scripts/vscripts/_xp.gnut index 0be171d1..6db3b9a7 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/_xp.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/_xp.gnut @@ -38,8 +38,9 @@ void function HandleXPGainForScoreEvent( entity player, ScoreEvent event ) xpValue = weaponXp else if ( xpValue < titanXp ) xpValue = titanXp - - if ( ShouldTrackXPForWeapon( player.GetActiveWeapon().GetWeaponClassName() ) ) + + entity weapon = player.GetActiveWeapon() + if ( IsValid( weapon ) && ShouldTrackXPForWeapon( weapon.GetWeaponClassName() ) ) AddWeaponXP( player, xpValue ) // if we specifically gain titan xp, then give titan xp no matter what, otherwise only give it when we're in a titan |