From 80ec59491947bf9da4dbd32b86934e410e3d2011 Mon Sep 17 00:00:00 2001 From: JohnCorby Date: Fri, 4 Mar 2022 11:36:52 -0800 Subject: [PATCH] do DropItem TransformPoint in DropItemMessage just so we can copy paste from vanilla code more easily --- QSB/ItemSync/Messages/DropItemMessage.cs | 2 +- QSB/ItemSync/WorldObjects/Items/QSBItem.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/QSB/ItemSync/Messages/DropItemMessage.cs b/QSB/ItemSync/Messages/DropItemMessage.cs index 6dbd534a..64ab8ca0 100644 --- a/QSB/ItemSync/Messages/DropItemMessage.cs +++ b/QSB/ItemSync/Messages/DropItemMessage.cs @@ -41,7 +41,7 @@ internal class DropItemMessage : QSBWorldObjectMessage public override void OnReceiveRemote() { var sector = SectorId.GetWorldObject().AttachedObject; - WorldObject.DropItem(Position, Normal, sector); + WorldObject.DropItem(sector.transform.TransformPoint(Position), Normal, sector); var player = QSBPlayerManager.GetPlayer(From); player.HeldItem = WorldObject; diff --git a/QSB/ItemSync/WorldObjects/Items/QSBItem.cs b/QSB/ItemSync/WorldObjects/Items/QSBItem.cs index 826010a5..3dcbde7c 100644 --- a/QSB/ItemSync/WorldObjects/Items/QSBItem.cs +++ b/QSB/ItemSync/WorldObjects/Items/QSBItem.cs @@ -86,7 +86,7 @@ internal class QSBItem : WorldObject, IQSBItem => AttachedObject.PickUpItem(holdTransform); public void DropItem(Vector3 position, Vector3 normal, Sector sector) => - AttachedObject.DropItem(sector.transform.TransformPoint(position), normal, sector.transform, sector, null); + AttachedObject.DropItem(position, normal, sector.transform, sector, null); public void OnCompleteUnsocket() => AttachedObject.OnCompleteUnsocket();