mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-06 18:08:26 +00:00
Compare commits
4 Commits
d732cdeb8e
...
e57dd2ba74
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e57dd2ba74 | ||
|
|
21a7b58c82 | ||
|
|
133c4e5b12 | ||
|
|
feeb1f4df1 |
@ -42,6 +42,7 @@
|
||||
#define HUD_GLOCK (1 << 14) // makes you spawn with a Glock
|
||||
#define HUD_DEBUGTARGETNAME (1 << 15) // admin option to show current targetname & classname
|
||||
#define HUD_SPECTATORSDEAD (1 << 16) // for only showing spectators list when you're dead/spectating.
|
||||
#define HUD_PERFS_CENTER (1 << 17) // for the perf percentage in the center hud. e.g. "Jumps: 20 (66.6%)"
|
||||
|
||||
// HUD2 - these settings will *disable* elements for the main hud
|
||||
#define HUD2_TIME (1 << 0)
|
||||
|
||||
@ -21,12 +21,12 @@
|
||||
|
||||
enum
|
||||
{
|
||||
Migration_RemoveWorkshopMaptiers, // 0
|
||||
Migration_RemoveWorkshopMapzones,
|
||||
Migration_RemoveWorkshopPlayertimes,
|
||||
Migration_LastLoginIndex,
|
||||
Migration_RemoveCountry,
|
||||
Migration_ConvertIPAddresses, // 5
|
||||
Migration_RemoveWorkshopMaptiers, // 0 // safe with newly-created tables
|
||||
Migration_RemoveWorkshopMapzones, // safe with newly-created tables
|
||||
Migration_RemoveWorkshopPlayertimes, // safe with newly-created tables
|
||||
Migration_LastLoginIndex, // safe with newly-created tables
|
||||
Migration_RemoveCountry, // safe with newly-created tables -- doesn't work on sqlite
|
||||
Migration_ConvertIPAddresses, // 5 //
|
||||
Migration_ConvertSteamIDsUsers,
|
||||
Migration_ConvertSteamIDsPlayertimes,
|
||||
Migration_ConvertSteamIDsChat,
|
||||
@ -380,8 +380,11 @@ void ApplyMigration(int migration)
|
||||
|
||||
void ApplyMigration_LastLoginIndex()
|
||||
{
|
||||
char sQuery[128];
|
||||
FormatEx(sQuery, 128, "ALTER TABLE `%susers` ADD INDEX `lastlogin` (`lastlogin`);", gS_SQLPrefix);
|
||||
char sQuery[512];
|
||||
if (gI_Driver == Driver_sqlite)
|
||||
FormatEx(sQuery, 512, "CREATE INDEX IF NOT EXISTS lastlogin ON `%susers` (lastlogin);", gS_SQLPrefix);
|
||||
else
|
||||
FormatEx(sQuery, 512, "ALTER TABLE `%susers` ADD INDEX `lastlogin` (`lastlogin`);", gS_SQLPrefix);
|
||||
QueryLog(gH_SQL, SQL_TableMigrationSingleQuery_Callback, sQuery, Migration_LastLoginIndex, DBPrio_High);
|
||||
}
|
||||
|
||||
|
||||
@ -209,6 +209,7 @@ public void OnPluginStart()
|
||||
..."HUD_USP 8192\n"
|
||||
..."HUD_GLOCK 16384\n"
|
||||
..."HUD_SPECTATORSDEAD 65536\n"
|
||||
..."HUD_PERFS_CENTER 131072\n"
|
||||
);
|
||||
|
||||
IntToString(HUD_DEFAULT2, defaultHUD, 8);
|
||||
@ -776,6 +777,10 @@ Action ShowHUDMenu(int client, int item)
|
||||
FormatEx(sHudItem, 64, "%T", "HudPerfs", client);
|
||||
menu.AddItem(sInfo, sHudItem);
|
||||
|
||||
FormatEx(sInfo, 16, "!%d", HUD_PERFS_CENTER);
|
||||
FormatEx(sHudItem, 64, "%T", "HudPerfsCenter", client);
|
||||
menu.AddItem(sInfo, sHudItem);
|
||||
|
||||
FormatEx(sInfo, 16, "@%d", HUD2_STYLE);
|
||||
FormatEx(sHudItem, 64, "%T", "HudStyleText", client);
|
||||
menu.AddItem(sInfo, sHudItem);
|
||||
@ -1369,7 +1374,15 @@ int AddHUDToBuffer_Source2013(int client, huddata_t data, char[] buffer, int max
|
||||
|
||||
if((gI_HUD2Settings[client] & HUD2_JUMPS) == 0)
|
||||
{
|
||||
FormatEx(sLine, 128, "%T: %d", "HudJumpsText", client, data.iJumps);
|
||||
if (!Shavit_GetStyleSettingBool(data.iStyle, "autobhop") && (gI_HUDSettings[client] & HUD_PERFS_CENTER))
|
||||
{
|
||||
FormatEx(sLine, 128, "%T: %d (%.1f%)", "HudJumpsText", client, data.iJumps, Shavit_GetPerfectJumps(data.iTarget));
|
||||
}
|
||||
else
|
||||
{
|
||||
FormatEx(sLine, 128, "%T: %d", "HudJumpsText", client, data.iJumps);
|
||||
}
|
||||
|
||||
AddHUDLine(buffer, maxlen, sLine, iLines);
|
||||
}
|
||||
|
||||
|
||||
@ -2454,7 +2454,7 @@ public void Shavit_OnRestart(int client, int track)
|
||||
{
|
||||
SetEntPropFloat(client, Prop_Send, "m_flStamina", 0.0);
|
||||
|
||||
if (gCV_RestartWithFullHP.BoolValue)
|
||||
if (gCV_RestartWithFullHP.BoolValue && GetClientHealth(client) <= 100)
|
||||
{
|
||||
SetEntityHealth(client, 100);
|
||||
SetEntProp(client, Prop_Send, "m_ArmorValue", 100);
|
||||
|
||||
@ -85,6 +85,10 @@
|
||||
{
|
||||
"en" "Perfect jumps"
|
||||
}
|
||||
"HudPerfsCenter"
|
||||
{
|
||||
"en" "Perfect jumps (center hud)"
|
||||
}
|
||||
"HudDefaultPistol"
|
||||
{
|
||||
"en" "Default Pistol: 1=USP 2=Glock"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user