diff --git a/src/LuaEngine/methods/UnitMethods.h b/src/LuaEngine/methods/UnitMethods.h index ff03073..bc0cbb7 100644 --- a/src/LuaEngine/methods/UnitMethods.h +++ b/src/LuaEngine/methods/UnitMethods.h @@ -1415,11 +1415,10 @@ namespace LuaUnit uint32 type = ALE::CHECKVAL(L, 2); float rate = ALE::CHECKVAL(L, 3); bool forced = ALE::CHECKVAL(L, 4, false); - (void)forced; // ensure that the variable is referenced in order to pass compiler checks if (type >= MAX_MOVE_TYPE) return luaL_argerror(L, 2, "valid UnitMoveType expected"); - unit->SetSpeed((UnitMoveType)type, rate); + unit->SetSpeed((UnitMoveType)type, rate, forced); return 0; }