MiniQuake2

src/miniquake2/network/runtime/sound_dispatch.ml

Provides miniquake2 network runtime sound dispatch facilities for this project.

Package
miniquake2.network.runtime.sound_dispatch
Reachable
Yes

Imports

Declarations

buildPlan

function buildPlan(runtime, slot, events)

Build every datagram/staging mutation before touching a Netchan. Stock SV_StartSound routes each fragment independently: CHAN_RELIABLE enters the Netchan message, while ordinary weapon and movement sounds remain transient client datagrams even when they occur later in the same server frame.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
slotdynamic—slot value consumed by this operation.
eventsdynamic—events value consumed by this operation.

View source

dispatch

function dispatch(runtime, socket, events, now)

Compatibility broadcast entry point retained for callers which do not own collision/PHS state. ServerSession uses dispatchRouted instead.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
socketdynamic—socket value consumed by this operation.
eventsdynamic—events value consumed by this operation.
nowdynamic—now value consumed by this operation.

View source

dispatchRouted

function dispatchRouted(runtime, socket, events, routedEvents, now)

routedEvents has one ordered event list per server slot. The original events list is separately supplied so zero-recipient sounds are still validated and consumed as one atomic bridge queue.

ParameterTypeDefaultDescription
runtimedynamic—runtime value consumed by this operation.
socketdynamic—socket value consumed by this operation.
eventsdynamic—events value consumed by this operation.
routedEventsdynamic—routedEvents value consumed by this operation.
nowdynamic—now value consumed by this operation.

View source

payloadCapacity

function payloadCapacity(client)

Performs the payloadCapacity operation for the miniquake2 network runtime sound dispatch module.

ParameterTypeDefaultDescription
clientdynamic—client value consumed by this operation.

View source

miniquake2.network.runtime.sound_dispatch.SoundClientPlan struct

miniquake2.network.runtime.sound_dispatch.SoundDispatchResult struct