group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
InputSendSystem.hpp
Go to the documentation of this file.
1
3
4#pragma once
5
9#include "network/Client.hpp"
10
12namespace systems
13{
14
18inline void runInputSend(Registry& registry, Client& conn)
19{
20 registry.view<InputSnapshot, LocalPlayer>().each([&](InputSnapshot& snap) { conn.sendInputSnapshot(snap); });
21}
22
23} // namespace systems
TCP client for connecting to the game server.
Per-tick player input snapshot for networking and prediction.
Marker component identifying the locally controlled player entity.
Shared ECS registry type alias for the game engine.
entt::registry Registry
Shared ECS registry type alias.
Definition Registry.hpp:11
TCP stream client — sends input to the server and receives state updates.
Definition Client.hpp:35
bool sendInputSnapshot(const InputSnapshot &snap)
Definition Client.cpp:87
Client-only input sampling system — split into two halves so mouse look can run every iterate() (smoo...
Definition InputSampleSystem.hpp:20
void runInputSend(Registry &registry, Client &conn)
Send the local player's current InputSnapshot over the network.
Definition InputSendSystem.hpp:18
One tick of player input, stamped with the tick it was sampled on.
Definition InputSnapshot.hpp:17
Marker component that tags exactly one entity per client as the locally controlled player.
Definition LocalPlayer.hpp:12