make event timing independent of tickrate

This commit is contained in:
p2r3
2025-08-26 16:07:43 +03:00
parent 84fda79901
commit aa1334db9e
3 changed files with 25 additions and 7 deletions

View File

@@ -98,6 +98,7 @@ void handlePacket (int client_fd, int length, int packet_id) {
// For more info on the arguments, see the spawnMob function
for (int i = 0; i < MAX_MOBS; i ++) {
if (mob_data[i].type == 0) continue;
if ((mob_data[i].data & 31) == 0) continue;
sc_spawnEntity(
client_fd, 65536 + i, recv_buffer,
mob_data[i].type, mob_data[i].x, mob_data[i].y, mob_data[i].z,