libentities: add get_hitbox that returns a hitbox from entity definition

This commit is contained in:
REDxEYE 2024-10-29 19:38:18 +03:00
parent 803981e2a8
commit 7f5bc41835
3 changed files with 23 additions and 0 deletions

View file

@ -50,6 +50,11 @@ entities.get_all_in_box(pos: vec3, size: vec3) -> array<int>
-- center - center of the area
-- radius - radius of the area
entities.get_all_in_radius(center: vec3, radius: number) -> array<int>
-- Returns a float array representing hitbox size from entity definition
entities.get_hitbox(uid: int)->array<int>
```
```lua

View file

@ -50,6 +50,9 @@ entities.get_all_in_box(pos: vec3, size: vec3) -> array<int>
-- center - центр области
-- radius - радиус области
entities.get_all_in_radius(center: vec3, radius: number) -> array<int>
-- Возвращает массив флотов хитбокса из определения сущности
entities.get_hitbox(uid: int)->array<int>
```
```lua