Skip to content

Commit

Permalink
Fix cl_earn_meter crash when Core does not exist during Core Active…
Browse files Browse the repository at this point in the history
… state (#494)

Fix crash when getting core weapon
  • Loading branch information
Dinorush authored Jul 6, 2024
1 parent 0198d3f commit f3fa134
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,11 @@ void function EarnMeter_Update()
break

entity soul = player.GetTitanSoul()
entity core = player.GetOffhandWeapons()[3]
entity core = player.GetOffhandWeapon( OFFHAND_EQUIPMENT )

if ( !IsValid( core ) )
break

string coreName = core.GetWeaponClassName()
array<string> coreMods = core.GetMods()

Expand Down

0 comments on commit f3fa134

Please sign in to comment.