Bugfix: holding jump then moving off a ledge

It produced an undesired floating behavior.
Added basic framework for taking damage