Skip to content

Commit d92b6c7

Browse files
committed
declare the official mine window size, start recording miss data
dont write it yet
1 parent bf41374 commit d92b6c7

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

src/Etterna/Actor/Gameplay/Player.cpp

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ TimingWindowSecondsInit(size_t /*TimingWindow*/ i,
7474
// ~same as j5 great, the explanation for this is quite long but
7575
// the general idea is that mines are more punishing now so we
7676
// can give a little back
77-
defaultValueOut = 0.075F;
77+
defaultValueOut = MINE_WINDOW_SEC;
7878
break;
7979
case TW_Hold:
8080
// allow enough time to take foot off and put back on
@@ -190,7 +190,7 @@ Player::GetWindowSeconds(TimingWindow tw) -> float
190190
// logically consistent with the idea that increasing judge should
191191
// not make any elementof the game easier, so now they do
192192
case TW_Mine:
193-
return 0.075F;
193+
return MINE_WINDOW_SEC;
194194
case TW_Hold:
195195
return 0.25F * GetTimingWindowScale();
196196
case TW_Roll:
@@ -213,7 +213,7 @@ Player::GetWindowSecondsCustomScale(TimingWindow tw, float timingScale) -> float
213213
// logically consistent with the idea that increasing judge should
214214
// not make any elementof the game easier, so now they do
215215
case TW_Mine:
216-
return 0.075F;
216+
return MINE_WINDOW_SEC;
217217
case TW_Hold:
218218
return 0.25F * timingScale;
219219
case TW_Roll:
@@ -817,17 +817,15 @@ void
817817
Player::UpdatePressedFlags()
818818
{
819819
const auto iNumCols =
820-
GAMESTATE->GetCurrentStyle(GetPlayerState()->m_PlayerNumber)
821-
->m_iColsPerPlayer;
820+
GAMESTATE->GetCurrentStyle(PLAYER_1)->m_iColsPerPlayer;
822821
ASSERT_M(iNumCols <= MAX_COLS_PER_PLAYER,
823822
ssprintf("%i > %i", iNumCols, MAX_COLS_PER_PLAYER));
824823
for (auto col = 0; col < iNumCols; ++col) {
825824
ASSERT(m_pPlayerState != nullptr);
826825

827826
// TODO(Sam): Remove use of PlayerNumber.
828827
std::vector<GameInput> GameI;
829-
GAMESTATE->GetCurrentStyle(GetPlayerState()->m_PlayerNumber)
830-
->StyleInputToGameInput(col, GameI);
828+
GAMESTATE->GetCurrentStyle(PLAYER_1)->StyleInputToGameInput(col, GameI);
831829

832830
const auto bIsHoldingButton = INPUTMAPPER->IsBeingPressed(GameI);
833831

@@ -850,7 +848,6 @@ Player::UpdateHoldsAndRolls(float fDeltaTime,
850848
// handle Autoplay for rolls
851849
if (m_pPlayerState->m_PlayerController != PC_HUMAN) {
852850
for (auto iTrack = 0; iTrack < m_NoteData.GetNumTracks(); ++iTrack) {
853-
// TODO(Sam): Make the CPU miss sometimes.
854851
int iHeadRow;
855852
if (!m_NoteData.IsHoldNoteAtRow(iTrack, iSongRow, &iHeadRow)) {
856853
iHeadRow = iSongRow;
@@ -3065,6 +3062,15 @@ Player::SetJudgment(int iRow,
30653062
if (tns == TNS_Miss && m_pPlayerStageStats != nullptr) {
30663063
AddNoteToReplayData(
30673064
GAMESTATE->CountNotesSeparately() ? iTrack : -1, &tn, iRow);
3065+
3066+
// add miss to input data
3067+
// the fmusicseconds is when the judgment occurs
3068+
// but the row is the row of the actual note
3069+
m_pPlayerStageStats->m_vNoteMissVector.emplace_back(
3070+
GAMESTATE->CountNotesSeparately() ? iTrack : -1,
3071+
iRow,
3072+
tn.type,
3073+
tn.subType);
30683074
}
30693075

30703076
if (m_bSendJudgmentAndComboMessages) {

src/Etterna/Models/Misc/GameConstantsAndTypes.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ const int ARBITRARY_MIN_GAMEPLAY_NUMBER = -200000;
2929
// dont let anyone hit a note outside of this
3030
const float MISS_WINDOW_BEGIN_SEC = 0.18F;
3131

32+
// 75ms in both directions, around a j5 great
33+
const float MINE_WINDOW_SEC = 0.075F;
34+
3235
enum GameplayMode
3336
{
3437
GameplayMode_Normal,

0 commit comments

Comments
 (0)