Revert Top10 Changes
This commit is contained in:
parent
9ff98c8502
commit
424fb8e4ea
2 changed files with 0 additions and 99 deletions
|
@ -254,65 +254,6 @@ public void Shavit_OnFinish(int client, int style, float time, int jumps, int st
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (g_cvTop10Enabled.BoolValue == true) {
|
||||
int place;
|
||||
place = Shavit_GetRankForTime(style, time, track);
|
||||
|
||||
if (place <= 10) {
|
||||
if(g_iCompletions[client] == 0) {
|
||||
int iCredits;
|
||||
if (g_cvNewCalc.BoolValue == true) {
|
||||
iCredits = CalculatePointsTop10(g_cvTop10Amount.IntValue, style, place);
|
||||
} else {
|
||||
float fCredits = (g_cvTop10Amount.IntValue / place);
|
||||
iCredits = RoundFloat(fCredits);
|
||||
}
|
||||
|
||||
MyStore_SetClientCredits(client, MyStore_GetClientCredits(client) + iCredits, "Top10 Finish");
|
||||
Shavit_PrintToChat(client, "%t", "NormalTop10", gS_ChatStrings.sVariable, iCredits, gS_ChatStrings.sText);
|
||||
} else if (g_iCompletions[client] >= 1){
|
||||
int iCredits;
|
||||
if (g_cvNewCalc.BoolValue == true) {
|
||||
iCredits = CalculatePointsTop10(g_cvTop10AmountAgain.IntValue, style, place);
|
||||
} else {
|
||||
float fCredits = (g_cvTop10AmountAgain.IntValue / place);
|
||||
iCredits = RoundFloat(fCredits);
|
||||
}
|
||||
MyStore_SetClientCredits(client, MyStore_GetClientCredits(client) + iCredits, "Top10 Finish Again");
|
||||
Shavit_PrintToChat(client, "%t", "NormalTop10Again", gS_ChatStrings.sVariable, iCredits, gS_ChatStrings.sText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (g_cvBonusTop10Enabled.BoolValue == true) {
|
||||
int place;
|
||||
place = Shavit_GetRankForTime(style, time, track);
|
||||
|
||||
if (place <= 10) {
|
||||
if(g_iCompletions[client] == 0) {
|
||||
int iCredits;
|
||||
if (g_cvNewCalc.BoolValue == true) {
|
||||
iCredits = CalculatePointsTop10Bonus(g_cvBonusTop10Amount.IntValue, style, place);
|
||||
} else {
|
||||
float fCredits = (g_cvBonusTop10Amount.IntValue / place);
|
||||
iCredits = RoundFloat(fCredits);
|
||||
}
|
||||
MyStore_SetClientCredits(client, MyStore_GetClientCredits(client) + iCredits, "Bonus Top10 Finish");
|
||||
Shavit_PrintToChat(client, "%t", "BonusTop10", gS_ChatStrings.sVariable, iCredits, gS_ChatStrings.sText);
|
||||
} else if (g_iCompletions[client] >= 1){
|
||||
int iCredits;
|
||||
if (g_cvNewCalc.BoolValue == true) {
|
||||
iCredits = CalculatePointsTop10Bonus(g_cvBonusTop10AmountAgain.IntValue, style, place);
|
||||
} else {
|
||||
float fCredits = (g_cvBonusTop10AmountAgain.IntValue / place);
|
||||
iCredits = RoundFloat(fCredits);
|
||||
}
|
||||
MyStore_SetClientCredits(client, MyStore_GetClientCredits(client) + iCredits, "Bonus Top10 Finish Again");
|
||||
Shavit_PrintToChat(client, "%t", "BonusTop10Again", gS_ChatStrings.sVariable, iCredits, gS_ChatStrings.sText);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Shavit_OnWorldRecord(int client, int style, float time, int jumps, int strafes, float sync, int track) {
|
||||
|
@ -391,24 +332,4 @@ public int CalculatePointsBonus(int cvAmount, int style) {
|
|||
float fResult = cvAmount * Shavit_GetStyleSettingFloat(style, "rankingmultiplier");
|
||||
int iRoundResult = RoundFloat(fResult);
|
||||
return iRoundResult;
|
||||
}
|
||||
|
||||
public int CalculatePointsTop10(int cvAmount, int style, int place) {
|
||||
float fResult = cvAmount * Shavit_GetStyleSettingFloat(style, "rankingmultiplier");
|
||||
float fResult1 = fResult - ((cvAmount - place) * tier);
|
||||
int iRoundResult = RoundFloat(fResult1);
|
||||
if (iRoundResult == 0){
|
||||
iRoundResult=iRoundResult+1;
|
||||
}
|
||||
return iRoundResult;
|
||||
}
|
||||
|
||||
public int CalculatePointsTop10Bonus(int cvAmount, int style, int place) {
|
||||
float fResult = cvAmount * Shavit_GetStyleSettingFloat(style, "rankingmultiplier");
|
||||
float fResult1 = fResult - (cvAmount - place);
|
||||
int iRoundResult = RoundFloat(fResult1);
|
||||
if (iRoundResult == 0){
|
||||
iRoundResult=iRoundResult+1;
|
||||
}
|
||||
return iRoundResult;
|
||||
}
|
|
@ -40,26 +40,6 @@
|
|||
"#format" "{1:s},{2:d},{3:s}"
|
||||
"en" "You have earned {1}{2}{3} credits for breaking your bonus Personal Best again."
|
||||
}
|
||||
"NormalTop10"
|
||||
{
|
||||
"#format" "{1:s},{2:d},{3:s}"
|
||||
"en" "You have earned {1}{2}{3} credits for being in Top 10."
|
||||
}
|
||||
"NormalTop10Again"
|
||||
{
|
||||
"#format" "{1:s},{2:d},{3:s}"
|
||||
"en" "You have earned {1}{2}{3} credits for being in Top 10 again."
|
||||
}
|
||||
"BonusTop10"
|
||||
{
|
||||
"#format" "{1:s},{2:d},{3:s}"
|
||||
"en" "You have earned {1}{2}{3} credits for being in The Bonus Top 10."
|
||||
}
|
||||
"BonusTop10Again"
|
||||
{
|
||||
"#format" "{1:s},{2:d},{3:s}"
|
||||
"en" "You have earned {1}{2}{3} credits for being in the Bonus Top 10 again."
|
||||
}
|
||||
"WorldRecord"
|
||||
{
|
||||
"#format" "{1:s},{2:d},{3:s}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue