summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockPiston.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-03-20 15:13:33 +0100
committerMattes D <github@xoft.cz>2015-03-20 15:13:33 +0100
commit781c8683f7021ceb27dc83c19f7207322f2227d1 (patch)
tree9e723a35ce9d43627da12fd1901bde9ffed20e4b /src/Blocks/BlockPiston.cpp
parentUpdated Core. (diff)
downloadcuberite-781c8683f7021ceb27dc83c19f7207322f2227d1.tar
cuberite-781c8683f7021ceb27dc83c19f7207322f2227d1.tar.gz
cuberite-781c8683f7021ceb27dc83c19f7207322f2227d1.tar.bz2
cuberite-781c8683f7021ceb27dc83c19f7207322f2227d1.tar.lz
cuberite-781c8683f7021ceb27dc83c19f7207322f2227d1.tar.xz
cuberite-781c8683f7021ceb27dc83c19f7207322f2227d1.tar.zst
cuberite-781c8683f7021ceb27dc83c19f7207322f2227d1.zip
Diffstat (limited to '')
-rw-r--r--src/Blocks/BlockPiston.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Blocks/BlockPiston.cpp b/src/Blocks/BlockPiston.cpp
index 8d245cabe..1cc5524f0 100644
--- a/src/Blocks/BlockPiston.cpp
+++ b/src/Blocks/BlockPiston.cpp
@@ -169,7 +169,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));
}
@@ -219,7 +219,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;
}
}
@@ -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));
- a_World->ScheduleTask(PISTON_TICK_DELAY + 1, new cWorld::cTaskSendBlockToAllPlayers(ScheduledBlocks));
+ a_World->ScheduleTask(PISTON_TICK_DELAY + 1, std::make_shared<cWorld::cTaskSendBlockToAllPlayers>(ScheduledBlocks));
}