mirror of
https://github.com/neoStudiosLCE/neoLegacy.git
synced 2026-06-09 02:13:09 +00:00
fix leaves decaying
This commit is contained in:
parent
5180196d9b
commit
364c2039a5
|
|
@ -137,11 +137,11 @@ void LeafTile::tick(Level *level, int x, int y, int z, Random *random)
|
|||
for (int yo = -r; yo <= r; yo++)
|
||||
{
|
||||
int t = level->getTile(x + xo, y + yo, z + zo);
|
||||
if (t == (Tile::treeTrunk_Id||Tile::tree2Trunk_Id))
|
||||
if (t == Tile::treeTrunk_Id || t == Tile::tree2Trunk_Id)
|
||||
{
|
||||
checkBuffer[(xo + WO) * WW + (yo + WO) * W + (zo + WO)] = 0;
|
||||
}
|
||||
else if (t == (Tile::leaves_Id||Tile::leaves2_Id))
|
||||
else if (t == Tile::leaves_Id || t == Tile::leaves2_Id)
|
||||
{
|
||||
checkBuffer[(xo + WO) * WW + (yo + WO) * W + (zo + WO)] = -2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ void TreeTile2::onRemove(Level* level, int x, int y, int z, int id, int data)
|
|||
for (int zo = -r; zo <= r; zo++)
|
||||
{
|
||||
int t = level->getTile(x + xo, y + yo, z + zo);
|
||||
if (t == (Tile::leaves_Id||Tile::leaves2_Id))
|
||||
if (t == Tile::leaves_Id || t == Tile::leaves2_Id)
|
||||
{
|
||||
int currentData = level->getData(x + xo, y + yo, z + zo);
|
||||
if ((currentData & LeafTile::UPDATE_LEAF_BIT) == 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue