Skip to content

Commit

Permalink
Fix FVector incompatible operands errors
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRaveYard authored and coelckers committed Jun 23, 2022
1 parent 2d10ad9 commit 4c58807
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/scripting/backend/codegen.cpp
Expand Up @@ -2777,7 +2777,7 @@ FxExpression *FxAddSub::Resolve(FCompileContext& ctx)
else if (left->IsVector() && right->IsVector())
{
// a vector2 can be added to or subtracted from a vector 3 but it needs to be the right operand.
if (left->ValueType == right->ValueType || (left->IsVector3() && right->IsVector2()))
if (((left->IsVector3() || left->IsVector2()) && right->IsVector2()) || (left->IsVector3() && right->IsVector3()))
{
ValueType = left->ValueType;
}
Expand Down

0 comments on commit 4c58807

Please sign in to comment.