| 537 | /* No OnContextCreated, skin textures remade when needed */ |
| 538 | |
| 539 | void Entities_Remove(int id) { |
| 540 | struct Entity* e = Entities.List[id]; |
| 541 | if (!e) return; |
| 542 | |
| 543 | Event_RaiseInt(&EntityEvents.Removed, id); |
| 544 | e->VTABLE->Despawn(e); |
| 545 | Entities.List[id] = NULL; |
| 546 | |
| 547 | /* TODO: Move to EntityEvents.Removed callback instead */ |
| 548 | if (id < TABLIST_MAX_NAMES && TabList_EntityLinked_Get(id)) { |
| 549 | TabList_Remove(id); |
| 550 | TabList_EntityLinked_Reset(id); |
| 551 | } |
| 552 | } |
| 553 | |
| 554 | int Entities_GetClosest(struct Entity* src) { |
| 555 | Vec3 eyePos = Entity_GetEyePosition(src); |
no test coverage detected