bettola/srv/game/player.cpp
Ritchie Cunningham a2a8b052af feat(network): hybrid TCP/UDP networking model.
Moving from a TCP only model to a hybrid TCP/UDP system. This is
required to achieve a responsive, real-time multiplayer experience.
2025-09-14 00:52:18 +01:00

13 lines
308 B
C++

#include <string.h>
#include "player.h"
#include "network/tcpsocket.h"
unsigned int Player::_next_player_id = 0;
Player::Player(BettolaLib::Network::TCPSocket* socket) :
_id(_next_player_id++), _x(0.0f), _y(0.0f), _socket(socket), _has_udp_addr(false) {
memset(&_udp_addr, 0, sizeof(_udp_addr));
}