mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
Fix unbuckling from office chairs and being under them (#45337)
* don't set draw depth if direction is the same * organize?
This commit is contained in:
parent
7ee2ccb7d3
commit
c4d9904de5
1 changed files with 7 additions and 2 deletions
|
|
@ -44,9 +44,14 @@ internal sealed partial class BuckleSystem : SharedBuckleSystem
|
|||
if (!_spriteQuery.TryComp(ent, out SpriteComponent? strapSprite))
|
||||
return;
|
||||
|
||||
var angle = _xformSystem.GetWorldRotation(ent) + _eye.CurrentEye.Rotation; // Get true screen position, or close enough
|
||||
var newDir = (args.NewRotation + _eye.CurrentEye.Rotation).GetCardinalDir();
|
||||
var oldDir = (args.OldRotation + _eye.CurrentEye.Rotation).GetCardinalDir();
|
||||
|
||||
if (newDir == oldDir)
|
||||
return;
|
||||
|
||||
var isNorth = newDir == Direction.North;
|
||||
|
||||
var isNorth = angle.GetCardinalDir() == Direction.North;
|
||||
foreach (var buckledEntity in ent.Comp.BuckledEntities)
|
||||
{
|
||||
if (!TryComp<BuckleComponent>(buckledEntity, out var buckle))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue