1
0

Changing pickup lifetime and combining semantics, making these adjustable in the lua api. (#3843)

This commit is contained in:
Lane Kolbly
2017-07-12 05:13:27 -05:00
committed by Lukas Pioch
parent 647d9082b8
commit 793acd267f
7 changed files with 151 additions and 6 deletions

View File

@@ -2223,6 +2223,22 @@ void cWorld::SpawnItemPickups(const cItems & a_Pickups, double a_BlockX, double
UInt32 cWorld::SpawnItemPickup(double a_PosX, double a_PosY, double a_PosZ, const cItem & a_Item, float a_SpeedX, float a_SpeedY, float a_SpeedZ, int a_LifetimeTicks, bool a_CanCombine)
{
cPickup * Pickup = new cPickup(a_PosX, a_PosY, a_PosZ, a_Item, false, a_SpeedX, a_SpeedY, a_SpeedZ, a_LifetimeTicks, a_CanCombine);
if (!Pickup->Initialize(*this))
{
delete Pickup;
Pickup = nullptr;
return cEntity::INVALID_ID;
}
return Pickup->GetUniqueID();
}
UInt32 cWorld::SpawnFallingBlock(int a_X, int a_Y, int a_Z, BLOCKTYPE BlockType, NIBBLETYPE BlockMeta)
{
cFallingBlock * FallingBlock = new cFallingBlock(Vector3i(a_X, a_Y, a_Z), BlockType, BlockMeta);