| 343 | } |
| 344 | |
| 345 | static cell_t sm_GetConVarInt(IPluginContext *pContext, const cell_t *params) |
| 346 | { |
| 347 | Handle_t hndl = static_cast<Handle_t>(params[1]); |
| 348 | HandleError err; |
| 349 | ConVar *pConVar; |
| 350 | |
| 351 | if ((err=g_ConVarManager.ReadConVarHandle(hndl, &pConVar)) |
| 352 | != HandleError_None) |
| 353 | { |
| 354 | return pContext->ThrowNativeError("Invalid convar handle %x (error %d)", hndl, err); |
| 355 | } |
| 356 | |
| 357 | return pConVar->GetInt(); |
| 358 | } |
| 359 | |
| 360 | /* This handles both SetConVarBool() and SetConVarInt() */ |
| 361 | static cell_t sm_SetConVarNum(IPluginContext *pContext, const cell_t *params) |
nothing calls this directly
no test coverage detected