| 328 | } |
| 329 | |
| 330 | static cell_t sm_GetConVarBool(IPluginContext *pContext, const cell_t *params) |
| 331 | { |
| 332 | Handle_t hndl = static_cast<Handle_t>(params[1]); |
| 333 | HandleError err; |
| 334 | ConVar *pConVar; |
| 335 | |
| 336 | if ((err=g_ConVarManager.ReadConVarHandle(hndl, &pConVar)) |
| 337 | != HandleError_None) |
| 338 | { |
| 339 | return pContext->ThrowNativeError("Invalid convar handle %x (error %d)", hndl, err); |
| 340 | } |
| 341 | |
| 342 | return pConVar->GetBool(); |
| 343 | } |
| 344 | |
| 345 | static cell_t sm_GetConVarInt(IPluginContext *pContext, const cell_t *params) |
| 346 | { |
nothing calls this directly
no test coverage detected