update for timer version 3.0.0
This commit is contained in:
parent
dc481b9518
commit
023fc15e14
3 changed files with 636 additions and 216 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,19 +112,6 @@ public void Shavit_OnChatConfigLoaded()
|
|||
Shavit_GetChatStrings(sMessageStyle, gS_ChatStrings.sStyle, sizeof(chatstrings_t::sStyle));
|
||||
}
|
||||
|
||||
public void Shavit_OnStyleConfigLoaded(int styles)
|
||||
{
|
||||
if (styles == -1)
|
||||
{
|
||||
styles = Shavit_GetStyleCount();
|
||||
}
|
||||
|
||||
for (int i; i < styles; i++)
|
||||
{
|
||||
Shavit_GetStyleSettings(i, gA_StyleSettings[i], sizeof(stylesettings_t));
|
||||
}
|
||||
}
|
||||
|
||||
public void Shavit_OnLeaveZone(int client, int zone, int track, int id, int entity)
|
||||
{
|
||||
if (IsClientInGame(client) && IsFakeClient(client))
|
||||
|
@ -143,7 +129,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)
|
||||
|
@ -316,7 +302,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)
|
||||
|
@ -402,14 +388,14 @@ public void Shavit_OnWorldRecord(int client, int style, float time, int jumps, i
|
|||
|
||||
public int CalculatePoints(int cvAmount, int style)
|
||||
{
|
||||
float fResult = (cvAmount * g_iTier) * gA_StyleSettings[style].fRankingMultiplier;
|
||||
float fResult = (cvAmount * g_iTier) * Shavit_GetStyleSettingFloat(style, "rankingmultiplier");
|
||||
int iRoundResult = RoundFloat(fResult);
|
||||
return iRoundResult;
|
||||
}
|
||||
|
||||
public int CalculatePointsBonus(int cvAmount, int style)
|
||||
{
|
||||
float fResult = cvAmount * gA_StyleSettings[style].fRankingMultiplier;
|
||||
float fResult = cvAmount * Shavit_GetStyleSettingFloat(style, "rankingmultiplier");
|
||||
int iRoundResult = RoundFloat(fResult);
|
||||
return iRoundResult;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue