def move_camera(pos, scroll=False):
	_orig_pos = CAMERA_POS[:]
	
	if SETTINGS['controlling'] and SETTINGS['following'] == SETTINGS['controlling'] and locks.is_locked('camera_free'):
		_life = LIFE[SETTINGS['controlling']]
		_top_left = MAP_SIZE[:]
		_bot_right = [0, 0, 0]
		_seen = False
		
		for life_id in LIFE[SETTINGS['controlling']]['seen']:
			if LIFE[life_id]['dead']:
				continue
			
			if brain.knows_alife_by_id(LIFE[SETTINGS['controlling']], life_id)['alignment'] in ['trust', 'feign_trust']:
				continue
			
			_seen = True
			
			if LIFE[life_id]['pos'][0] < _top_left[0]:
				_top_left[0] = LIFE[life_id]['pos'][0]
			
			if _top_left[1] < LIFE[life_id]['pos'][1]:
				_top_left[1] = LIFE[life_id]['pos'][1]
			
			if LIFE[life_id]['pos'][0] > _bot_right[0]:
				_bot_right[0] = LIFE[life_id]['pos'][0]
			
			if LIFE[life_id]['pos'][1] > _bot_right[1]:
				_bot_right[1] = LIFE[life_id]['pos'][1]
			
			_target_pos = numbers.lerp_velocity(_top_left, _bot_right, 0.5)
			pos = numbers.lerp_velocity(pos, _target_pos, .35)[:2]
			pos.append(2)
			
			brain.flag(_life, 'camera_lean', value=_target_pos[:])
			brain.flag(_life, 'camera_lean_time', value=WORLD_INFO['ticks'])
			
			_future_time = brain.get_flag(_life, 'camera_lean_time_future')
			if not _future_time or WORLD_INFO['ticks']>_future_time:
				brain.flag(_life, 'camera_lean_time_future', value=WORLD_INFO['ticks']+30)
		
		if brain.get_flag(_life, 'camera_lean'):
			if _seen:
				_st = WORLD_INFO['ticks']-(brain.get_flag(_life, 'camera_lean_time_future')-30)
				_et = brain.get_flag(_life, 'camera_lean_time_future')-(brain.get_flag(_life, 'camera_lean_time_future')-30)
				_lerp = 1-numbers.clip(_st/float(_et), 0, 1.0)
				
				pos = numbers.lerp_velocity(pos, brain.get_flag(_life, 'camera_lean'), _lerp)[:2]
				pos.append(2)
			else:
				if WORLD_INFO['ticks']-brain.get_flag(_life, 'camera_lean_time')<=20:
					_lerp = .45-numbers.clip((WORLD_INFO['ticks']-brain.get_flag(_life, 'camera_lean_time'))/30.0, 0, .45)
					pos = numbers.lerp_velocity(pos, brain.get_flag(_life, 'camera_lean'), _lerp)[:2]
					pos.append(2)
				else:
					brain.unflag(_life, 'camera_lean')
					brain.unflag(_life, 'camera_lean_time')
	
	CAMERA_POS[0] = int(round(numbers.clip(pos[0]-(MAP_WINDOW_SIZE[0]/2), 0, MAP_SIZE[0]-MAP_WINDOW_SIZE[0])))
	CAMERA_POS[1] = int(round(numbers.clip(pos[1]-(MAP_WINDOW_SIZE[1]/2), 0, MAP_SIZE[1]-MAP_WINDOW_SIZE[1])))
	CAMERA_POS[2] = int(round(pos[2]))
	
	if not _orig_pos == CAMERA_POS:
		gfx.refresh_view('map')
	elif SETTINGS['controlling'] and not alife.brain.get_flag(LIFE[SETTINGS['controlling']], 'redraw') == pos:
		gfx.refresh_view('map')
	
	if SETTINGS['controlling']:
		alife.brain.flag(LIFE[SETTINGS['controlling']], 'redraw', value=pos[:])
dataset/ETHPy150Open flags/Reactor-3/reactor-3.py/move_camera/swapped operands of `<`