| 390 | } |
| 391 | |
| 392 | static cell_t sm_GetConVarFloat(IPluginContext *pContext, const cell_t *params) |
| 393 | { |
| 394 | Handle_t hndl = static_cast<Handle_t>(params[1]); |
| 395 | HandleError err; |
| 396 | ConVar *pConVar; |
| 397 | |
| 398 | if ((err=g_ConVarManager.ReadConVarHandle(hndl, &pConVar)) |
| 399 | != HandleError_None) |
| 400 | { |
| 401 | return pContext->ThrowNativeError("Invalid convar handle %x (error %d)", hndl, err); |
| 402 | } |
| 403 | |
| 404 | float value = pConVar->GetFloat(); |
| 405 | |
| 406 | return sp_ftoc(value); |
| 407 | } |
| 408 | |
| 409 | static cell_t sm_SetConVarFloat(IPluginContext *pContext, const cell_t *params) |
| 410 | { |
nothing calls this directly
no test coverage detected