Disable airlock "walk by" fix.
It makes it hard to walk through double doors so I'd rather have this be disabled.
This commit is contained in:
@@ -58,8 +58,7 @@ namespace Content.Server.GameObjects.Components.Doors
|
||||
private const float DoorStunTime = 5f;
|
||||
protected bool Safety = true;
|
||||
|
||||
[ViewVariables]
|
||||
private bool _occludes;
|
||||
[ViewVariables] private bool _occludes;
|
||||
|
||||
public override void ExposeData(ObjectSerializer serializer)
|
||||
{
|
||||
@@ -111,17 +110,24 @@ namespace Content.Server.GameObjects.Components.Doors
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Disabled because it makes it suck hard to walk through double doors.
|
||||
|
||||
if (entity.HasComponent(typeof(SpeciesComponent)))
|
||||
{
|
||||
if (!entity.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.9f)
|
||||
if (dotProduct <= -0.85f)
|
||||
TryOpen(entity);
|
||||
*/
|
||||
|
||||
TryOpen(entity);
|
||||
}
|
||||
}
|
||||
@@ -144,6 +150,7 @@ namespace Content.Server.GameObjects.Components.Doors
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return accessReader.IsAllowed(user);
|
||||
}
|
||||
|
||||
@@ -204,6 +211,7 @@ namespace Content.Server.GameObjects.Components.Doors
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return accessReader.IsAllowed(user);
|
||||
}
|
||||
|
||||
@@ -214,6 +222,7 @@ namespace Content.Server.GameObjects.Components.Doors
|
||||
Deny();
|
||||
return;
|
||||
}
|
||||
|
||||
Close();
|
||||
}
|
||||
|
||||
@@ -242,6 +251,7 @@ namespace Content.Server.GameObjects.Components.Doors
|
||||
stun.Paralyze(DoorStunTime);
|
||||
hitSomeone = true;
|
||||
}
|
||||
|
||||
// If we hit someone, open up after stun (opens right when stun ends)
|
||||
if (hitSomeone)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user