From f24e9f51957ce777faf721c576138019fcbd495e Mon Sep 17 00:00:00 2001 From: marauder2k7 Date: Fri, 16 May 2025 17:27:34 +0100 Subject: [PATCH] Update mathTypes.cpp TransformF can take 7 or 3 values so on false just set position for now. We may need to change ParseProperty to return a count for such cases as this and be able to tell whether its just position, rotation or both being set --- Engine/source/math/mathTypes.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Engine/source/math/mathTypes.cpp b/Engine/source/math/mathTypes.cpp index 18526267c..62227d4f5 100644 --- a/Engine/source/math/mathTypes.cpp +++ b/Engine/source/math/mathTypes.cpp @@ -573,7 +573,19 @@ ConsoleSetType( TypeTransformF ) char buffer[256] = { 0 }; dStrncpy(buffer, *argv, sizeof(buffer)); - if (PropertyInfo::ParseProperty(buffer, parsed)) + if (!PropertyInfo::ParseProperty(buffer, parsed)) + { + TransformF* aa = (TransformF*)dptr; + aa->mPosition.x = parsed[0]; + aa->mPosition.y = parsed[1]; + aa->mPosition.z = parsed[2]; + aa->mOrientation.axis.x = 1.000f; + aa->mOrientation.axis.y = 0.000f; + aa->mOrientation.axis.z = 0.000f; + aa->mOrientation.angle = 0.000f; + return; + } + else { TransformF* aa = (TransformF*)dptr; aa->mPosition.x = parsed[0];