Skip to main content

traceless.prediction

Read snapshots in prediction-related callbacks when their timing matters. These methods do not initiate prediction. See returned structures.

local_state​

traceless.prediction.local_state()

Returns: PredictionState table; or nil, reason.

Requires a local pawn, local controller, and scene node. Captures pawn state and optional current weapon state.

ticks​

traceless.prediction.ticks()

Returns: PredictionTicks table; or nil, reason.

Requires globals and a network game client. Missing controller/prediction interfaces produce zero or false fields within an otherwise valid snapshot.

local traceless = require("traceless")
traceless.events.on("predict_command", function()
local state = traceless.prediction.local_state()
if state then traceless.console.info(state.tick_base) end
end)