Allocate redstone component handlers upfront

This commit is contained in:
peterbell10
2017-07-17 21:40:43 +02:00
committed by Lukas Pioch
parent 167c4bf2e6
commit 60dfaa0967
25 changed files with 292 additions and 328 deletions
@@ -158,10 +158,13 @@ public:
}
cIncrementalRedstoneSimulatorChunkData * GetChunkData() { return &m_Data; }
static std::unique_ptr<cRedstoneHandler> CreateComponent(cWorld & a_World, BLOCKTYPE a_BlockType, cIncrementalRedstoneSimulatorChunkData * a_Data);
static const cRedstoneHandler * GetComponentHandler(BLOCKTYPE a_BlockType);
private:
static std::unique_ptr<cRedstoneHandler> CreateComponent(BLOCKTYPE a_BlockType);
// oh yea its crazy time
cIncrementalRedstoneSimulatorChunkData m_Data;
} ;