When an attacking sector got lost while the player was at a prompt,
and the new owner was allied to the player, the server got confused:
1. If the sector attacked with mil, the server let the ghost mil
attack, but not occupy.
2. If the sector was allied, the server reported the sector loss and
land units dropping out of the attack, but claimed the lost sector was
yours.
Fix 1. by dropping sectors from attack when they change owner away
from the player, regardless of relations. Side effect: also drops any
surviving land units there. Before, they dropped out only if the new
owner wasn't allied to the player. That change's okay.
Fix 2. the obvious way: change the messages.
Broken in 4.0.0.
mil);
com->troops = mil;
} else { /* attacker */
mil);
com->troops = mil;
} else { /* attacker */
- if (owner != player->cnum
- && getrel(getnatp(owner), player->cnum) != ALLIED) {
+ if (owner != com->own && owner != player->cnum) {
pr("WARNING: Your %d mil in %s were destroyed because %s just took the sector!\n",
com->mil, xyas(com->x, com->y, player->cnum),
cname(owner));
else
pr("WARNING: Your %d mil in %s were destroyed because %s just took the sector!\n",
com->mil, xyas(com->x, com->y, player->cnum),
cname(owner));
else
- pr("You no longer own %s\n",
- xyas(com->x, com->y, player->cnum));
+ pr("%s just took %s!\n",
+ cname(owner), xyas(com->x, com->y, player->cnum));
return att_combat_init(com, EF_BAD);
}
if (com->troops && com->troops + 1 > mil) {
return att_combat_init(com, EF_BAD);
}
if (com->troops && com->troops + 1 > mil) {
}
if (w < 0) {
lnd_print(player->cnum, llp,
}
if (w < 0) {
lnd_print(player->cnum, llp,
- "is in a sector not owned by you");
+ "can't attack from this sector now");
lnd_delete(llp);
continue;
}
lnd_delete(llp);
continue;
}