Adjusted RipeMeta for off by one error (#3691)
This commit is contained in:
parent
05c3e8bed8
commit
dffbf0b510
@ -29,7 +29,7 @@ public:
|
|||||||
cFastRandom rand;
|
cFastRandom rand;
|
||||||
|
|
||||||
// If not fully grown, drop the "seed" of whatever is growing:
|
// If not fully grown, drop the "seed" of whatever is growing:
|
||||||
if (a_Meta < RipeMeta)
|
if (a_Meta < (RipeMeta - 1))
|
||||||
{
|
{
|
||||||
switch (m_BlockType)
|
switch (m_BlockType)
|
||||||
{
|
{
|
||||||
@ -97,7 +97,7 @@ public:
|
|||||||
|
|
||||||
// If there is still room to grow and the plant can grow, then grow.
|
// If there is still room to grow and the plant can grow, then grow.
|
||||||
// Otherwise if the plant needs to die, then dig it up
|
// Otherwise if the plant needs to die, then dig it up
|
||||||
if ((Meta < RipeMeta) && (Action == paGrowth))
|
if ((Meta < (RipeMeta - 1)) && (Action == paGrowth))
|
||||||
{
|
{
|
||||||
a_Chunk.FastSetBlock(a_RelX, a_RelY, a_RelZ, m_BlockType, ++Meta);
|
a_Chunk.FastSetBlock(a_RelX, a_RelY, a_RelZ, m_BlockType, ++Meta);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user