diff options
author | Connie Price <contact@connieprice.co.uk> | 2021-12-28 18:26:54 +0000 |
---|---|---|
committer | Connie Price <contact@connieprice.co.uk> | 2021-12-28 18:26:54 +0000 |
commit | 67611e7fad615b33db8c4751b3e61ff44a630071 (patch) | |
tree | c7c509ec6bd55a2540fa5b2b1328699c79b39bec /Northstar.CustomServers/mod/scripts/vscripts/mp | |
parent | 7652539f68a35bd78e27e4394cf66a269212febb (diff) | |
download | NorthstarMods-67611e7fad615b33db8c4751b3e61ff44a630071.tar.gz NorthstarMods-67611e7fad615b33db8c4751b3e61ff44a630071.zip |
Fixed the game erroring when disembarking from a titan and the player has a weapon missing "menu_category" equipped (like titan weapons).
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/mp')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/mp/_titan_transfer.nut | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_titan_transfer.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_titan_transfer.nut index 7b126cd0..c84e6aba 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_titan_transfer.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_titan_transfer.nut @@ -178,7 +178,12 @@ void function GiveWeaponsFromStoredArray( entity player, array<StoredWeapon> sto UpdateProScreen( player, weapon ) } - string weaponCategory = GetWeaponInfoFileKeyField_GlobalString( weapon.GetWeaponClassName(), "menu_category" ) + string weaponCategory = "" + if ( IsWeaponKeyFieldDefined(weapon.GetWeaponClassName(), "menu_category") ) + { + weaponCategory = GetWeaponInfoFileKeyField_GlobalString( weapon.GetWeaponClassName(), "menu_category" ) + } + if ( weaponCategory == "at" || weaponCategory == "special" ) // refill AT/grenadier ammo stockpile { int defaultTotal = weapon.GetWeaponSettingInt( eWeaponVar.ammo_default_total ) |