Fix for items dropped being rotated to world north (#26662)
* Fix rotation of dropped items * combined world position rotation function for dumpable * scuffed implementation? * less scuffed? * even less scuffed... I guess * capital D --------- Co-authored-by: Plykiya <plykiya@protonmail.com>
This commit is contained in:
@@ -134,8 +134,10 @@ public abstract partial class SharedHandsSystem
|
||||
return true;
|
||||
}
|
||||
|
||||
var (itemPos, itemRot) = TransformSystem.GetWorldPositionRotation(entity);
|
||||
var origin = new MapCoordinates(itemPos, itemXform.MapID);
|
||||
var target = targetDropLocation.Value.ToMap(EntityManager, TransformSystem);
|
||||
TransformSystem.SetWorldPosition(itemXform, GetFinalDropCoordinates(uid, userXform.MapPosition, target));
|
||||
TransformSystem.SetWorldPositionRotation(entity, GetFinalDropCoordinates(uid, origin, target), itemRot);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user