add missing flag check and docs

This commit is contained in:
p2r3
2025-08-28 02:35:58 +03:00
parent 5c3ec29948
commit ba7d48c3e3
2 changed files with 2 additions and 0 deletions

View File

@@ -114,6 +114,7 @@ typedef struct {
// 0x04 - sneaking
// 0x08 - sprinting
// 0x10 - eating, makes extra8 act as eating timer
// 0x20 - client not fully loaded
uint8_t flags;
} PlayerData;

View File

@@ -1019,6 +1019,7 @@ void handleServerTick (int64_t time_since_last_tick) {
// Update player events
for (int i = 0; i < MAX_PLAYERS; i ++) {
if (player_data[i].client_fd == -1) continue;
if (player_data[i].flags & 0x20) continue;
// Send Keep Alive and Update Time packets
sc_keepAlive(player_data[i].client_fd);
sc_updateTime(player_data[i].client_fd, world_time);