This commit is contained in:
2026-09-24 15:30:45 -03:00
commit a5af824c91
306 changed files with 58603 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
#include <entities/MJAss.h>
bool mass_tick(Server* server, Entity* entity)
{
MAss* ass = (MAss*)entity;
if (ass->timer >= ass->next_time)
{
ass->state = !ass->state;
ass->timer = 0;
Packet pack;
PacketCreate(&pack, SERVER_MJCRYSTAL_STATE);
PacketWrite(&pack, packet_write8, ass->state);
server_broadcast(server, &pack, true);
ass->next_time = (10 + rand() % 5) * TICKSPERSEC;
}
ass->timer += server->delta;
return true;
}