Provides miniquake2 server snapshot facilities for this project.
# addFrame
function addFrame(history, number, areaBits, playerState, entities)
Add frame.
| Parameter | Type | Default | Description |
|---|
history | dynamic | — | history value consumed by this operation. |
number | dynamic | — | number value consumed by this operation. |
areaBits | dynamic | — | areaBits value consumed by this operation. |
playerState | dynamic | — | playerState value consumed by this operation. |
entities | dynamic | — | entities value consumed by this operation. |
View source
# chooseDeltaFrame
function chooseDeltaFrame(history, current, requestedNumber)
Choose delta frame.
| Parameter | Type | Default | Description |
|---|
history | dynamic | — | history value consumed by this operation. |
current | dynamic | — | current value consumed by this operation. |
requestedNumber | dynamic | — | requestedNumber value consumed by this operation. |
View source
# createHistory
function createHistory(maxClients)
Create history.
| Parameter | Type | Default | Description |
|---|
maxClients | dynamic | — | maxClients value consumed by this operation. |
View source
# emitPacketEntities
function emitPacketEntities(buffer, previousEntities, currentEntities, baselines, maxClients)
Emit packet entities.
| Parameter | Type | Default | Description |
|---|
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
previousEntities | dynamic | — | previousEntities value consumed by this operation. |
currentEntities | dynamic | — | currentEntities value consumed by this operation. |
baselines | dynamic | — | baselines value consumed by this operation. |
maxClients | dynamic | — | maxClients value consumed by this operation. |
View source
# findFrame
function findFrame(history, number)
Find frame.
| Parameter | Type | Default | Description |
|---|
history | dynamic | — | history value consumed by this operation. |
number | dynamic | — | number value consumed by this operation. |
View source
# readFrame
function readFrame(buffer, oldFrame, baselines)
Reads frame for the miniquake2 server snapshot workflow.
| Parameter | Type | Default | Description |
|---|
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
oldFrame | dynamic | — | oldFrame value consumed by this operation. |
baselines | dynamic | — | baselines value consumed by this operation. |
View source
# setBaseline
function setBaseline(history, state)
Set baseline.
| Parameter | Type | Default | Description |
|---|
history | dynamic | — | history value consumed by this operation. |
state | dynamic | — | Mutable state inspected or updated by the operation. |
View source
# writeFrame
function writeFrame(history, current, requestedDeltaNumber, suppressCount, buffer)
Write frame.
| Parameter | Type | Default | Description |
|---|
history | dynamic | — | history value consumed by this operation. |
current | dynamic | — | current value consumed by this operation. |
requestedDeltaNumber | dynamic | — | requestedDeltaNumber value consumed by this operation. |
suppressCount | dynamic | — | Number of suppress to process. |
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
View source