Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
Revert "Merge pull request #175 from smoogipoo/vunyunt-stamina-availa…
Browse files Browse the repository at this point in the history
…ble-fingers"

This reverts commit 3d40335, reversing
changes made to b089a57.
  • Loading branch information
peppy committed Mar 19, 2024
1 parent 8d10ac6 commit 4fb8b97
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
7 changes: 0 additions & 7 deletions include/pp/performance/Beatmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class Beatmap
s32 NumSliders() const { return _numSliders; }
s32 NumSpinners() const { return _numSpinners; }
f32 DifficultyAttribute(EMods mods, EDifficultyAttributeType type) const;
EGamemode PlayMode() const { return _playmode; }

void SetRankedStatus(ERankedStatus rankedStatus) { _rankedStatus = rankedStatus; }
void SetScoreVersion(EScoreVersion scoreVersion) { _scoreVersion = scoreVersion; }
Expand All @@ -61,7 +60,6 @@ class Beatmap
void SetNumSpinners(s32 numSpinners) { _numSpinners = numSpinners; }
void SetDifficultyAttribute(EMods mods, EDifficultyAttributeType type, f32 value);
void SetMode(EGamemode mode) { _mode = mode; }
void SetPlayMode(EGamemode mode) { _playmode = mode; }

static bool ContainsAttribute(const std::string &difficultyAttributeName)
{
Expand All @@ -78,13 +76,8 @@ class Beatmap

// General information
s32 _id;

// The mode being processed. NOT the beatmap's playmode!
EGamemode _mode = EGamemode::Osu;

// The beatmap's playmode. This may differ from the mode currently being processed in the case of converted beatmaps.
EGamemode _playmode = EGamemode::Osu;

// Calculated difficulty
using difficulty_t = std::unordered_map<
std::underlying_type_t<EMods>,
Expand Down
3 changes: 1 addition & 2 deletions src/performance/Processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ void Processor::queryAllBeatmapDifficulties(u32 numThreads)
bool Processor::queryBeatmapDifficulty(DatabaseConnection& dbSlave, s32 startId, s32 endId)
{
std::string query = StrFormat(
"SELECT `osu_beatmaps`.`beatmap_id`,`countNormal`,`mods`,`attrib_id`,`value`,`approved`,`score_version`, `countSpinner`, `countSlider`,`playmode` "
"SELECT `osu_beatmaps`.`beatmap_id`,`countNormal`,`mods`,`attrib_id`,`value`,`approved`,`score_version`, `countSpinner`, `countSlider` "
"FROM `osu_beatmaps` "
"JOIN `osu_beatmap_difficulty_attribs` ON `osu_beatmaps`.`beatmap_id` = `osu_beatmap_difficulty_attribs`.`beatmap_id` "
"WHERE (`osu_beatmaps`.`playmode`=0 OR `osu_beatmaps`.`playmode`={0}) AND `osu_beatmap_difficulty_attribs`.`mode`={0} AND `approved` BETWEEN {1} AND {2}",
Expand Down Expand Up @@ -660,7 +660,6 @@ bool Processor::queryBeatmapDifficulty(DatabaseConnection& dbSlave, s32 startId,
beatmap.SetDifficultyAttribute(res[2], _difficultyAttributes[attribId], res[4]);

beatmap.SetMode(_gamemode);
beatmap.SetPlayMode(res[9]);
}

if (endId != 0) {
Expand Down
8 changes: 4 additions & 4 deletions src/performance/taiko/TaikoScore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ void TaikoScore::computeDifficultyValue(const Beatmap &beatmap)
if ((_mods & EMods::Easy) > 0)
_difficultyValue *= 0.985f;

if ((_mods & EMods::Hidden) > 0 && beatmap.PlayMode() == EGamemode::Taiko)
if ((_mods & EMods::Hidden) > 0)
_difficultyValue *= 1.025f;

if ((_mods & EMods::HardRock) > 0)
Expand All @@ -99,9 +99,9 @@ void TaikoScore::computeAccuracyValue(const Beatmap &beatmap)
f32 lengthBonus = std::min(1.15f, std::pow(static_cast<f32>(TotalHits()) / 1500.0f, 0.3f));
_accuracyValue *= lengthBonus;

// Slight HDFL Bonus for accuracy. A clamp is used to prevent against negative values.
if ((_mods & (EMods::Hidden | EMods::Flashlight)) == (EMods::Hidden | EMods::Flashlight) && beatmap.PlayMode() == EGamemode::Taiko)
_accuracyValue *= std::max(1.0f, 1.1f * lengthBonus);
// Slight HDFL Bonus for accuracy. A clamp is used to prevent against negative values
if ((_mods & (EMods::Hidden | EMods::Flashlight)) == (EMods::Hidden | EMods::Flashlight))
_accuracyValue *= std::max(1.050f, 1.075f * lengthBonus);
}

f32 TaikoScore::Accuracy() const
Expand Down

0 comments on commit 4fb8b97

Please sign in to comment.