From 039f173de17d5e5febc1caf85d41fbb7d2f2c112 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 27 May 2023 15:27:43 +0200 Subject: [PATCH] Fix error, also add linear_interpolate call for Vector4i to variant op. --- core/variant/variant_op.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/variant/variant_op.cpp b/core/variant/variant_op.cpp index 8574b2aa6..de915a8ba 100644 --- a/core/variant/variant_op.cpp +++ b/core/variant/variant_op.cpp @@ -5538,12 +5538,11 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant & } return; case VECTOR4: { - r_dst = reinterpret_cast(a._data._mem)->lerp(*reinterpret_cast(b._data._mem), c); + r_dst = reinterpret_cast(a._data._mem)->linear_interpolate(*reinterpret_cast(b._data._mem), c); } return; case VECTOR4I: { - //r_dst = reinterpret_cast(a._data._mem)->lerp(*reinterpret_cast(b._data._mem), c); - r_dst = a; + r_dst = reinterpret_cast(a._data._mem)->linear_interpolate(*reinterpret_cast(b._data._mem), c); } return; case PLANE: {