Fix crusher altfire (#18826)

This commit is contained in:
metalgearsloth
2023-08-08 03:05:18 +10:00
committed by GitHub
parent 51d7f180e0
commit a7b302bd3c

View File

@@ -89,7 +89,7 @@ public sealed partial class MeleeWeaponSystem : SharedMeleeWeaponSystem
// it's kinda tricky.
// I think as long as we make secondaries their own component it's probably fine
// as long as guncomp has an alt-use key then it shouldn't be too much of a PITA to deal with.
if (HasComp<GunComponent>(weaponUid))
if (TryComp<GunComponent>(weaponUid, out var gun) && gun.UseKey)
{
return;
}