Unit sensing code now stores the nearest attacked friendly unit, used for determining if the unit should engage the enemy.