From 6eb8e80c22d221eb9b567b3c10cc6c86a8894692 Mon Sep 17 00:00:00 2001 From: xiluisx Date: Wed, 4 May 2022 21:00:19 -0500 Subject: [PATCH] Fixed Jail position to work with interiors --- src/BPEssentials/Commands/Moderation/Jail.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BPEssentials/Commands/Moderation/Jail.cs b/src/BPEssentials/Commands/Moderation/Jail.cs index f0fde70..65f6bd7 100644 --- a/src/BPEssentials/Commands/Moderation/Jail.cs +++ b/src/BPEssentials/Commands/Moderation/Jail.cs @@ -22,7 +22,7 @@ public void Invoke(ShPlayer player, ShPlayer target, float timeInSeconds) } var getPositionT = jail.mainT; target.svPlayer.SvTrySetJob(BPAPI.Instance.PrisonerIndex, true, false); - target.GetExtendedPlayer().ResetAndSavePosition(getPositionT.position, getPositionT.rotation, 0); + target.GetExtendedPlayer().ResetAndSavePosition(getPositionT.position, getPositionT.rotation, getPositionT.parent.GetSiblingIndex()); target.svPlayer.SvClearCrimes(); target.svPlayer.RemoveItemsJail(); target.StartCoroutine(target.svPlayer.JailTimer(timeInSeconds));