Revert "Remove most usages of obsolete TransformComponent methods (#1… (#19714)
This commit is contained in:
@@ -45,7 +45,6 @@ public sealed class ClimbSystem : SharedClimbSystem
|
||||
[Dependency] private readonly InteractionSystem _interactionSystem = default!;
|
||||
[Dependency] private readonly StunSystem _stunSystem = default!;
|
||||
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transform = default!;
|
||||
|
||||
private const string ClimbingFixtureName = "climb";
|
||||
private const int ClimbingCollisionGroup = (int) (CollisionGroup.TableLayer | CollisionGroup.LowImpassable);
|
||||
@@ -395,8 +394,8 @@ public sealed class ClimbSystem : SharedClimbSystem
|
||||
if (!Resolve(uid, ref physics, ref climbing, false))
|
||||
return;
|
||||
|
||||
var from = _transform.GetWorldPosition(uid);
|
||||
var to = _transform.GetWorldPosition(target);
|
||||
var from = Transform(uid).WorldPosition;
|
||||
var to = Transform(target).WorldPosition;
|
||||
var (x, y) = (to - from).Normalized();
|
||||
|
||||
if (MathF.Abs(x) < 0.6f) // user climbed mostly vertically so lets make it a clean straight line
|
||||
|
||||
Reference in New Issue
Block a user