diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Bindings/ManualBindings.cpp | 6 | ||||
-rw-r--r-- | src/Vector3.h | 18 |
2 files changed, 13 insertions, 11 deletions
diff --git a/src/Bindings/ManualBindings.cpp b/src/Bindings/ManualBindings.cpp index a5247bbe6..462ef3682 100644 --- a/src/Bindings/ManualBindings.cpp +++ b/src/Bindings/ManualBindings.cpp @@ -1497,7 +1497,8 @@ static int tolua_cPluginManager_BindCommand(lua_State * L) } Plugin->BindCommand(Command, FnRef); - return 0; + lua_pushboolean(L, true); + return 1; } @@ -1561,7 +1562,8 @@ static int tolua_cPluginManager_BindConsoleCommand(lua_State * L) } Plugin->BindConsoleCommand(Command, FnRef); - return 0; + lua_pushboolean(L, true); + return 1; } diff --git a/src/Vector3.h b/src/Vector3.h index b7a810fc5..ba4abe3eb 100644 --- a/src/Vector3.h +++ b/src/Vector3.h @@ -52,9 +52,9 @@ public: { double Len = 1.0 / Length(); - x *= Len; - y *= Len; - z *= Len; + x = (T)(x * Len); + y = (T)(y * Len); + z = (T)(z * Len); } inline Vector3<T> NormalizeCopy(void) const @@ -62,9 +62,9 @@ public: double Len = 1.0 / Length(); return Vector3<T>( - x * Len, - y * Len, - z * Len + (T)(x * Len), + (T)(y * Len), + (T)(z * Len) ); } @@ -73,9 +73,9 @@ public: double Len = 1.0 / Length(); a_Rhs.Set( - x * Len, - y * Len, - z * Len + (T)(x * Len), + (T)(y * Len), + (T)(z * Len) ); } |