The latest positions of an entity, oldest first, to draw it between two of them.
More...
#include </__w/project-rtype/project-rtype/client/network/include/rtype/client_world.hpp>
|
| void | push (TrailPoint point) noexcept |
| | Adds the newest position, dropping the oldest when full.
|
| |
|
| std::array< TrailPoint, capacity > | points {} |
| | Positions, oldest first; only the first count are set.
|
| |
| std::size_t | count = 0 |
| | Number of positions set.
|
| |
|
| static constexpr std::size_t | capacity = 4 |
| | Number of positions kept.
|
| |
The latest positions of an entity, oldest first, to draw it between two of them.
The server sends 20 snapshots a second, the client draws 60 frames or more: drawing each entity where the last snapshot put it would make it jump three times a second. ClientWorld keeps here the last positions received, and interpolate() gives the position at any tick between them.
◆ push()
Adds the newest position, dropping the oldest when full.
- Parameters
-
| point | Position of a tick later than the newest one; an older or equal tick is ignored. |
◆ capacity
| constexpr std::size_t rtype::Trail::capacity = 4 |
|
staticconstexpr |
Number of positions kept.
◆ count
| std::size_t rtype::Trail::count = 0 |
◆ points
Positions, oldest first; only the first count are set.
The documentation for this struct was generated from the following file: