# addContinuationBits
function addContinuationBits(bits)Add continuation bits.
| Parameter | Type | Default | Description |
|---|---|---|---|
bits | dynamic | — | bits value consumed by this operation. |
src/miniquake2/protocol/entity_delta.mlProvides miniquake2 protocol entity delta facilities for this project.
miniquake2/protocol/checked.ml as pchecked → src/miniquake2/protocol/checked.mlminiquake2/protocol/constants.ml as pc → src/miniquake2/protocol/constants.mlminiquake2/protocol/types.ml as pt → src/miniquake2/protocol/types.mlminiquake2/qcommon/message.ml as qmsg → src/miniquake2/qcommon/message.mlfunction addContinuationBits(bits)Add continuation bits.
| Parameter | Type | Default | Description |
|---|---|---|---|
bits | dynamic | — | bits value consumed by this operation. |
function computeBits(base, target, newEntity)Derive the exact Protocol-34 U_* mask before any bytes are emitted. Width extension flags are added by writeHeader, so callers can also use this mask to decide whether an unchanged entity may be omitted.
| Parameter | Type | Default | Description |
|---|---|---|---|
base | dynamic | — | base value consumed by this operation. |
target | dynamic | — | target value consumed by this operation. |
newEntity | dynamic | — | newEntity value consumed by this operation. |
function MSG_WriteDeltaEntity(base, target, buffer, force, newEntity)Write msg delta entity.
| Parameter | Type | Default | Description |
|---|---|---|---|
base | dynamic | — | base value consumed by this operation. |
target | dynamic | — | target value consumed by this operation. |
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
force | dynamic | — | force value consumed by this operation. |
newEntity | dynamic | — | newEntity value consumed by this operation. |
function readDelta(buffer, base, header)Reconstruct a complete state from its baseline without retaining references to mutable baseline vectors. Checked reads keep malformed packets atomic.
| Parameter | Type | Default | Description |
|---|---|---|---|
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
base | dynamic | — | base value consumed by this operation. |
header | dynamic | — | header value consumed by this operation. |
function readHeader(buffer)Read header.
| Parameter | Type | Default | Description |
|---|---|---|---|
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
function validateState(state, operation)Validates state for the miniquake2 protocol entity delta workflow.
| Parameter | Type | Default | Description |
|---|---|---|---|
state | dynamic | — | Mutable state inspected or updated by the operation. |
operation | dynamic | — | operation value consumed by this operation. |
function writeDelta(buffer, base, target, force, newEntity)Emit fields in the original MSG_WriteDeltaEntity order; several flags share bytes, making this ordering part of the wire and demo compatibility contract.
| Parameter | Type | Default | Description |
|---|---|---|---|
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
base | dynamic | — | base value consumed by this operation. |
target | dynamic | — | target value consumed by this operation. |
force | dynamic | — | force value consumed by this operation. |
newEntity | dynamic | — | newEntity value consumed by this operation. |
function writeEndMarker(buffer)Write end marker.
| Parameter | Type | Default | Description |
|---|---|---|---|
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
function writeHeader(buffer, number, rawBits)Write header.
| Parameter | Type | Default | Description |
|---|---|---|---|
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
number | dynamic | — | number value consumed by this operation. |
rawBits | dynamic | — | rawBits value consumed by this operation. |
function writeRemoval(buffer, number)Write removal.
| Parameter | Type | Default | Description |
|---|---|---|---|
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
number | dynamic | — | number value consumed by this operation. |