mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-09 11:28:26 +00:00
Add convar to enable and disable dynamic time differences
This commit is contained in:
parent
4415ea4ead
commit
8fe630f7c3
@ -128,6 +128,7 @@ Convar gCV_SpectatorList = null;
|
|||||||
Convar gCV_UseHUDFix = null;
|
Convar gCV_UseHUDFix = null;
|
||||||
Convar gCV_DefaultHUD = null;
|
Convar gCV_DefaultHUD = null;
|
||||||
Convar gCV_DefaultHUD2 = null;
|
Convar gCV_DefaultHUD2 = null;
|
||||||
|
Convar gCV_EnableDynamicTimeDifference = null;
|
||||||
|
|
||||||
// timer settings
|
// timer settings
|
||||||
stylestrings_t gS_StyleStrings[STYLE_LIMIT];
|
stylestrings_t gS_StyleStrings[STYLE_LIMIT];
|
||||||
@ -201,6 +202,7 @@ public void OnPluginStart()
|
|||||||
gCV_TicksPerUpdate = new Convar("shavit_hud_ticksperupdate", "5", "How often (in ticks) should the HUD update?\nPlay around with this value until you find the best for your server.\nThe maximum value is your tickrate.", 0, true, 1.0, true, (1.0 / GetTickInterval()));
|
gCV_TicksPerUpdate = new Convar("shavit_hud_ticksperupdate", "5", "How often (in ticks) should the HUD update?\nPlay around with this value until you find the best for your server.\nThe maximum value is your tickrate.", 0, true, 1.0, true, (1.0 / GetTickInterval()));
|
||||||
gCV_SpectatorList = new Convar("shavit_hud_speclist", "1", "Who to show in the specators list?\n0 - everyone\n1 - all admins (admin_speclisthide override to bypass)\n2 - players you can target", 0, true, 0.0, true, 2.0);
|
gCV_SpectatorList = new Convar("shavit_hud_speclist", "1", "Who to show in the specators list?\n0 - everyone\n1 - all admins (admin_speclisthide override to bypass)\n2 - players you can target", 0, true, 0.0, true, 2.0);
|
||||||
gCV_UseHUDFix = new Convar("shavit_hud_csgofix", "1", "Apply the csgo color fix to the center hud?\nThis will add a dollar sign and block sourcemod hooks to hint message", 0, true, 0.0, true, 1.0);
|
gCV_UseHUDFix = new Convar("shavit_hud_csgofix", "1", "Apply the csgo color fix to the center hud?\nThis will add a dollar sign and block sourcemod hooks to hint message", 0, true, 0.0, true, 1.0);
|
||||||
|
gCV_EnableDynamicTimeDifference = new Convar("shavit_hud_dynamictimedifference", "1", "Enabled dynamic time differences in the hud", 0, true, 0.0, true, 1.0);
|
||||||
|
|
||||||
char defaultHUD[8];
|
char defaultHUD[8];
|
||||||
IntToString(HUD_DEFAULT, defaultHUD, 8);
|
IntToString(HUD_DEFAULT, defaultHUD, 8);
|
||||||
@ -1103,7 +1105,7 @@ int AddHUDToBuffer_Source2013(int client, huddata_t data, char[] buffer, int max
|
|||||||
|
|
||||||
char sTimeDiff[32];
|
char sTimeDiff[32];
|
||||||
|
|
||||||
if(Shavit_GetReplayFrameCount(data.iStyle, data.iTrack) != 0 && (gI_HUD2Settings[client] & HUD2_TIMEDIFFERENCE) == 0)
|
if(gCV_EnableDynamicTimeDifference.BoolValue && Shavit_GetReplayFrameCount(data.iStyle, data.iTrack) != 0 && (gI_HUD2Settings[client] & HUD2_TIMEDIFFERENCE) == 0)
|
||||||
{
|
{
|
||||||
float fClosestReplayTime = Shavit_GetClosestReplayTime(data.iTarget, data.iStyle, data.iTrack);
|
float fClosestReplayTime = Shavit_GetClosestReplayTime(data.iTarget, data.iStyle, data.iTrack);
|
||||||
|
|
||||||
@ -1320,7 +1322,7 @@ int AddHUDToBuffer_CSGO(int client, huddata_t data, char[] buffer, int maxlen)
|
|||||||
|
|
||||||
char sTimeDiff[32];
|
char sTimeDiff[32];
|
||||||
|
|
||||||
if(Shavit_GetReplayFrameCount(data.iStyle, data.iTrack) != 0 && (gI_HUD2Settings[client] & HUD2_TIMEDIFFERENCE) == 0)
|
if(gCV_EnableDynamicTimeDifference.BoolValue && Shavit_GetReplayFrameCount(data.iStyle, data.iTrack) != 0 && (gI_HUD2Settings[client] & HUD2_TIMEDIFFERENCE) == 0)
|
||||||
{
|
{
|
||||||
float fClosestReplayTime = Shavit_GetClosestReplayTime(data.iTarget, data.iStyle, data.iTrack);
|
float fClosestReplayTime = Shavit_GetClosestReplayTime(data.iTarget, data.iStyle, data.iTrack);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user