| 234 | } |
| 235 | |
| 236 | static cell_t smn_KvSetFloat(IPluginContext *pCtx, const cell_t *params) |
| 237 | { |
| 238 | Handle_t hndl = static_cast<Handle_t>(params[1]); |
| 239 | HandleError herr; |
| 240 | HandleSecurity sec; |
| 241 | KeyValueStack *pStk; |
| 242 | |
| 243 | sec.pOwner = NULL; |
| 244 | sec.pIdentity = g_pCoreIdent; |
| 245 | |
| 246 | if ((herr=handlesys->ReadHandle(hndl, g_KeyValueType, &sec, (void **)&pStk)) |
| 247 | != HandleError_None) |
| 248 | { |
| 249 | return pCtx->ThrowNativeError("Invalid key value handle %x (error %d)", hndl, herr); |
| 250 | } |
| 251 | |
| 252 | char *key; |
| 253 | pCtx->LocalToStringNULL(params[2], &key); |
| 254 | |
| 255 | pStk->pCurRoot.front()->SetFloat(key, sp_ctof(params[3])); |
| 256 | |
| 257 | return 1; |
| 258 | } |
| 259 | |
| 260 | static cell_t smn_KvSetColor(IPluginContext *pCtx, const cell_t *params) |
| 261 | { |
nothing calls this directly
no test coverage detected