| 430 | } |
| 431 | |
| 432 | static cell_t GetEntityNetClass(IPluginContext *pContext, const cell_t *params) |
| 433 | { |
| 434 | CBaseEntity *pEntity = g_HL2.ReferenceToEntity(params[1]); |
| 435 | |
| 436 | IServerUnknown *pUnk = (IServerUnknown *)pEntity; |
| 437 | |
| 438 | if (!pEntity) |
| 439 | { |
| 440 | return pContext->ThrowNativeError("Invalid entity (%d - %d)", g_HL2.ReferenceToIndex(params[1]), params[1]); |
| 441 | } |
| 442 | |
| 443 | ServerClass *pClass = g_HL2.FindEntityServerClass(pEntity); |
| 444 | if (!pClass) |
| 445 | { |
| 446 | return 0; |
| 447 | } |
| 448 | |
| 449 | pContext->StringToLocal(params[2], params[3], pClass->GetName()); |
| 450 | |
| 451 | return 1; |
| 452 | } |
| 453 | |
| 454 | static cell_t GetEntData(IPluginContext *pContext, const cell_t *params) |
| 455 | { |
nothing calls this directly
no test coverage detected