Skip to content

Commit

Permalink
Fix for colobot#294
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSimbax committed Mar 16, 2014
1 parent 244ca93 commit e569fd6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/object/task/taskrecover.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,11 @@ bool CTaskRecover::EventProcess(const Event &event)
if ( power != 0 )
{
energy = power->GetEnergy();
power->SetEnergy(energy-ENERGY_RECOVER*event.rTime*m_speed);
energy -= event.rTime * ENERGY_RECOVER / power->GetCapacity() * m_speed;
power->SetEnergy(energy);
}


speed.x = (Math::Rand()-0.5f)*0.1f*m_progress;
speed.y = (Math::Rand()-0.5f)*0.1f*m_progress;
speed.z = (Math::Rand()-0.5f)*0.1f*m_progress;
Expand Down

0 comments on commit e569fd6

Please sign in to comment.