From 920d4895e15ee12b4bf5c562c0ec877fe846b8fe Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 26 Oct 2021 11:35:45 +0200 Subject: [PATCH] Fix and index in curves.gd. --- game/addons/mat_maker_gd/nodes/common/curves.gd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game/addons/mat_maker_gd/nodes/common/curves.gd b/game/addons/mat_maker_gd/nodes/common/curves.gd index 129ea636..71fdfca6 100644 --- a/game/addons/mat_maker_gd/nodes/common/curves.gd +++ b/game/addons/mat_maker_gd/nodes/common/curves.gd @@ -58,8 +58,8 @@ static func curve(x : float, points : PoolRealArray) -> float: var dx : float = x - points[pi]; #var d : float = p_"+name+"_"+str(i+1)+"_x - p_"+name+"_"+str(i)+"_x; - var d : float = points[pi + 1] - points[pi]; - + var d : float = points[pip1] - points[pi]; + var t : float = dx / d var omt : float = (1.0 - t) var omt2 : float = omt * omt