| 521 | } |
| 522 | |
| 523 | static cell_t GetConVarDefault(IPluginContext *pContext, const cell_t *params) |
| 524 | { |
| 525 | Handle_t hndl = static_cast<Handle_t>(params[1]); |
| 526 | HandleError err; |
| 527 | ConVar *pConVar; |
| 528 | |
| 529 | if ((err=g_ConVarManager.ReadConVarHandle(hndl, &pConVar)) |
| 530 | != HandleError_None) |
| 531 | { |
| 532 | return pContext->ThrowNativeError("Invalid convar handle %x (error %d)", hndl, err); |
| 533 | } |
| 534 | |
| 535 | size_t bytes; |
| 536 | pContext->StringToLocalUTF8(params[2], params[3], pConVar->GetDefault(), &bytes); |
| 537 | |
| 538 | return bytes; |
| 539 | } |
| 540 | |
| 541 | static cell_t sm_GetConVarFlags(IPluginContext *pContext, const cell_t *params) |
| 542 | { |
nothing calls this directly
no test coverage detected