Skip to content

Commit

Permalink
Merge pull request #1 from ppy/master
Browse files Browse the repository at this point in the history
Merge with master
  • Loading branch information
MillhioreF committed Mar 8, 2018
2 parents 10d79d8 + ffef8c0 commit 77da1ba
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 19 deletions.
3 changes: 2 additions & 1 deletion Src/Processor/Processor.cpp
Expand Up @@ -418,7 +418,8 @@ void CProcessor::PollAndProcessNewBeatmapSets()
void CProcessor::ProcessAllScores(bool reProcess)
{
// We have one connection per thread, so let's use quite a lot of them.
static const u32 AMOUNT_THREADS = 32;
// Temporarily limited to one thread maximum to reduce database (slave) load.
static const u32 AMOUNT_THREADS = 1;

CThreadPool threadPool{AMOUNT_THREADS};
std::vector<std::shared_ptr<CDatabaseConnection>> databaseConnections;
Expand Down
2 changes: 1 addition & 1 deletion Src/Processor/SharedEnums.h
Expand Up @@ -8,7 +8,7 @@ namespace SharedEnums
None = 0,
NoFail = 1 << 0,
Easy = 1 << 1,
//NoVideo = 1 << 2,
TouchDevice = 1 << 2,
Hidden = 1 << 3,
HardRock = 1 << 4,
SuddenDeath = 1 << 5,
Expand Down
7 changes: 6 additions & 1 deletion Src/Processor/Standard/StandardScore.cpp
Expand Up @@ -93,7 +93,12 @@ void CStandardScore::ComputeTotalValue()

void CStandardScore::ComputeAimValue(const CBeatmap& beatmap)
{
_aimValue = pow(5.0f * std::max(1.0f, beatmap.DifficultyAttribute(_mods, CBeatmap::Aim) / 0.0675f) - 4.0f, 3.0f) / 100000.0f;
f32 rawAim = beatmap.DifficultyAttribute(_mods, CBeatmap::Aim);

if((_mods & EMods::TouchDevice) > 0)
rawAim = pow(rawAim, 0.8f);

_aimValue = pow(5.0f * std::max(1.0f, rawAim / 0.0675f) - 4.0f, 3.0f) / 100000.0f;

int amountTotalHits = TotalHits();

Expand Down
17 changes: 1 addition & 16 deletions Src/Processor/Taiko/TaikoScore.cpp
@@ -1,14 +1,10 @@
#include <PrecompiledHeader.h>


#include "SharedEnums.h"
#include "TaikoScore.h"


using namespace SharedEnums;



CTaikoScore::CTaikoScore(
s64 scoreId,
EGamemode mode,
Expand All @@ -32,13 +28,11 @@ CTaikoScore::CTaikoScore(
ComputeTotalValue();
}


f32 CTaikoScore::TotalValue() const
{
return _totalValue;
}


void CTaikoScore::ComputeTotalValue()
{
// Don't count scores made with supposedly unranked mods
Expand All @@ -50,7 +44,6 @@ void CTaikoScore::ComputeTotalValue()
return;
}


// Custom multipliers for NoFail and SpunOut.
f32 multiplier = 1.1f; // This is being adjusted to keep the final pp value scaled around what it used to be when changing things

Expand All @@ -59,11 +52,6 @@ void CTaikoScore::ComputeTotalValue()
multiplier *= 0.90f;
}

if((_mods & EMods::SpunOut) > 0)
{
multiplier *= 0.95f;
}

if((_mods & EMods::Hidden) > 0)
{
multiplier *= 1.10f;
Expand Down Expand Up @@ -121,15 +109,12 @@ void CTaikoScore::ComputeAccValue(const CBeatmap& beatmap)

// Lots of arbitrary values from testing.
// Considering to use derivation from perfect accuracy in a probabilistic manner - assume normal distribution
_accValue =
pow(150.0f / hitWindow300, 1.1f) * pow(Accuracy(), 15) * 22.0f;
_accValue = pow(150.0f / hitWindow300, 1.1f) * pow(Accuracy(), 15) * 22.0f;

// Bonus for many hitcircles - it's harder to keep good accuracy up for longer
_accValue *= std::min<f32>(1.15f, pow(static_cast<f32>(TotalHits()) / 1500.0f, 0.3f));
}



f32 CTaikoScore::Accuracy() const
{
if(TotalHits() == 0)
Expand Down

0 comments on commit 77da1ba

Please sign in to comment.