From b00ce7c0f213395364737eb3ef6ebc0c8f58ed2c Mon Sep 17 00:00:00 2001 From: SubprimeMover Date: Sat, 17 Feb 2024 21:09:17 +0100 Subject: [PATCH] Fix rotation bug Prevents all pickups from rotating regardless of rotating pickup flag. Bug introduced in previous commit. --- SurrealEngine/UObject/UActor.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SurrealEngine/UObject/UActor.cpp b/SurrealEngine/UObject/UActor.cpp index b762e6cc..36bfaa41 100644 --- a/SurrealEngine/UObject/UActor.cpp +++ b/SurrealEngine/UObject/UActor.cpp @@ -784,6 +784,15 @@ void UActor::TickFlying(float elapsed) void UActor::TickRotating(float elapsed) { + UInventory* inventory = TryCast(this); + if (inventory) + { + if (!inventory->bRotatingPickup()) + { + return; // All pickups will rotate without this. + } + } + if (bRotateToDesired()) { if (Rotation() != DesiredRotation())