diff options
author | Mattes D <github@xoft.cz> | 2015-03-20 16:11:50 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-03-20 16:11:50 +0100 |
commit | 8a43da07233fd8ab59dca14b8c14668f0651624b (patch) | |
tree | 79d0fe2868b9abe1690a813a5930e996e61db15f /src/Blocks | |
parent | Merge pull request #1821 from bibo38/bugfix1765 (diff) | |
parent | Added cPluginLua::cResettable interface, used for scheduled tasks. (diff) | |
download | cuberite-8a43da07233fd8ab59dca14b8c14668f0651624b.tar cuberite-8a43da07233fd8ab59dca14b8c14668f0651624b.tar.gz cuberite-8a43da07233fd8ab59dca14b8c14668f0651624b.tar.bz2 cuberite-8a43da07233fd8ab59dca14b8c14668f0651624b.tar.lz cuberite-8a43da07233fd8ab59dca14b8c14668f0651624b.tar.xz cuberite-8a43da07233fd8ab59dca14b8c14668f0651624b.tar.zst cuberite-8a43da07233fd8ab59dca14b8c14668f0651624b.zip |
Diffstat (limited to 'src/Blocks')
-rw-r--r-- | src/Blocks/BlockPiston.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Blocks/BlockPiston.cpp b/src/Blocks/BlockPiston.cpp index 5816920f7..d9f4913d8 100644 --- a/src/Blocks/BlockPiston.cpp +++ b/src/Blocks/BlockPiston.cpp @@ -179,7 +179,7 @@ void cBlockPistonHandler::ExtendPiston(int a_BlockX, int a_BlockY, int a_BlockZ, a_World->SetBlock(a_BlockX, a_BlockY, a_BlockZ, pistonBlock, pistonMeta | 0x8); a_World->SetBlock(extx, exty, extz, E_BLOCK_PISTON_EXTENSION, pistonMeta | (IsSticky(pistonBlock) ? 8 : 0), false); - a_World->ScheduleTask(PISTON_TICK_DELAY, new cWorld::cTaskSendBlockToAllPlayers(ScheduledBlocks)); + a_World->ScheduleTask(PISTON_TICK_DELAY, std::make_shared<cWorld::cTaskSendBlockToAllPlayers>(ScheduledBlocks)); } @@ -229,7 +229,7 @@ void cBlockPistonHandler::RetractPiston(int a_BlockX, int a_BlockY, int a_BlockZ std::vector<Vector3i> ScheduledBlocks; ScheduledBlocks.push_back(Vector3i(a_BlockX, a_BlockY, a_BlockZ)); ScheduledBlocks.push_back(Vector3i(tempx, tempy, tempz)); - a_World->ScheduleTask(PISTON_TICK_DELAY + 1, new cWorld::cTaskSendBlockToAllPlayers(ScheduledBlocks)); + a_World->ScheduleTask(PISTON_TICK_DELAY + 1, std::make_shared<cWorld::cTaskSendBlockToAllPlayers>(ScheduledBlocks)); return; } } @@ -239,7 +239,7 @@ void cBlockPistonHandler::RetractPiston(int a_BlockX, int a_BlockY, int a_BlockZ std::vector<Vector3i> ScheduledBlocks; ScheduledBlocks.push_back(Vector3i(a_BlockX, a_BlockY, a_BlockZ)); - a_World->ScheduleTask(PISTON_TICK_DELAY + 1, new cWorld::cTaskSendBlockToAllPlayers(ScheduledBlocks)); + a_World->ScheduleTask(PISTON_TICK_DELAY + 1, std::make_shared<cWorld::cTaskSendBlockToAllPlayers>(ScheduledBlocks)); } |