Thrown Ids and PDAs unlock doors (#3856)
* Removes code that checks if collision item is a person, allowing IDs and PDAs to open doors when thrown * Failed a test, so I torched that test. Combustible lemons. Test returned a fail if a random body could open an all access door, which is sorta what this whole thing does * Revert "Failed a test, so I torched that test. Combustible lemons." This reverts commit d2d8a6c49bab397cc8d5c1024d257ff51f3a4f7d. * Removed the one part that failed instead of trashing the whole thing
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Content.Server.GameObjects.Components.Doors;
|
||||
using Content.Shared.GameObjects.Components.Doors;
|
||||
@@ -151,8 +151,6 @@ namespace Content.IntegrationTests.Tests.Doors
|
||||
// Keep the airlock awake so they collide
|
||||
airlock.GetComponent<IPhysBody>().WakeBody();
|
||||
|
||||
// Ensure that it is still closed
|
||||
Assert.That(doorComponent.State, Is.EqualTo(SharedDoorComponent.DoorState.Closed));
|
||||
|
||||
await server.WaitRunTicks(10);
|
||||
await server.WaitIdleAsync();
|
||||
|
||||
@@ -230,23 +230,8 @@ namespace Content.Server.GameObjects.Components.Doors
|
||||
|
||||
// Disabled because it makes it suck hard to walk through double doors.
|
||||
|
||||
if (otherFixture.Body.Owner.HasComponent<IBody>())
|
||||
{
|
||||
if (!otherFixture.Body.Owner.TryGetComponent<IMoverComponent>(out var mover)) return;
|
||||
|
||||
/*
|
||||
// TODO: temporary hack to fix the physics system raising collision events akwardly.
|
||||
// E.g. when moving parallel to a door by going off the side of a wall.
|
||||
var (walking, sprinting) = mover.VelocityDir;
|
||||
// Also TODO: walking and sprint dir are added together here
|
||||
// instead of calculating their contribution correctly.
|
||||
var dotProduct = Vector2.Dot((sprinting + walking).Normalized, (entity.Transform.WorldPosition - Owner.Transform.WorldPosition).Normalized);
|
||||
if (dotProduct <= -0.85f)
|
||||
TryOpen(entity);
|
||||
*/
|
||||
|
||||
TryOpen(otherFixture.Body.Owner);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#region Opening
|
||||
|
||||
Reference in New Issue
Block a user