1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Fix particle spawners not visible since CSM spawner implementation (#8289)

* Drop the ID mapper, use a big u64 instead. This will permit to resync server ids properly with the manager code
* Modernize some code parts (std::unordered_map, auto)
* generate id on client part on U32_MAX + 1 ids, lower are for server ids
This commit is contained in:
Loïc Blot 2019-03-01 20:16:11 +01:00 committed by GitHub
parent 111f1dc9c5
commit 170dd409cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 31 additions and 57 deletions

View file

@ -154,9 +154,9 @@ int ModApiParticlesLocal::l_add_particlespawner(lua_State *L)
texture = getstringfield_default(L, 1, "texture", "");
glow = getintfield_default(L, 1, "glow", 0);
u32 id = getClient(L)->getParticleManager()->getSpawnerId();
u64 id = getClient(L)->getParticleManager()->generateSpawnerId();
ClientEvent *event = new ClientEvent();
auto event = new ClientEvent();
event->type = CE_ADD_PARTICLESPAWNER;
event->add_particlespawner.amount = amount;
event->add_particlespawner.spawntime = time;