mirror of https://github.com/zyllian/classics.git synced 2025-05-11 14:26:40 -07:00

significant refactors and implement extension negotiations (resolves #17) and EnvWeatherType (resolves #29)

This commit is contained in:
Zoey 2024-04-24 18:54:19 -07:00
parent 6cb7c5f49a
commit bfb9d62f96
No known key found for this signature in database
GPG key ID: 8611B896D1AAFAF2
15 changed files with 756 additions and 404 deletions

View file

@ -3,7 +3,7 @@ use std::net::SocketAddr;
use half::f16;
use serde::{Deserialize, Serialize};
use crate::packet::server::ServerPacket;
use crate::packet::{server::ServerPacket, ExtBitmask};
/// struct for players
#[derive(Debug)]
@ -27,6 +27,8 @@ pub struct Player {
/// the player's IP address
pub _addr: SocketAddr,
/// the player's supported extensions
pub extensions: ExtBitmask,
/// queue of packets to be sent to this player
pub packets_to_send: Vec<ServerPacket>,
/// whether this player should be kicked and the message to give