![]() |
vkmEngine 1.0.0
A C++ game engine · vkmengine.com
|
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. | |
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.
| 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.
| session | Whose players are rewound. |
| scene | The world to rewind. |
| shooter | Whose moment is restored; it stays where it is. |