From 1e014a54dc4a9298b407a83146940cf5118f89a9 Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Mon, 30 Jul 2018 12:49:46 +0100 Subject: Ocelots no longer multiply exponentially (#4272) Along with a call to `destroyentities`, this fixes #4271 I'm guessing the intention of this code was to modify the normal spawning of ocelots. However, `cEntity::SpawnOn` is actually called to send the entity to an individual client. That means this code was run for every single player, every time they were sent a chunk with ocelots in it. Thus, the ocelots population would grow exponentially as players log in and move around. --- src/Mobs/Ocelot.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/Mobs/Ocelot.h') diff --git a/src/Mobs/Ocelot.h b/src/Mobs/Ocelot.h index b8efc60ee..226da228d 100644 --- a/src/Mobs/Ocelot.h +++ b/src/Mobs/Ocelot.h @@ -30,7 +30,6 @@ public: virtual void OnRightClicked(cPlayer & a_Player) override; virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override; virtual void TickFollowPlayer(); - virtual void SpawnOn(cClientHandle & a_ClientHandle) override; virtual void GetBreedingItems(cItems & a_Items) override { a_Items.Add(E_ITEM_RAW_FISH); -- cgit v1.2.3