diff options
Diffstat (limited to 'Minecraft.World/Entity.cpp')
| -rw-r--r-- | Minecraft.World/Entity.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Minecraft.World/Entity.cpp b/Minecraft.World/Entity.cpp index d754330b..924312e5 100644 --- a/Minecraft.World/Entity.cpp +++ b/Minecraft.World/Entity.cpp @@ -96,9 +96,20 @@ int Entity::getSmallId() puiUsedFlags++; } +#ifdef MINECRAFT_SERVER_BUILD + // in mc server dedi, a server with 8+ playerrs can cause this to go wack + int fallbackId = Entity::entityCounter++; + + if (entityCounter == 0x7ffffff) + { + entityCounter = 2048; + } + return fallbackId; +#else app.DebugPrintf("Out of small entity Ids... possible leak?\n"); __debugbreak(); return -1; +#endif } void Entity::countFlagsForPIX() |
