| 517 | } |
| 518 | |
| 519 | static cell_t smn_BfReadEntity(IPluginContext *pCtx, const cell_t *params) |
| 520 | { |
| 521 | Handle_t hndl = static_cast<Handle_t>(params[1]); |
| 522 | HandleError herr; |
| 523 | HandleSecurity sec; |
| 524 | bf_read *pBitBuf; |
| 525 | |
| 526 | sec.pOwner = NULL; |
| 527 | sec.pIdentity = g_pCoreIdent; |
| 528 | |
| 529 | if ((herr=handlesys->ReadHandle(hndl, g_RdBitBufType, &sec, (void **)&pBitBuf)) |
| 530 | != HandleError_None) |
| 531 | { |
| 532 | return pCtx->ThrowNativeError("Invalid bit buffer handle %x (error %d)", hndl, herr); |
| 533 | } |
| 534 | |
| 535 | int ref = g_HL2.IndexToReference(pBitBuf->ReadShort()); |
| 536 | |
| 537 | return g_HL2.ReferenceToBCompatRef(ref); |
| 538 | } |
| 539 | |
| 540 | static cell_t smn_BfReadAngle(IPluginContext *pCtx, const cell_t *params) |
| 541 | { |
nothing calls this directly
no test coverage detected