Fix map drawing commands to report bad unit arguments

Before, they failed without explanation when they interpreted the
argument as unit number, but the player didn't own that unit.
This commit is contained in:
Markus Armbruster 2011-04-10 09:14:29 +02:00
parent d3004510c8
commit 10f6ffde62

View file

@ -92,9 +92,11 @@ do_map(int bmap, int unit_type, char *arg, char *map_flags_arg)
return RET_SYN;
break;
default:
if (unit_map(unit_type, atoi(arg), &ns, &origin) < 0)
if (unit_map(unit_type, atoi(arg), &ns, &origin) < 0) {
pr("No such %s\n", ef_nameof(unit_type));
return RET_FAIL;
}
}
map_flags = parse_map_flags(bmap, map_flags_arg);
if (map_flags < 0)