Skip to content

Commit fb47cbd

Browse files
committed
oups
1 parent 310c696 commit fb47cbd

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

EXILED/Exiled.API/Features/Npc.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ namespace Exiled.API.Features
1717
using Exiled.API.Enums;
1818
using Exiled.API.Extensions;
1919
using Exiled.API.Features.Components;
20-
2120
using Footprinting;
2221

2322
using MEC;
@@ -52,6 +51,17 @@ public Npc(GameObject gameObject)
5251
/// </summary>
5352
public static new List<Npc> List => Player.List.OfType<Npc>().ToList();
5453

54+
public new Vector3 Position
55+
{
56+
get => base.Position;
57+
set
58+
{
59+
base.Position = value;
60+
if (Role is Roles.FpcRole fpcRole)
61+
fpcRole.RelativePosition = new(value);
62+
}
63+
}
64+
5565
/// <summary>
5666
/// Retrieves the NPC associated with the specified ReferenceHub.
5767
/// </summary>

EXILED/Exiled.API/Features/Player.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -506,12 +506,7 @@ public Player Cuffer
506506
public Vector3 Position
507507
{
508508
get => Transform.position;
509-
set
510-
{
511-
ReferenceHub.TryOverridePosition(value, Vector3.zero);
512-
if (Role is FpcRole fpcRole)
513-
fpcRole.RelativePosition = new(value);
514-
}
509+
set => ReferenceHub.TryOverridePosition(value, Vector3.zero);
515510
}
516511

517512
/// <summary>

0 commit comments

Comments
 (0)