Fix NaN bug in calculation of mass center

The visible effect was that some Narjillos ended up having an energy of
NaN, so they ended up as zombies who couldn't die.