1
0

Functions in cPluginManager get references instead of pointers.

This commit is contained in:
Mattes D
2014-10-15 19:01:55 +02:00
parent c6725f8d28
commit eeb580a74e
29 changed files with 220 additions and 181 deletions

View File

@@ -6,14 +6,30 @@
#include "Root.h"
#include "Bindings/PluginManager.h"
class cBlockInServerPluginInterface : public cBlockPluginInterface
class cBlockInServerPluginInterface :
public cBlockPluginInterface
{
public:
cBlockInServerPluginInterface(cWorld & a_World) : m_World(a_World) {}
virtual bool CallHookBlockSpread(int a_BlockX, int a_BlockY, int a_BlockZ, eSpreadSource a_Source)
{
return cPluginManager::Get()->CallHookBlockSpread(m_World, a_BlockX, a_BlockY, a_BlockZ, a_Source);
}
virtual bool CallHookBlockToPickups(cEntity * a_Digger, int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta, cItems & a_Pickups) override
{
return cRoot::Get()->GetPluginManager()->CallHookBlockToPickups(&m_World, a_Digger, a_BlockX, a_BlockY, a_BlockZ, a_BlockType, a_BlockMeta, a_Pickups);
return cPluginManager::Get()->CallHookBlockToPickups(m_World, a_Digger, a_BlockX, a_BlockY, a_BlockZ, a_BlockType, a_BlockMeta, a_Pickups);
}
private:
cWorld & m_World;
};