ported from zombie game.