From 9a083d2d13a6400c62c457681592f101ec2dda8d Mon Sep 17 00:00:00 2001 From: RaveYard Date: Fri, 24 Jun 2022 18:18:53 +0200 Subject: [PATCH] Fix FVector to Vector comparison --- src/common/scripting/backend/codegen.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/scripting/backend/codegen.cpp b/src/common/scripting/backend/codegen.cpp index 474028bca..175b6206e 100644 --- a/src/common/scripting/backend/codegen.cpp +++ b/src/common/scripting/backend/codegen.cpp @@ -3522,7 +3522,8 @@ FxExpression *FxCompareEq::Resolve(FCompileContext& ctx) return nullptr; } - if (left->ValueType != right->ValueType) // identical types are always comparable, if they can be placed in a register, so we can save most checks if this is the case. + // identical types are always comparable, if they can be placed in a register, so we can save most checks if this is the case. + if (left->ValueType != right->ValueType && !(left->IsVector2() && right->IsVector2()) && !(left->IsVector3() && right->IsVector3())) { FxExpression *x; if (left->IsNumeric() && right->ValueType == TypeString && (x = StringConstToChar(right)))