Fix goliath tentacle exploit (#37168)
This commit is contained in:
@@ -17,6 +17,7 @@ using Content.Shared.StatusEffect;
|
||||
using Content.Shared.Throwing;
|
||||
using Content.Shared.Whitelist;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Physics.Events;
|
||||
using Robust.Shared.Physics.Systems;
|
||||
@@ -31,6 +32,7 @@ public abstract class SharedStunSystem : EntitySystem
|
||||
[Dependency] private readonly MovementSpeedModifierSystem _movementSpeedModifier = default!;
|
||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||
[Dependency] private readonly EntityWhitelistSystem _entityWhitelist = default!;
|
||||
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
|
||||
[Dependency] private readonly StandingStateSystem _standingState = default!;
|
||||
[Dependency] private readonly StatusEffectsSystem _statusEffect = default!;
|
||||
|
||||
@@ -116,8 +118,13 @@ public abstract class SharedStunSystem : EntitySystem
|
||||
|
||||
private void OnStunOnContactStartup(Entity<StunOnContactComponent> ent, ref ComponentStartup args)
|
||||
{
|
||||
if (TryComp<PhysicsComponent>(ent, out var body))
|
||||
_broadphase.RegenerateContacts((ent, body));
|
||||
if (!TryComp<PhysicsComponent>(ent, out var body) ||
|
||||
!TryComp<FixturesComponent>(ent, out var manager))
|
||||
return;
|
||||
|
||||
_physics.SetBodyType(ent, BodyType.Dynamic, manager: manager, body: body);
|
||||
_physics.SetCanCollide(ent, true, manager: manager, body: body);
|
||||
_broadphase.RegenerateContacts((ent, body));
|
||||
}
|
||||
|
||||
private void OnStunOnContactCollide(Entity<StunOnContactComponent> ent, ref StartCollideEvent args)
|
||||
|
||||
@@ -121,10 +121,8 @@
|
||||
id: GoliathTentacle
|
||||
name: tentacle
|
||||
components:
|
||||
- type: Transform
|
||||
anchored: True
|
||||
- type: Physics
|
||||
bodyType: Static
|
||||
bodyType: Dynamic
|
||||
canCollide: true
|
||||
- type: InteractionOutline
|
||||
- type: Sprite
|
||||
|
||||
Reference in New Issue
Block a user