# `QuakeServer.Precaches`
[🔗](https://github.com/jaman/quake_server/blob/v0.1.0/lib/quake_server/precaches.ex#L1)

The server's sound list and particle effect list as FTE gives them to a player's
client: the first time a player is sent them, the whole sound list as
`svcfte_soundlistshort` and each effect as `svcfte_precache`, as FTE's signon does;
after that every sound or effect added since, as `svcfte_precache`, as FTE sends a
precache made while the level runs. All go into the player's reliable messages
(`QuakeServer.Outbox`).

    server = QuakeServer.Precaches.send(server, 1)

The sound list is the server's `sound_names`, index 0 the empty name; the effects are
the host's `ext.effects` (`%{name => number}`, numbered from 1). What each player has
been sent is kept in the host's `ext.precaches_sent`.

The messages are `<<56, 0::little-16, name, 0, name, 0, ..., 0, 0>>` (the names from
index 1, an empty name, then 0 for no more) and `<<77, code::little-16, name, 0>>`,
`code` the index with bit 0x8000 set for a sound or bit 0x4000 for an effect.

# `send`

```elixir
@spec send(QuakeServer.Server.t(), pos_integer()) :: QuakeServer.Server.t()
```

Queue for `player` the sounds and effects it has not been sent.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
