fix MeleeChemicalInjector exploits (#12305)

This commit is contained in:
Rane
2022-10-30 22:04:51 -04:00
committed by GitHub
parent 4616a9f7e7
commit 8f4bd8b83b
6 changed files with 14 additions and 17 deletions

View File

@@ -155,7 +155,7 @@ public sealed class MeleeWeaponSystem : SharedMeleeWeaponSystem
// If the user is using a long-range weapon, this probably shouldn't be happening? But I'll interpret melee as a
// somewhat messy scuffle. See also, heavy attacks.
_interaction.DoContactInteraction(user, ev.Target);
_interaction.DoContactInteraction(user, ev.Target);
// For stuff that cares about it being attacked.
RaiseLocalEvent(ev.Target.Value, new AttackedEvent(component.Owner, user, targetXform.Coordinates));
@@ -555,7 +555,7 @@ public sealed class MeleeWeaponSystem : SharedMeleeWeaponSystem
private void OnChemicalInjectorHit(EntityUid owner, MeleeChemicalInjectorComponent comp, MeleeHitEvent args)
{
if (!_solutions.TryGetInjectableSolution(owner, out var solutionContainer))
if (!_solutions.TryGetSolution(owner, comp.Solution, out var solutionContainer))
return;
var hitBloodstreams = new List<BloodstreamComponent>();