Made cvar for minimum dx level.
This commit is contained in:
parent
d556da6a32
commit
64c49df505
|
@ -395,6 +395,10 @@ zr_damage_suicide_after_infect "1"
|
|||
// Default: "1.0"
|
||||
zr_overlays_update_time "1.0"
|
||||
|
||||
// Minimum DirectX level allowed for overlays (mat_dxlevel).
|
||||
// Default: "80"
|
||||
zr_overlays_min_dxlevel "80"
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Round End (core)
|
||||
|
|
|
@ -90,6 +90,7 @@ enum CvarsList
|
|||
Handle:CVAR_SAYHOOKS_QUIET_FILTER,
|
||||
Handle:CVAR_SAYHOOKS_QUIET_FLAGS,
|
||||
Handle:CVAR_OVERLAYS_UPDATE_TIME,
|
||||
Handle:CVAR_OVERLAYS_MIN_DXLEVEL,
|
||||
Handle:CVAR_ROUNDEND_OVERLAY,
|
||||
Handle:CVAR_ROUNDEND_OVERLAY_ZOMBIE,
|
||||
Handle:CVAR_ROUNDEND_OVERLAY_HUMAN,
|
||||
|
@ -355,6 +356,7 @@ CvarsCreate()
|
|||
// Overlays (core)
|
||||
// ===========================
|
||||
g_hCvarsList[CVAR_OVERLAYS_UPDATE_TIME] = CreateConVar("zr_overlays_update_time", "1.0", "How often to update overlays on players. [0.0 = Disabled]");
|
||||
g_hCvarsList[CVAR_OVERLAYS_MIN_DXLEVEL] = CreateConVar("zr_overlays_min_dxlevel", "80", "Minimum DirectX level allowed for overlays (mat_dxlevel).");
|
||||
|
||||
|
||||
// ===========================
|
||||
|
|
|
@ -25,11 +25,6 @@
|
|||
* ============================================================================
|
||||
*/
|
||||
|
||||
/**
|
||||
* Minimum dx level required to see overlays.
|
||||
*/
|
||||
#define OVERLAYS_DXL_MIN 90
|
||||
|
||||
/**
|
||||
* Maximum amount of overlay channels.
|
||||
*/
|
||||
|
@ -202,10 +197,11 @@ OverlaysClientUpdateOverlay(client, OverlaysChannel:channel = OVERLAYS_CHANNEL_N
|
|||
return;
|
||||
}
|
||||
|
||||
// If client doesn't meet DXLevel requirement, then tell client, then stop.
|
||||
if (g_iOverlaysDXL[client] < OVERLAYS_DXL_MIN)
|
||||
// If client doesn't meet DXLevel requirement, then tell client and stop.
|
||||
new minDxLevel = GetConVarInt(g_hCvarsList[CVAR_OVERLAYS_MIN_DXLEVEL]);
|
||||
if (g_iOverlaysDXL[client] < minDxLevel)
|
||||
{
|
||||
TranslationPrintCenterText(client, "Overlays not supported", g_iOverlaysDXL[client], OVERLAYS_DXL_MIN);
|
||||
TranslationPrintCenterText(client, "Overlays not supported", g_iOverlaysDXL[client], minDxLevel);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user