sc_entities_v1.query_radius
Ids of streamed-in entities within radius metres of pos in zone zone_id’s frame, whose class matches class_filter (a class name or a “PREFIX*”; NULL or “” = any class). Up to max ids are written to out_ids (max 0 counts only); *out_count = how many were written and *out_more = how many matched but didn’t fit. SCO_BAD_ARG: a null pos, out_count or out_more, a null out_ids with max > 0, zone 0, a radius that isn’t finite and positive, a filter that isn’t a class name or prefix. SCO_NOT_FOUND: the zone isn’t streamed in. SCO_FAILED: the walk faulted or saw more than 65536 entities. SCO_UNAVAILABLE: no “game.entities.query_radius” on this game build, or while its in-game check is pending (docs/game-services.md). Read-only: last_error(NULL, …).
Signature
Section titled “Signature”sco_result (*)(uint64_t, const double *, double, const char *, uint64_t *, uint32_t, uint32_t *, uint32_t *)Service and availability
Section titled “Service and availability”| Property | Value |
|---|---|
| Symbol | sc_entities_v1.query_radius |
| Record ID | sc-entities-v1-query-radius |
| Service | game.entities |
| Table | sc_entities_v1 |
| Version macro | SC_ENTITIES_VERSION_1_1 |
| Packed table version | 65537 |
| Since / availability | size >= 80; 1.0 |
| Complete member extent (x64 bytes) | 80 |
| Table size (x64 bytes) | 96 |
Parameters and buffers
Section titled “Parameters and buffers”sco_result (*query_radius)(uint64_t zone_id, const double pos[3], double radius, const char* class_filter, uint64_t* out_ids, uint32_t max, uint32_t* out_count, uint32_t* out_more);
Ids of streamed-in entities within radius metres of pos in zone zone_id’s frame, whose class matches class_filter (a class name or a “PREFIX*”; NULL or “” = any class). Up to max ids are written to out_ids (max 0 counts only); *out_count = how many were written and *out_more = how many matched but didn’t fit. SCO_BAD_ARG: a null pos, out_count or out_more, a null out_ids with max > 0, zone 0, a radius that isn’t finite and positive, a filter that isn’t a class name or prefix. SCO_NOT_FOUND: the zone isn’t streamed in. SCO_FAILED: the walk faulted or saw more than 65536 entities. SCO_UNAVAILABLE: no “game.entities.query_radius” on this game build, or while its in-game check is pending (docs/game-services.md). Read-only: last_error(NULL, …).
Results and failures
Section titled “Results and failures”Absent table: query_service NOT_FOUND; missing operation capability: UNAVAILABLE (alive: 0); invalid/released self: BAD_ARG. Additional failures/output state unspecified unless described in the buffer contract.
Absent capability
Section titled “Absent capability”Absent table: query_service NOT_FOUND
Ownership
Section titled “Ownership”Caller buffers; no allocation crosses boundary. Host owns entity/watch tracking; IDs are session values. Internal allocation unspecified.
Thread affinity
Section titled “Thread affinity”Game thread only (WRONG_THREAD elsewhere, alive returns 0); last_error any thread. Recursive reentrancy unspecified except unwatch in callback.
Callback context
Section titled “Callback context”unspecified
Reentrancy
Section titled “Reentrancy”unspecified
Cleanup and cancellation
Section titled “Cleanup and cancellation”No in-flight cancellation entrypoint; owned entities removed and watches ended on ordinary unload/non-retained crash cleanup, except kept entities. Retained-provider faults skip owner resource-release hooks and require restart; backing resources remain retained, not safe for cached calls.
Language mappings
Section titled “Language mappings”Status labels are copied verbatim from the catalogue: direct is native access; typed-wrapper is wrapper-backed; restricted is a subset/adaptation; unsupported means no supported route is established. No status implies universal safety.
| Language | Catalogue status | Source evidence / wrapper tokens |
|---|---|---|
| c | direct | include/sc_entities.h(*query_radius) |
| cpp | typed-wrapper | include/scosdk/game/entities.hppreturn t_ && Covers(t_->size, offsetof(sc_entities_v1, query_radius)) && t_->query_radius ? t_->query_radius(zoneId, pos, radius, classFilter, ids, max, &count, &more) : SCO_UNAVAILABLE; |
| csharp | typed-wrapper | sdk/csharp/Sco.Sdk/Game/Entities.csr = _t->query_radius(zoneId, p, radius, f, o, (uint)ids.Length, &c, &m); |
| lua | unsupported | sdk/docs/lua.mdRead-only: a Lua plugin owns no entities, so there is no spawn, despawn, move or watch.plugins/lua/sco_lua_game.c { “alive”, L_ent_alive }, { “class_of”, L_ent_class_of }, { “get_transform”, L_ent_get_transform }, |
Examples
Section titled “Examples”None identified in the catalogue; this is not proof none can exist.
- tests/abi_game_entities.c
- tests/test_app.cpp
- tests/test_lua.cpp
- tests/test_language_routes.cpp
- sdk/csharp/Sco.Sdk.Tests/GameFakeHost.cs
- tests/test_language_routes.c
- tools/test.sh
- sdk/csharp/Sco.Sdk.Tests/GameLayout.cs
ABI pins prove layout, not semantic behavior or a live game session.