mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 10:28:26 +00:00
remove some warnings & TODOs
This commit is contained in:
parent
2ef8407292
commit
22c9e50ed7
@ -46,7 +46,6 @@ enum
|
||||
Migration_Lowercase_startpositions,
|
||||
Migration_AddPlayertimesPointsCalcedFrom, // points calculated from wr float added to playertimes
|
||||
Migration_RemovePlayertimesPointsCalcedFrom, // lol
|
||||
// TODO: Add alter tables playertimes modify column blah after blah
|
||||
MIGRATIONS_END
|
||||
};
|
||||
|
||||
|
||||
@ -68,38 +68,6 @@ enum
|
||||
Require_WR_Rank,
|
||||
}
|
||||
|
||||
// percent, ranged, Require_*
|
||||
char gA_ChatRankMenuFormatStrings[2][2][4][] = {
|
||||
{
|
||||
{
|
||||
"ChatRanksMenu_Flat",
|
||||
"ChatRanksMenu_Points",
|
||||
"ChatRanksMenu_WR_Count",
|
||||
"ChatRanksMenu_WR_Rank",
|
||||
},
|
||||
{
|
||||
"ChatRanksMenu_Flat_Ranged",
|
||||
"ChatRanksMenu_Points_Ranged",
|
||||
"ChatRanksMenu_WR_Count_Ranged",
|
||||
"ChatRanksMenu_WR_Rank_Ranged",
|
||||
}
|
||||
},
|
||||
{
|
||||
{
|
||||
"ChatRanksMenu_Percentage",
|
||||
"",
|
||||
"",
|
||||
"ChatRanksMenu_WR_Rank_Percentage",
|
||||
},
|
||||
{
|
||||
"ChatRanksMenu_Percentage_Ranged",
|
||||
"",
|
||||
"",
|
||||
"ChatRanksMenu_WR_Rank_Ranged",
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#pragma newdecls required
|
||||
#pragma semicolon 1
|
||||
|
||||
@ -922,34 +890,7 @@ Action ShowChatRanksMenu(int client, int item)
|
||||
}
|
||||
|
||||
char sMenuDisplay[MAXLENGTH_DISPLAY];
|
||||
|
||||
#if 0
|
||||
char sRequirements[64];
|
||||
|
||||
if(!cache.bFree)
|
||||
{
|
||||
if(cache.fFrom == 0.0 && cache.fTo == 0.0)
|
||||
{
|
||||
FormatEx(sRequirements, 64, "%T", "ChatRanksMenu_Unranked", client);
|
||||
}
|
||||
else
|
||||
{
|
||||
char sTranslation[64];
|
||||
strcopy(sTranslation, sizeof(sTranslation), gA_ChatRankMenuFormatStrings[cache.bPercent?1:0][cache.bRanged?1:0][cache.iRequire]);
|
||||
|
||||
if (!cache.bRanged && !cache.bPercent && cache.fFrom == 1.0)
|
||||
{
|
||||
StrCat(sTranslation, sizeof(sTranslation), "_1");
|
||||
}
|
||||
|
||||
FormatEx(sRequirements, 64, "%T", sTranslation, client, cache.fFrom, cache.fTo, '%', '%');
|
||||
}
|
||||
}
|
||||
|
||||
FormatEx(sMenuDisplay, sizeof(sMenuDisplay), "%s\n%s\n ", cache.sDisplay, sRequirements);
|
||||
#else
|
||||
FormatEx(sMenuDisplay, sizeof(sMenuDisplay), "%s\n ", cache.sDisplay);
|
||||
#endif
|
||||
|
||||
char sInfo[8];
|
||||
IntToString(i, sInfo, 8);
|
||||
@ -957,7 +898,7 @@ Action ShowChatRanksMenu(int client, int item)
|
||||
menu.AddItem(sInfo, sMenuDisplay);
|
||||
}
|
||||
|
||||
//menu.Pagination = 4; // 4 items per page because too menus have a 512 byte limit...
|
||||
menu.Pagination = 4; // 4 items per page because menus have a 512 byte limit...
|
||||
menu.ExitBackButton = true;
|
||||
menu.DisplayAt(client, item, MENU_TIME_FOREVER);
|
||||
|
||||
|
||||
@ -2210,7 +2210,6 @@ void UpdateKeyHint(int client)
|
||||
return;
|
||||
}
|
||||
|
||||
int track = bReplay ? Shavit_GetReplayBotTrack(target) : Shavit_GetClientTrack(target);
|
||||
int style = bReplay ? Shavit_GetReplayBotStyle(target) : Shavit_GetBhopStyle(target);
|
||||
|
||||
if(!(0 <= style < gI_Styles))
|
||||
|
||||
@ -139,7 +139,6 @@ bool gB_Checkpoints = false;
|
||||
bool gB_Eventqueuefix = false;
|
||||
bool gB_Rankings = false;
|
||||
bool gB_ReplayPlayback = false;
|
||||
bool gB_Zones = false;
|
||||
bool gB_Chat = false;
|
||||
|
||||
// timer settings
|
||||
@ -311,7 +310,6 @@ public void OnPluginStart()
|
||||
gB_Eventqueuefix = LibraryExists("eventqueuefix");
|
||||
gB_Rankings = LibraryExists("shavit-rankings");
|
||||
gB_ReplayPlayback = LibraryExists("shavit-replay-playback");
|
||||
gB_Zones = LibraryExists("shavit-zones");
|
||||
gB_Chat = LibraryExists("shavit-chat");
|
||||
}
|
||||
|
||||
@ -655,10 +653,6 @@ public void OnLibraryAdded(const char[] name)
|
||||
{
|
||||
gB_ReplayPlayback = true;
|
||||
}
|
||||
else if(StrEqual(name, "shavit-zones"))
|
||||
{
|
||||
gB_Zones = true;
|
||||
}
|
||||
else if(StrEqual(name, "shavit-chat"))
|
||||
{
|
||||
gB_Chat = true;
|
||||
@ -683,10 +677,6 @@ public void OnLibraryRemoved(const char[] name)
|
||||
{
|
||||
gB_ReplayPlayback = false;
|
||||
}
|
||||
else if(StrEqual(name, "shavit-zones"))
|
||||
{
|
||||
gB_Zones = false;
|
||||
}
|
||||
else if(StrEqual(name, "shavit-chat"))
|
||||
{
|
||||
gB_Chat = false;
|
||||
|
||||
@ -377,7 +377,7 @@ void DoReplaySaverCallbacks(int iSteamID, int client, int style, float time, int
|
||||
int postframes = gI_PlayerFrames[client] - gI_PlayerFinishFrame[client];
|
||||
|
||||
char sPath[PLATFORM_MAX_PATH];
|
||||
SaveReplay(style, track, time, iSteamID, sName, gI_PlayerPrerunFrames[client], gA_PlayerFrames[client], gI_PlayerFrames[client], postframes, timestamp, fZoneOffset, makeCopy, makeReplay, sPath, sizeof(sPath));
|
||||
SaveReplay(style, track, time, iSteamID, gI_PlayerPrerunFrames[client], gA_PlayerFrames[client], gI_PlayerFrames[client], postframes, timestamp, fZoneOffset, makeCopy, makeReplay, sPath, sizeof(sPath));
|
||||
|
||||
Call_StartForward(gH_OnReplaySaved);
|
||||
Call_PushCell(client);
|
||||
@ -446,7 +446,7 @@ public void Shavit_OnFinish(int client, int style, float time, int jumps, int st
|
||||
}
|
||||
}
|
||||
|
||||
void SaveReplay(int style, int track, float time, int steamid, char[] name, int preframes, ArrayList playerrecording, int iSize, int postframes, int timestamp, float fZoneOffset[2], bool saveCopy, bool saveWR, char[] sPath, int sPathLen)
|
||||
void SaveReplay(int style, int track, float time, int steamid, int preframes, ArrayList playerrecording, int iSize, int postframes, int timestamp, float fZoneOffset[2], bool saveCopy, bool saveWR, char[] sPath, int sPathLen)
|
||||
{
|
||||
char sTrack[4];
|
||||
FormatEx(sTrack, 4, "_%d", track);
|
||||
|
||||
@ -830,7 +830,6 @@ public void OpenStatsMenu_Mapchooser_Callback(Database db, DBResultSet results,
|
||||
|
||||
Action OpenStatsMenu_Main(int steamid, int style, DataPack data)
|
||||
{
|
||||
// big ass query, looking for optimizations TODO
|
||||
char sQuery[2048];
|
||||
|
||||
FormatEx(sQuery, sizeof(sQuery),
|
||||
|
||||
@ -80,90 +80,6 @@
|
||||
{
|
||||
"en" "Obtainable chat ranks:\nSelect an entry to preview.\n"
|
||||
}
|
||||
"ChatRanksMenu_Unranked"
|
||||
{
|
||||
"en" "Unranked"
|
||||
}
|
||||
"ChatRanksMenu_Points"
|
||||
{
|
||||
"#format" "{1:.0f}"
|
||||
"en" "Have {1} points"
|
||||
}
|
||||
"ChatRanksMenu_Points_1"
|
||||
{
|
||||
"#format" "{1:.0f}"
|
||||
"en" "Have {1} point"
|
||||
}
|
||||
"ChatRanksMenu_Points_Ranged"
|
||||
{
|
||||
"#format" "{1:.0f},{2:.0f}"
|
||||
"en" "Have between {1} and {2} points"
|
||||
}
|
||||
"ChatRanksMenu_Flat"
|
||||
{
|
||||
"#format" "{1:.0f}"
|
||||
"en" "Ranked #{1} or better"
|
||||
}
|
||||
"ChatRanksMenu_Flat_1"
|
||||
{
|
||||
"#format" "{1:.0f}"
|
||||
"en" "Ranked #{1}"
|
||||
}
|
||||
"ChatRanksMenu_Flat_Ranged"
|
||||
{
|
||||
"#format" "{1:.0f},{2:.0f}"
|
||||
"en" "Ranked between #{1} and #{2}"
|
||||
}
|
||||
"ChatRanksMenu_Percentage"
|
||||
{
|
||||
"#format" "{1:.1f},{2:.0f},{3:c}"
|
||||
"en" "Top {1}{3}"
|
||||
}
|
||||
"ChatRanksMenu_Percentage_Ranged"
|
||||
{
|
||||
"#format" "{1:.1f},{2:.1f},{3:c},{4:c}"
|
||||
"en" "Between top {1}{3} and {2}{4}"
|
||||
}
|
||||
"ChatRanksMenu_WR_Count"
|
||||
{
|
||||
"#format" "{1:.0f}"
|
||||
"en" "Have {1} WRs"
|
||||
}
|
||||
"ChatRanksMenu_WR_Count_1"
|
||||
{
|
||||
"#format" "{1:.0f}"
|
||||
"en" "Have {1} WR"
|
||||
}
|
||||
"ChatRanksMenu_WR_Count_Ranged"
|
||||
{
|
||||
"#format" "{1:.0f},{2:.0f}"
|
||||
"en" "Have between {1} and {2} WRs"
|
||||
}
|
||||
"ChatRanksMenu_WR_Rank"
|
||||
{
|
||||
"#format" "{1:.0f}"
|
||||
"en" "Ranked #{1} or better from WR holders"
|
||||
}
|
||||
"ChatRanksMenu_WR_Rank_1"
|
||||
{
|
||||
"#format" "{1:.0f}"
|
||||
"en" "Ranked #{1} out of WRs held"
|
||||
}
|
||||
"ChatRanksMenu_WR_Rank_Ranged"
|
||||
{
|
||||
"#format" "{1:.0f},{2:.0f}"
|
||||
"en" "Ranked between #{1} and #{2} out of WRs held"
|
||||
}
|
||||
"ChatRanksMenu_WR_Rank_Percentage"
|
||||
{
|
||||
"#format" "{1:.0f},{2:.0f},{3:c}"
|
||||
"en" "Top {1}{3} out of WRs held"
|
||||
}
|
||||
"ChatRanksMenu_WR_Rank_Percentage_Ranged"
|
||||
{
|
||||
"#format" "{1:.0f},{2:.0f},{3:c},{4:c}"
|
||||
"en" "Between Top {1}{3} and {2}{4} out of WRs held"
|
||||
}
|
||||
"ChatRanksMenu_SampleText"
|
||||
{
|
||||
"en" "The quick brown fox jumps over the lazy dog"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user