1
0

Adjusted RipeMeta for off by one error (#3691)

This commit is contained in:
dbhicks 2017-05-05 21:41:01 -04:00 committed by worktycho
parent 05c3e8bed8
commit dffbf0b510

View File

@ -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);
} }