Simplify hit detection code
Merge pull request #3014 from elemoine/simplifyreplay

Simplify hit detection code