Skip to content

Commit

Permalink
Simpler code.
Browse files Browse the repository at this point in the history
  • Loading branch information
bearbin committed Oct 18, 2014
1 parent 59902c2 commit f280c36
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/BlockEntities/FurnaceEntity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,8 @@ bool cFurnaceEntity::Tick(float a_Dt, cChunk & a_Chunk)

if (m_FuelBurnTime <= 0)
{
// Cooked time decreases twice as fast when ran out of fuel
m_TimeCooked -= 2;
m_TimeCooked = std::max(m_TimeCooked, 0);
// If a furnace is out of fuel, the progress bar reverses at twice the speed of cooking.
m_TimeCooked = std::max((m_TimeCooked - 2), 0);

// Reset progressbars, block type, and bail out
a_Chunk.FastSetBlock(GetRelX(), m_PosY, GetRelZ(), E_BLOCK_FURNACE, m_BlockMeta);
Expand Down

0 comments on commit f280c36

Please sign in to comment.