| 53 | } |
| 54 | |
| 55 | static cell_t sm_GetCommandLineParam(IPluginContext *pCtx, const cell_t *params) |
| 56 | { |
| 57 | ICommandLine *pCmdLine = g_HL2.GetValveCommandLine(); |
| 58 | |
| 59 | if (pCmdLine == NULL) |
| 60 | { |
| 61 | return pCtx->ThrowNativeError("Unable to get valve command line"); |
| 62 | } |
| 63 | |
| 64 | char *param = NULL; |
| 65 | char *defValue = NULL; |
| 66 | pCtx->LocalToString(params[1], ¶m); |
| 67 | pCtx->LocalToString(params[4], &defValue); |
| 68 | |
| 69 | const char *value = pCmdLine->ParmValue(param, defValue); |
| 70 | |
| 71 | pCtx->StringToLocal(params[2], params[3], value); |
| 72 | |
| 73 | return 1; |
| 74 | } |
| 75 | |
| 76 | static cell_t sm_GetCommandLineParamInt(IPluginContext *pCtx, const cell_t *params) |
| 77 | { |
nothing calls this directly
no test coverage detected