clintbellanger/flare-engine — pull request #47 by dorkster (2012-09-26 23:54:34+00:00)
Title: Fix cases where dying enemies would attempt to move

This fixes patrolling enemies leaving blocked tiles after they die. Here's what was happening:

1. Enemy is killed. Its collision area is unblocked in Enemy::takeHit()
2. In BehaviorStandard, the state would switch to ENEMY_DEAD or ENEMY_CRITDEAD
3. Enemy logic continues to run until the enemy is a corpse (last frame of the dying animation)
4. That logic would "move" the enemy and block a new tile, which would never be unblocked