diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-29 02:13:26 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-29 02:13:26 +0000 |
commit | e8f67265e817bdca167fbb9970327588501be580 (patch) | |
tree | de1a5f60c67517263a294f94e397b7d78c5825fe /Northstar.CustomServers/mod/scripts/vscripts/burnmeter | |
parent | bbdfd874e2f6a3ad1c72c123879bdc29299bc669 (diff) | |
download | NorthstarMods-e8f67265e817bdca167fbb9970327588501be580.tar.gz NorthstarMods-e8f67265e817bdca167fbb9970327588501be580.zip |
fix burnmeter and fastball crashes
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/burnmeter')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut b/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut index efaea76f..3151a0f2 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/burnmeter/_burnmeter.gnut @@ -242,7 +242,17 @@ void function PlayerUsesAmpedWeaponsBurncardThreaded( entity player ) { weapon.RemoveMod( "silencer" ) // both this and the burnmod will override firing fx, if a second one overrides this we crash foreach ( string mod in GetWeaponBurnMods( weapon.GetWeaponClassName() ) ) - weapon.AddMod( mod ) + { + // catch incompatibilities just in case + try + { + weapon.AddMod( mod ) + } + catch( ex ) + { + weapons.removebyvalue( weapon ) + } + } // needed to display amped weapon time left weapon.SetScriptFlags0( weapon.GetScriptFlags0() | WEAPONFLAG_AMPED ) |