vkmEngine 1.0.0
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
Vkm::Engine::NetSession::Rewind Class Reference

Puts every other player back where a shooter saw them, for one scope. More...

#include <net_session.h>

Public Member Functions

 Rewind (NetSession &session, Scene &scene, EntityId shooter)
 Rewinds to the moment shooter was drawing when the running command was made.

Detailed Description

Puts every other player back where a shooter saw them, for one scope.

A scope rather than a wrapped query, so it serves any query; offline and on a client it does nothing. Read inside the braces, act outside: what was moved is restored exactly on the way out, discarding anything written to it.

Constructor & Destructor Documentation

◆ Rewind()

Vkm::Engine::NetSession::Rewind::Rewind ( NetSession & session,
Scene & scene,
EntityId shooter )

Rewinds to the moment shooter was drawing when the running command was made.

That is the server tick the client says it drew, less how long the command waited in the queue, clamped to what is remembered. A scope nested in another changes nothing and must name the same shooter.

Parameters
sessionWhose players are rewound.
sceneThe world to rewind.
shooterWhose moment is restored; it stays where it is.

The documentation for this class was generated from the following file: