Files
src/miniquake2/runtime/session_persistence.ml
Provides miniquake2 runtime session persistence facilities for this project.
- Package
miniquake2.runtime.session_persistence- Reachable
- Yes
Imports
Declarations
# changeCoreUntilCommitted
function changeCoreUntilCommitted(session, mapName, entityText, collision, maximumSteps)
Return the change core until committed value.
| Parameter | Type | Default | Description |
|---|
session | dynamic | — | session value consumed by this operation. |
mapName | dynamic | — | mapName value consumed by this operation. |
entityText | dynamic | — | entityText value consumed by this operation. |
collision | dynamic | — | collision value consumed by this operation. |
maximumSteps | dynamic | — | maximumSteps value consumed by this operation. |
View source
# changeRetailUntilCommitted
function changeRetailUntilCommitted(session, baseDirectory, mapName, maximumSteps)
Return the change retail until committed value.
| Parameter | Type | Default | Description |
|---|
session | dynamic | — | session value consumed by this operation. |
baseDirectory | dynamic | — | baseDirectory value consumed by this operation. |
mapName | dynamic | — | mapName value consumed by this operation. |
maximumSteps | dynamic | — | maximumSteps value consumed by this operation. |
View source
# coreMapSource
function coreMapSource(entityText, collision)
Map core source.
| Parameter | Type | Default | Description |
|---|
entityText | dynamic | — | entityText value consumed by this operation. |
collision | dynamic | — | collision value consumed by this operation. |
View source
miniquake2.runtime.session_persistence.CoreMapSource struct
# crossMapFailure
function crossMapFailure(session, rollbackCheckpoint, rollbackEntityText, rollbackCollision, maximumSteps, failure)
Compute map failure.
| Parameter | Type | Default | Description |
|---|
session | dynamic | — | session value consumed by this operation. |
rollbackCheckpoint | dynamic | — | rollbackCheckpoint value consumed by this operation. |
rollbackEntityText | dynamic | — | rollbackEntityText value consumed by this operation. |
rollbackCollision | dynamic | — | rollbackCollision value consumed by this operation. |
maximumSteps | dynamic | — | maximumSteps value consumed by this operation. |
failure | dynamic | — | failure value consumed by this operation. |
View source
# finishCrossMapRestore
function finishCrossMapRestore(session, checkpoint, rollbackCheckpoint, rollbackEntityText, rollbackCollision, maximumSteps)
Finish cross map restore.
| Parameter | Type | Default | Description |
|---|
session | dynamic | — | session value consumed by this operation. |
checkpoint | dynamic | — | checkpoint value consumed by this operation. |
rollbackCheckpoint | dynamic | — | rollbackCheckpoint value consumed by this operation. |
rollbackEntityText | dynamic | — | rollbackEntityText value consumed by this operation. |
rollbackCollision | dynamic | — | rollbackCollision value consumed by this operation. |
maximumSteps | dynamic | — | maximumSteps value consumed by this operation. |
View source
# loadSessionCheckpoint
function loadSessionCheckpoint(gamePath, levelPath, maxEdicts)
Reconstruct durable slot metadata after a process restart. Spawn/server epochs are intentionally unknown (-1/0); restorePlaySessionRetail therefore performs a legal re-signon before applying the images.
| Parameter | Type | Default | Description |
|---|
gamePath | dynamic | — | Path associated with game. |
levelPath | dynamic | — | Path associated with level. |
maxEdicts | dynamic | — | maxEdicts value consumed by this operation. |
View source
# readCheckpointImages
function readCheckpointImages(server, gamePath, levelPath, expectedMap)
Read checkpoint images.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | server value consumed by this operation. |
gamePath | dynamic | — | Path associated with game. |
levelPath | dynamic | — | Path associated with level. |
expectedMap | dynamic | — | expectedMap value consumed by this operation. |
View source
# restoreFailure
function restoreFailure(server, rollbackGamePath, rollbackLevelPath, failure)
Restore failure.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | server value consumed by this operation. |
rollbackGamePath | dynamic | — | Path associated with rollback game. |
rollbackLevelPath | dynamic | — | Path associated with rollback level. |
failure | dynamic | — | failure value consumed by this operation. |
View source
# restoreMultiplayerSession
function restoreMultiplayerSession(session, checkpoint)
Restore multiplayer session.
| Parameter | Type | Default | Description |
|---|
session | dynamic | — | session value consumed by this operation. |
checkpoint | dynamic | — | checkpoint value consumed by this operation. |
View source
# restorePlaySession
function restorePlaySession(session, checkpoint)
Restore play session.
| Parameter | Type | Default | Description |
|---|
session | dynamic | — | session value consumed by this operation. |
checkpoint | dynamic | — | checkpoint value consumed by this operation. |
View source
# restorePlaySessionCore
function restorePlaySessionCore(session, checkpoint, resolver, maximumSteps)
Restore play session core.
| Parameter | Type | Default | Description |
|---|
session | dynamic | — | session value consumed by this operation. |
checkpoint | dynamic | — | checkpoint value consumed by this operation. |
resolver | dynamic | — | resolver value consumed by this operation. |
maximumSteps | dynamic | — | maximumSteps value consumed by this operation. |
View source
# restorePlaySessionRetail
function restorePlaySessionRetail(session, checkpoint, baseDirectory, maximumSteps)
Restore play session retail.
| Parameter | Type | Default | Description |
|---|
session | dynamic | — | session value consumed by this operation. |
checkpoint | dynamic | — | checkpoint value consumed by this operation. |
baseDirectory | dynamic | — | baseDirectory value consumed by this operation. |
maximumSteps | dynamic | — | maximumSteps value consumed by this operation. |
View source
# restoreServerSession
function restoreServerSession(server, checkpoint)
Restore server session.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | server value consumed by this operation. |
checkpoint | dynamic | — | checkpoint value consumed by this operation. |
View source
# restoreServerSessionAtCurrentEpoch
function restoreServerSessionAtCurrentEpoch(server, checkpoint, requireSavedSpawn)
Restore server session at current epoch.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | server value consumed by this operation. |
checkpoint | dynamic | — | checkpoint value consumed by this operation. |
requireSavedSpawn | dynamic | — | requireSavedSpawn value consumed by this operation. |
View source
# rollbackCrossMap
function rollbackCrossMap(session, rollbackCheckpoint, entityText, collision, maximumSteps)
Compute rollback map.
| Parameter | Type | Default | Description |
|---|
session | dynamic | — | session value consumed by this operation. |
rollbackCheckpoint | dynamic | — | rollbackCheckpoint value consumed by this operation. |
entityText | dynamic | — | entityText value consumed by this operation. |
collision | dynamic | — | collision value consumed by this operation. |
maximumSteps | dynamic | — | maximumSteps value consumed by this operation. |
View source
# rollbackServerSession
function rollbackServerSession(server, rollbackGamePath, rollbackLevelPath)
Return the rollback server session value.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | server value consumed by this operation. |
rollbackGamePath | dynamic | — | Path associated with rollback game. |
rollbackLevelPath | dynamic | — | Path associated with rollback level. |
View source
# saveCrossMapRollback
function saveCrossMapRollback(session, checkpoint)
Save cross map rollback.
| Parameter | Type | Default | Description |
|---|
session | dynamic | — | session value consumed by this operation. |
checkpoint | dynamic | — | checkpoint value consumed by this operation. |
View source
# saveMultiplayerSession
function saveMultiplayerSession(session, gamePath, levelPath)
Save multiplayer session.
| Parameter | Type | Default | Description |
|---|
session | dynamic | — | session value consumed by this operation. |
gamePath | dynamic | — | Path associated with game. |
levelPath | dynamic | — | Path associated with level. |
View source
# savePlaySession
function savePlaySession(session, gamePath, levelPath)
Save play session.
| Parameter | Type | Default | Description |
|---|
session | dynamic | — | session value consumed by this operation. |
gamePath | dynamic | — | Path associated with game. |
levelPath | dynamic | — | Path associated with level. |
View source
# saveServerSession
function saveServerSession(server, gamePath, levelPath)
Save server session.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | server value consumed by this operation. |
gamePath | dynamic | — | Path associated with game. |
levelPath | dynamic | — | Path associated with level. |
View source
miniquake2.runtime.session_persistence.SessionCheckpoint struct
miniquake2.runtime.session_persistence.SessionRestoreResult struct
# synchronizeRestoredServer
function synchronizeRestoredServer(server)
Synchronize restored server.
| Parameter | Type | Default | Description |
|---|
server | dynamic | — | server value consumed by this operation. |
View source
# targetMapFailure
function targetMapFailure(session, rollbackCheckpoint, rollbackEntityText, rollbackCollision, maximumSteps, failure)
Map target failure.
| Parameter | Type | Default | Description |
|---|
session | dynamic | — | session value consumed by this operation. |
rollbackCheckpoint | dynamic | — | rollbackCheckpoint value consumed by this operation. |
rollbackEntityText | dynamic | — | rollbackEntityText value consumed by this operation. |
rollbackCollision | dynamic | — | rollbackCollision value consumed by this operation. |
maximumSteps | dynamic | — | maximumSteps value consumed by this operation. |
failure | dynamic | — | failure value consumed by this operation. |
View source
# validateCrossMapPlay
function validateCrossMapPlay(session, checkpoint, maximumSteps)
Validate cross map play.
| Parameter | Type | Default | Description |
|---|
session | dynamic | — | session value consumed by this operation. |
checkpoint | dynamic | — | checkpoint value consumed by this operation. |
maximumSteps | dynamic | — | maximumSteps value consumed by this operation. |
View source
# validatePaths
function validatePaths(gamePath, levelPath)
Validate paths.
| Parameter | Type | Default | Description |
|---|
gamePath | dynamic | — | Path associated with game. |
levelPath | dynamic | — | Path associated with level. |
View source