/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2010, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
char *pt = pathtaken;
char bmap_flag;
int ac;
- short type;
+ int type;
leader = get_leader(ulist);
leader_uid = leader->uid;
continue;
}
ac = parse(cp, scanspace, player->argp, NULL, NULL, NULL);
- if (ac <= 1) {
+ if (ac <= 0) {
+ player->argp[0] = "";
+ cp = NULL;
+ } else if (ac == 1) {
sprintf(dp, "%d", leader->uid);
player->argp[1] = dp;
cp++;
skip = 1;
continue;
case 'd':
- if (ac == 2) {
- player->argp[2] = player->argp[1];
+ if (ac < 3) {
+ player->argp[2] = ac < 2 ? "1" : player->argp[1];
sprintf(dp, "%d", leader->uid);
player->argp[1] = dp;
}
mine();
else
landmine();
+ stopping = 1;
skip = 1;
player->btused++;
continue;
{
char *ptr;
struct nstr_sect ns;
- struct natstr *np;
struct sctstr sect;
int i;
/* Note this is not re-entrant anyway, so we keep the buffers
return RET_FAIL;
}
snxtsct_dist(&ns, x, y, 1);
- np = getnatp(player->cnum);
blankfill(wmapbuf, &ns.range, 1);
while (nxtsct(&ns, §)) {
ptr = &wmap[ns.dy][ns.dx];