energy regeneration bugfix, float to int hack