Skip to content

Commit

Permalink
Set Practice Mode Lua to accept a delay for SetSongPosition
Browse files Browse the repository at this point in the history
  • Loading branch information
poco0317 committed Nov 3, 2019
1 parent 3f16a6c commit a9b9d6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ local function duminput(event)
MESSAGEMAN:Broadcast("MouseRightClick")
elseif event.DeviceInput.button == "DeviceButton_backspace" and event.type == "InputEventType_FirstPress" then
if bookmarkPosition ~= nil then
SCREENMAN:GetTopScreen():SetSongPosition(bookmarkPosition)
SCREENMAN:GetTopScreen():SetSongPosition(bookmarkPosition, 1)
end
elseif event.button == "EffectUp" and event.type == "InputEventType_FirstPress" then
SCREENMAN:GetTopScreen():AddToRate(0.05)
Expand Down Expand Up @@ -1047,7 +1047,7 @@ pm[#pm + 1] =
end,
MouseLeftClickMessageCommand = function(self)
if isOver(self) then
SCREENMAN:GetTopScreen():SetSongPosition(self:GetX() * musicratio)
SCREENMAN:GetTopScreen():SetSongPosition(self:GetX() * musicratio, 0)
end
end,
MouseRightClickMessageCommand = function(self)
Expand Down
5 changes: 3 additions & 2 deletions src/Etterna/Screen/Gameplay/ScreenGameplayPractice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,9 @@ class LunaScreenGameplayPractice : public Luna<ScreenGameplayPractice>
public:
static int SetSongPosition(T* p, lua_State* L)
{
float given = FArg(1);
p->SetSongPosition(given);
float position = FArg(1);
float delay = FArg(2);
p->SetSongPosition(position, delay);
return 0;
}

Expand Down

0 comments on commit a9b9d6d

Please sign in to comment.