Provides miniquake2 network snapshot facilities for this project.
# baselineFor
function baselineFor(baselines, number)
Return the baseline for the requested input.
| Parameter | Type | Default | Description |
|---|
baselines | dynamic | — | baselines value consumed by this operation. |
number | dynamic | — | number value consumed by this operation. |
View source
# chooseDelta
function chooseDelta(serverFrame, lastFrame, history)
Choose delta.
| Parameter | Type | Default | Description |
|---|
serverFrame | dynamic | — | serverFrame value consumed by this operation. |
lastFrame | dynamic | — | lastFrame value consumed by this operation. |
history | dynamic | — | history value consumed by this operation. |
View source
# createFrame
function createFrame(serverFrame, areaBits, playerState, entities)
Create frame.
| Parameter | Type | Default | Description |
|---|
serverFrame | dynamic | — | serverFrame 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
# inheritEntity
function inheritEntity(buffer, base)
Return the inherit entity value.
| Parameter | Type | Default | Description |
|---|
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
base | dynamic | — | base value consumed by this operation. |
View source
# readFrame
function readFrame(buffer, history, baselines)
Reads frame for the miniquake2 network snapshot workflow.
| Parameter | Type | Default | Description |
|---|
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
history | dynamic | — | history value consumed by this operation. |
baselines | dynamic | — | baselines value consumed by this operation. |
View source
# readFrameProtocol
function readFrameProtocol(buffer, history, baselines, protocol)
Read frame protocol.
| Parameter | Type | Default | Description |
|---|
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
history | dynamic | — | history value consumed by this operation. |
baselines | dynamic | — | baselines value consumed by this operation. |
protocol | dynamic | — | protocol value consumed by this operation. |
View source
# readPacketEntitiesBody
function readPacketEntitiesBody(buffer, oldEntities, baselines)
Read packet entities body.
| Parameter | Type | Default | Description |
|---|
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
oldEntities | dynamic | — | oldEntities value consumed by this operation. |
baselines | dynamic | — | baselines value consumed by this operation. |
View source
# writeFrameForClient
function writeFrameForClient(buffer, current, lastFrame, history, baselines, maxClients, suppressCount)
Write frame for client.
| Parameter | Type | Default | Description |
|---|
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
current | dynamic | — | current value consumed by this operation. |
lastFrame | dynamic | — | lastFrame value consumed by this operation. |
history | dynamic | — | history value consumed by this operation. |
baselines | dynamic | — | baselines value consumed by this operation. |
maxClients | dynamic | — | maxClients value consumed by this operation. |
suppressCount | dynamic | — | Number of suppress to process. |
View source
# writePacketEntities
function writePacketEntities(buffer, oldEntities, newEntities, baselines, maxClients)
Write packet entities.
| Parameter | Type | Default | Description |
|---|
buffer | dynamic | — | Buffer that receives or supplies the operation data. |
oldEntities | dynamic | — | oldEntities value consumed by this operation. |
newEntities | dynamic | — | newEntities value consumed by this operation. |
baselines | dynamic | — | baselines value consumed by this operation. |
maxClients | dynamic | — | maxClients value consumed by this operation. |
View source