From 02f18daed5ad81a31d5d606be6077301300494dd Mon Sep 17 00:00:00 2001 From: fgenesis Date: Thu, 2 May 2013 23:30:06 +0200 Subject: [PATCH] Fix regression from 7ff0caaed8. This fixes a glitch in the final boss' last form. Due to a missing Beam::trace() call, the beam's angle was not updated, and it always pointed into the upper left corner. --- Aquaria/ScriptInterface.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Aquaria/ScriptInterface.cpp b/Aquaria/ScriptInterface.cpp index 5ea30bc..0714f94 100644 --- a/Aquaria/ScriptInterface.cpp +++ b/Aquaria/ScriptInterface.cpp @@ -3641,6 +3641,19 @@ luaFunc(beam_setFirer) luaReturnNil(); } +// Note the additional trace() call +luaFunc(beam_setPosition_override) +{ + Beam *b = beam(L); + if (b) + { + b->position.interpolateTo(Vector(lua_tonumber(L, 2), lua_tonumber(L, 3)), + lua_tonumber(L, 4), lua_tonumber(L, 5), lua_tonumber(L, 6), lua_tonumber(L, 7)); + b->trace(); + } + luaReturnNil(); +} + luaFunc(getStringBank) { luaReturnStr(dsq->continuity.stringBank.get(lua_tointeger(L, 1)).c_str()); @@ -8366,6 +8379,7 @@ static const struct { {"bone_getPosition", l_bone_getWorldPosition}, { "entity_delete", l_entity_delete_override }, { "entity_setRenderPass", l_entity_setRenderPass_override }, + { "beam_setPosition", l_beam_setPosition_override }, // -- deprecated/compatibility related functions below here --