Skip to content

Commit

Permalink
penalties are negative, add them
Browse files Browse the repository at this point in the history
  • Loading branch information
MinaciousGrace committed May 7, 2020
1 parent 64b34f1 commit bbdd278
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Etterna/Models/Misc/PlayerAI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ PlayerAI::SetUpSnapshotMap(NoteData* pNoteData,
// if we somehow skipped a snapshot, the only difference should be
// in misses and non taps
ReplaySnapshot* rs = &m_ReplaySnapshotMap[snapShotsUnused.front()];
rs->curwifescore = cws - (rs->judgments[TNS_Miss] * wife3_miss_weight) -
rs->curwifescore = cws + (rs->judgments[TNS_Miss] * wife3_miss_weight) +
((rs->hns[HNS_Missed] + rs->hns[HNS_LetGo]) * wife3_hold_drop_weight);
rs->maxwifescore = mws + (rs->judgments[TNS_Miss] * 2.f);
snapShotsUnused.erase(snapShotsUnused.begin());
Expand All @@ -574,13 +574,13 @@ PlayerAI::SetUpSnapshotMap(NoteData* pNoteData,
auto rs = GetReplaySnapshotForNoterow(r);
for (auto& trr : it->second) {
if (trr.type == TapNoteType_Mine) {
cws -= wife3_mine_hit_weight;
cws += wife3_mine_hit_weight;
} else {
cws += wife3(trr.offset, timingScale);
mws += 2.f;
}
}
rs->curwifescore = cws - (rs->judgments[TNS_Miss] * wife3_miss_weight) -
rs->curwifescore = cws + (rs->judgments[TNS_Miss] * wife3_miss_weight) +
((rs->hns[HNS_Missed] + rs->hns[HNS_LetGo]) * wife3_hold_drop_weight);
rs->maxwifescore = mws + (rs->judgments[TNS_Miss] * 2.f);

Expand Down Expand Up @@ -1048,18 +1048,18 @@ PlayerAI::GetWifeScoreForRow(int row, float ts)
it++) {
for (auto& trr : it->second) {
if (trr.type == TapNoteType_Mine) {
out.first -= 8.f;
out.first += wife3_mine_hit_weight;
} else {
out.first += wife2(trr.offset, ts);
out.first += wife3(trr.offset, ts);
out.second += 2.f;
}
}
}

// Take into account dropped holds and full misses
auto rs = GetReplaySnapshotForNoterow(row);
out.first += rs->judgments[TNS_Miss] * -8.f;
out.first += rs->hns[HNS_LetGo] * -8.f;
out.first += rs->judgments[TNS_Miss] * wife3_miss_weight;
out.first += rs->hns[HNS_LetGo] * wife3_hold_drop_weight;
out.second += rs->judgments[TNS_Miss] * 2.f;

return out;
Expand Down

0 comments on commit bbdd278

Please sign in to comment.