Skip to content

Commit

Permalink
Fix scores being submitted with FailOffForFirstStageEasy or FailOffIn…
Browse files Browse the repository at this point in the history
…Beginner set

Use the newly addded GAMESTATE:GetPlayerFailType() to get the actual FailType
and correctly reject submission to GrooveStats based on that.
  • Loading branch information
phantom10111 committed Jan 23, 2025
1 parent acfa885 commit 67126fb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Scripts/SL-Helpers-GrooveStats.lua
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,11 @@ ValidForGrooveStats = function(player)
or po:Big()
)

-- we can't use po:FailSetting() here because effective fail type can be overridden by preferences
-- use GAMESTATE:GetPlayerFailType() since ScreenGameplay uses the same function internally
local failType = GAMESTATE:GetPlayerFailType(player);
-- only FailTypes "Immediate" and "ImmediateContinue" are valid for GrooveStats
valid[11] = (po:FailSetting() == "FailType_Immediate" or po:FailSetting() == "FailType_ImmediateContinue")
valid[11] = (failType == "FailType_Immediate" or failType == "FailType_ImmediateContinue")

-- AutoPlay/AutoplayCPU is not allowed
valid[12] = IsHumanPlayer(player)
Expand Down

0 comments on commit 67126fb

Please sign in to comment.