mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-07 10:28:34 +00:00
Fix oops with SetConVarBounds.
This commit is contained in:
parent
dfd27eccd3
commit
5e14ad8680
@ -609,10 +609,12 @@ static cell_t sm_SetConVarBounds(IPluginContext *pContext, const cell_t *params)
|
|||||||
switch (params[2])
|
switch (params[2])
|
||||||
{
|
{
|
||||||
case ConVarBound_Upper:
|
case ConVarBound_Upper:
|
||||||
pConVar->m_fMaxVal = params[3] ? true : false, sp_ctof(params[4]);
|
pConVar->m_fMaxVal = sp_ctof(params[4]);
|
||||||
|
pConVar->m_bHasMax = params[3] ? true : false;
|
||||||
break;
|
break;
|
||||||
case ConVarBound_Lower:
|
case ConVarBound_Lower:
|
||||||
pConVar->m_fMinVal = params[3] ? true : false, sp_ctof(params[4]);
|
pConVar->m_fMinVal = sp_ctof(params[4]);
|
||||||
|
pConVar->m_bHasMin = params[3] ? true : false;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return pContext->ThrowNativeError("Invalid ConVarBounds value %d");
|
return pContext->ThrowNativeError("Invalid ConVarBounds value %d");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user