X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fnet%2FClient.hpp;h=ee848c0d74729db9976cf382ccfe8ad1d83b512d;hb=68f47f2824989b21ff9a480a367a6d0a41804f41;hp=bd29c85fa0add60cbb6dc3df4f85af51933491b3;hpb=37e056bafe9603981d6bcb205e1472e063c94700;p=blank.git diff --git a/src/net/Client.hpp b/src/net/Client.hpp index bd29c85..ee848c0 100644 --- a/src/net/Client.hpp +++ b/src/net/Client.hpp @@ -2,6 +2,7 @@ #define BLANK_NET_CLIENT_HPP_ #include "Connection.hpp" +#include "../app/IntervalTimer.hpp" #include #include @@ -32,6 +33,9 @@ public: std::uint16_t SendPing(); std::uint16_t SendLogin(const std::string &); + std::uint16_t SendPart(); + // this may not send the update at all, in which case it returns -1 + int SendPlayerUpdate(const Entity &); private: void HandlePacket(const UDPpacket &); @@ -40,6 +44,7 @@ private: Connection conn; UDPsocket client_sock; UDPpacket client_pack; + IntervalTimer update_timer; };