Files
Cubed/include/Cubed/gameplay/server_player.hpp
zhenyan121 4303c1cd32 feat(network): integrate protobuf for player sync and session management
Add Protobuf dependency, define proto messages for player requests, positions, and chunk data. Refactor Session to use strand and async write. Implement player join/exit and position sync in ServerWorld.
2026-06-23 20:08:40 +08:00

18 lines
381 B
C++

#pragma once
#include <glm/glm.hpp>
#include <string>
#include <string_view>
namespace Cubed {
class ServerPlayer {
public:
explicit ServerPlayer(std::string_view);
const glm::vec3& get_pos() const;
const std::string& get_name() const;
void update_pos(float x, float y, float z);
private:
std::string m_name;
glm::vec3 m_pos{0.0f};
};
} // namespace Cubed