@@ -151,9 +151,6 @@ ThemeMetric<bool> CHECKPOINTS_FLASH_ON_HOLD(
151
151
" Player" ,
152
152
" CheckpointsFlashOnHold" ); // sm-ssc addition
153
153
ThemeMetric<bool > IMMEDIATE_HOLD_LET_GO (" Player" , " ImmediateHoldLetGo" );
154
- ThemeMetric<bool > COMBO_BREAK_ON_IMMEDIATE_HOLD_LET_GO (
155
- " Player" ,
156
- " ComboBreakOnImmediateHoldLetGo" );
157
154
/* *
158
155
* @brief Must a Player step on a hold head for a hold to activate?
159
156
*
@@ -292,6 +289,8 @@ Player::Init(const std::string& sType,
292
289
DRAW_DISTANCE_BEFORE_TARGET_PIXELS.Load (sType ,
293
290
" DrawDistanceBeforeTargetsPixels" );
294
291
ROLL_BODY_INCREMENTS_COMBO.Load (" Player" , " RollBodyIncrementsCombo" );
292
+ COMBO_BREAK_ON_IMMEDIATE_HOLD_LET_GO.Load (" Player" ,
293
+ " ComboBreakOnImmediateHoldLetGo" );
295
294
296
295
{
297
296
// Init judgment positions
@@ -564,13 +563,7 @@ Player::Load()
564
563
m_iFirstUncrossedRow = iNoteRow - 1 ;
565
564
m_pJudgedRows->Reset (iNoteRow);
566
565
567
- // TODO: Remove use of PlayerNumber.
568
- PlayerNumber pn = m_pPlayerState->m_PlayerNumber ;
569
-
570
- /* The editor reuses Players ... so we really need to make sure everything
571
- * is reset and not tweening. Perhaps ActorFrame should recurse to
572
- * subactors; then we could just this->StopTweening()? -glenn */
573
- // hurr why don't you just set m_bPropagateCommands on it then -aj
566
+ // Make sure c++ bound actor's tweens are reset if they exist
574
567
if (m_sprJudgment)
575
568
m_sprJudgment->PlayCommand (" Reset" );
576
569
if (m_pPlayerStageStats != nullptr ) {
@@ -580,11 +573,6 @@ Player::Load()
580
573
->m_iCurMissCombo ); // combo can persist between songs and games
581
574
}
582
575
583
- /* Don't re-init this; that'll reload graphics. Add a separate Reset() call
584
- * if some ScoreDisplays need it. */
585
- // if( m_pScore )
586
- // m_pScore->Init( pn );
587
-
588
576
// Mina garbage - Mina
589
577
m_Timing = GAMESTATE->m_pCurSteps ->GetTimingData ();
590
578
m_Timing->NegStopAndBPMCheck ();
@@ -636,8 +624,6 @@ Player::Load()
636
624
GAMESTATE->GetCurrentStyle (GetPlayerState ()->m_PlayerNumber )
637
625
->m_StepsType );
638
626
639
- const Song* pSong = GAMESTATE->m_pCurSong ;
640
-
641
627
// Generate some cache data structure.
642
628
GenerateCacheDataStructure (m_pPlayerState, m_NoteData);
643
629
@@ -654,13 +640,6 @@ Player::Load()
654
640
iDrawDistanceBeforeTargetsPixels);
655
641
}
656
642
657
- // set this in Update
658
- // m_pJudgment->SetX( JUDGMENT_X.GetValue(pn,bPlayerUsingBothSides) );
659
- // m_pJudgment->SetY( bReverse ? JUDGMENT_Y_REVERSE : JUDGMENT_Y );
660
-
661
- // Need to set Y positions of all these elements in Update since
662
- // they change depending on PlayerOptions.
663
-
664
643
// Load keysounds. If sounds are already loaded (as in the editor), don't
665
644
// reload them.
666
645
// XXX: the editor will load several duplicate copies (in each NoteField),
@@ -669,14 +648,15 @@ Player::Load()
669
648
// ScreenGameplay::m_pSoundMusic and ScreenEdit::m_pSoundMusic?) We don't
670
649
// have to load separate copies to set player fade: always make a copy, and
671
650
// set the fade on the copy.
651
+ const Song* pSong = GAMESTATE->m_pCurSong ;
672
652
std::string sSongDir = pSong->GetSongDir ();
673
653
m_vKeysounds.resize (pSong->m_vsKeysoundFile .size ());
674
654
675
655
// parameters are invalid somehow... -aj
676
656
RageSoundLoadParams SoundParams;
677
657
SoundParams.m_bSupportPan = true ;
678
658
679
- float fBalance = GameSoundManager::GetPlayerBalance (pn );
659
+ float fBalance = GameSoundManager::GetPlayerBalance (PLAYER_1 );
680
660
for (unsigned i = 0 ; i < m_vKeysounds.size (); i++) {
681
661
std::string sKeysoundFilePath = sSongDir + pSong->m_vsKeysoundFile [i];
682
662
RageSound& sound = m_vKeysounds[i];
@@ -690,11 +670,6 @@ Player::Load()
690
670
SendComboMessages (m_pPlayerStageStats->m_iCurCombo ,
691
671
m_pPlayerStageStats->m_iCurMissCombo );
692
672
693
- // If we are in a replay, attempt to load the real tapper stuff
694
- if (GamePreferences::m_AutoPlay == PC_REPLAY) {
695
- PlayerAI::SetUpExactTapMap (m_Timing);
696
- }
697
-
698
673
SAFE_DELETE (m_pIterNeedsTapJudging);
699
674
m_pIterNeedsTapJudging = new NoteData::all_tracks_iterator (
700
675
m_NoteData.GetTapNoteRangeAllTracks (iNoteRow, MAX_NOTE_ROW));
@@ -1107,39 +1082,6 @@ Player::UpdateHoldNotes(int iSongRow,
1107
1082
return ; // we don't need to update the logic for this group
1108
1083
}
1109
1084
1110
- if (GamePreferences::m_AutoPlay == PC_REPLAY) {
1111
- FOREACH (TrackRowTapNote, vTN, trtn)
1112
- {
1113
- TapNote& tn = *trtn->pTN ;
1114
-
1115
- // check from now until the head of the hold to see if it should die
1116
- // possibly really bad, but we dont REALLY care that much about fps
1117
- // in replays, right?
1118
- bool holdDropped = false ;
1119
- for (int yeet = vTN[0 ].iRow ; yeet <= iSongRow && !holdDropped;
1120
- yeet++) {
1121
- if (PlayerAI::DetermineIfHoldDropped (yeet, trtn->iTrack )) {
1122
- holdDropped = true ;
1123
- }
1124
- }
1125
-
1126
- if (holdDropped) // it should be dead
1127
- {
1128
- tn.HoldResult .bHeld = false ;
1129
- tn.HoldResult .bActive = false ;
1130
- tn.HoldResult .fLife = 0 .f ;
1131
- tn.HoldResult .hns = HNS_LetGo;
1132
-
1133
- // score the dead hold
1134
- if (COMBO_BREAK_ON_IMMEDIATE_HOLD_LET_GO)
1135
- IncrementMissCombo ();
1136
- SetHoldJudgment (tn, iFirstTrackWithMaxEndRow, iSongRow);
1137
- HandleHoldScore (tn);
1138
- return ;
1139
- }
1140
- }
1141
- }
1142
-
1143
1085
// LOG->Trace("hold note doesn't already have result, let's check.");
1144
1086
1145
1087
// LOG->Trace( ssprintf("[C++] hold note score:
@@ -1202,9 +1144,6 @@ Player::UpdateHoldNotes(int iSongRow,
1202
1144
(iStartRow + trtn->pTN ->iDuration ) > iSongRow) {
1203
1145
int iTrack = trtn->iTrack ;
1204
1146
1205
- // TODO: Remove use of PlayerNumber.
1206
- PlayerNumber pn = m_pPlayerState->m_PlayerNumber ;
1207
-
1208
1147
if (m_pPlayerState->m_PlayerController != PC_HUMAN) {
1209
1148
// TODO: Make the CPU miss sometimes.
1210
1149
if (m_pPlayerState->m_PlayerController == PC_AUTOPLAY) {
@@ -1217,7 +1156,7 @@ Player::UpdateHoldNotes(int iSongRow,
1217
1156
} else {
1218
1157
vector<GameInput> GameI;
1219
1158
GAMESTATE->GetCurrentStyle (GetPlayerState ()->m_PlayerNumber )
1220
- ->StyleInputToGameInput (iTrack, pn , GameI);
1159
+ ->StyleInputToGameInput (iTrack, PLAYER_1 , GameI);
1221
1160
1222
1161
bIsHoldingButton &=
1223
1162
INPUTMAPPER->IsBeingPressed (GameI, m_pPlayerState->m_mp );
@@ -2529,9 +2468,7 @@ Player::CrossedRows(int iLastRowCrossed,
2529
2468
tn.type != TapNoteType_AutoKeysound &&
2530
2469
tn.result .tns == TNS_None &&
2531
2470
this ->m_Timing ->IsJudgableAtRow (iRow)) {
2532
- if ((m_pPlayerState->m_PlayerController == PC_REPLAY &&
2533
- PlayerAI::GetReplayType () != 2 ) ||
2534
- m_pPlayerState->m_PlayerController == PC_AUTOPLAY ||
2471
+ if (m_pPlayerState->m_PlayerController == PC_AUTOPLAY ||
2535
2472
m_pPlayerState->m_PlayerController == PC_CPU) {
2536
2473
Step (iTrack, iRow, now, false , false );
2537
2474
if (m_pPlayerState->m_PlayerController == PC_AUTOPLAY ||
@@ -2562,8 +2499,7 @@ Player::CrossedRows(int iLastRowCrossed,
2562
2499
/* Update hold checkpoints
2563
2500
*
2564
2501
* TODO: Move this to a separate function. */
2565
- if (m_bTickHolds && m_pPlayerState->m_PlayerController != PC_AUTOPLAY &&
2566
- m_pPlayerState->m_PlayerController != PC_REPLAY) {
2502
+ if (m_bTickHolds && m_pPlayerState->m_PlayerController == PC_HUMAN) {
2567
2503
// Few rows typically cross per update. Easier to check all crossed rows
2568
2504
// than to calculate from timing segments.
2569
2505
for (int r = m_iFirstUncrossedRow; r <= iLastRowCrossed; ++r) {
@@ -3255,7 +3191,8 @@ Player::SetHoldJudgment(TapNote& tn, int iTrack, int iRow)
3255
3191
m_pPlayerStageStats->m_fWifeScore = curwifescore / totalwifescore;
3256
3192
ChangeWifeRecord ();
3257
3193
#else
3258
- if (m_pPlayerState->m_PlayerController == PC_HUMAN) {
3194
+ if (m_pPlayerState->m_PlayerController == PC_HUMAN ||
3195
+ m_pPlayerState->m_PlayerController == PC_REPLAY) {
3259
3196
m_pPlayerStageStats->m_fWifeScore =
3260
3197
curwifescore / totalwifescore;
3261
3198
m_pPlayerStageStats->CurWifeScore = curwifescore;
0 commit comments