group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
InputReceiveSystem.hpp
Go to the documentation of this file.
1
3
4#pragma once
5
8
10namespace systems
11{
12
16inline Event runInputReceive(const void* data)
17{
18 auto* snap = static_cast<const InputSnapshot*>(data);
19 Event event;
20 event.movementIntent = *snap;
21 event.type = EventType::Input;
22
23 return event;
24}
25
26} // namespace systems
Thread-safe event queue for passing network events to the game loop.
@ Input
A client has sent an input snapshot.
Definition EventType.hpp:11
Per-tick player input snapshot for networking and prediction.
A single gameplay event produced by network input processing.
Definition Event.hpp:10
InputSnapshot movementIntent
Decoded movement fields.
Definition Event.hpp:14
Client-only input sampling system — split into two halves so mouse look can run every iterate() (smoo...
Definition InputSampleSystem.hpp:21
Event runInputReceive(const void *data)
Deserialise a raw InputSnapshot packet into a gameplay Event.
Definition InputReceiveSystem.hpp:16
One tick of player input, stamped with the tick it was sampled on.
Definition InputSnapshot.hpp:17