updated the plugin for timer Version 3.0.0
This commit is contained in:
parent
3987cceccf
commit
f73038f587
3 changed files with 638 additions and 213 deletions
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
@ -6,9 +6,8 @@
|
|||
#pragma semicolon 1
|
||||
#pragma newdecls required
|
||||
|
||||
#define PLUGIN_VERSION "1.4.6"
|
||||
#define PLUGIN_VERSION "1.4.7"
|
||||
chatstrings_t gS_ChatStrings;
|
||||
stylesettings_t gA_StyleSettings[STYLE_LIMIT];
|
||||
|
||||
public Plugin myinfo =
|
||||
{
|
||||
|
@ -113,17 +112,9 @@ public void Shavit_OnChatConfigLoaded()
|
|||
Shavit_GetChatStrings(sMessageStyle, gS_ChatStrings.sStyle, sizeof(chatstrings_t::sStyle));
|
||||
}
|
||||
|
||||
public void Shavit_OnStyleConfigLoaded(int styles)
|
||||
public void Shavit_OnTierAssigned(const char[] map, int tier)
|
||||
{
|
||||
if (styles == -1)
|
||||
{
|
||||
styles = Shavit_GetStyleCount();
|
||||
}
|
||||
|
||||
for (int i; i < styles; i++)
|
||||
{
|
||||
Shavit_GetStyleSettings(i, gA_StyleSettings[i], sizeof(stylesettings_t));
|
||||
}
|
||||
g_iTier = tier;
|
||||
}
|
||||
|
||||
public void Shavit_OnLeaveZone(int client, int zone, int track, int id, int entity)
|
||||
|
@ -143,7 +134,7 @@ public void Shavit_OnFinish(int client, int style, float time, int jumps, int st
|
|||
char sStyleSpecialString[sizeof(stylestrings_t::sSpecialString)];
|
||||
Shavit_GetStyleStrings(style, sSpecialString, sStyleSpecialString, sizeof(sStyleSpecialString));
|
||||
|
||||
if (StrContains(sStyleSpecialString, "segments") != -1 || gA_StyleSettings[style].bUnranked == true || Shavit_IsPracticeMode(client) == true)
|
||||
if (StrContains(sStyleSpecialString, "segments") != -1 || Shavit_GetStyleSettingBool(style,"unranked") == true || Shavit_IsPracticeMode(client) == true)
|
||||
return;
|
||||
|
||||
if (!g_cvTasEnabled.BoolValue)
|
||||
|
@ -322,7 +313,7 @@ public void Shavit_OnWorldRecord(int client, int style, float time, int jumps, i
|
|||
char sStyleSpecialString[sizeof(stylestrings_t::sSpecialString)];
|
||||
Shavit_GetStyleStrings(style, sSpecialString, sStyleSpecialString, sizeof(sStyleSpecialString));
|
||||
|
||||
if (StrContains(sStyleSpecialString, "segments") != -1 || gA_StyleSettings[style].bUnranked == true || Shavit_IsPracticeMode(client) == true)
|
||||
if (StrContains(sStyleSpecialString, "segments") != -1 || Shavit_GetStyleSettingBool(style,"unranked") == true || Shavit_IsPracticeMode(client) == true)
|
||||
return;
|
||||
|
||||
if (!g_cvTasEnabled.BoolValue)
|
||||
|
@ -415,7 +406,7 @@ public void Shavit_OnWorldRecord(int client, int style, float time, int jumps, i
|
|||
|
||||
public int CalculatePoints(int cvAmount, int style)
|
||||
{
|
||||
float fRankingMultiplier = gA_StyleSettings[style].fRankingMultiplier;
|
||||
float fRankingMultiplier = Shavit_GetStyleSettingFloat(style, "rankingmultiplier");
|
||||
float fResult = (cvAmount * g_iTier) * fRankingMultiplier;
|
||||
int iRoundResult = RoundFloat(fResult);
|
||||
return iRoundResult;
|
||||
|
@ -423,7 +414,7 @@ public int CalculatePoints(int cvAmount, int style)
|
|||
|
||||
public int CalculatePointsBonus(int cvAmount, int style)
|
||||
{
|
||||
float fRankingMultiplier = gA_StyleSettings[style].fRankingMultiplier;
|
||||
float fRankingMultiplier = Shavit_GetStyleSettingFloat(style, "rankingmultiplier");
|
||||
float fResult = cvAmount * fRankingMultiplier;
|
||||
int iRoundResult = RoundFloat(fResult);
|
||||
return iRoundResult;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue