From 8be7af41a979cbd132e559da660fde38b77242ea Mon Sep 17 00:00:00 2001 From: Leonard2 Date: Sun, 30 Oct 2016 04:35:48 +0100 Subject: [PATCH] Don't use a struct reference for vectors as return type just like for parameters --- src/scripting/zscript/zcc_compile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripting/zscript/zcc_compile.cpp b/src/scripting/zscript/zcc_compile.cpp index 38754bdce8..6c83b5a991 100644 --- a/src/scripting/zscript/zcc_compile.cpp +++ b/src/scripting/zscript/zcc_compile.cpp @@ -1967,7 +1967,7 @@ void ZCCCompiler::InitFunctions() do { auto type = DetermineType(c->Type(), f, f->Name, t, false, false); - if (type->IsKindOf(RUNTIME_CLASS(PStruct))) + if (type->IsKindOf(RUNTIME_CLASS(PStruct)) && type != TypeVector2 && type != TypeVector3) { // structs and classes only get passed by pointer. type = NewPointer(type);