/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2014, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2015, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure, Markus Armbruster
*
* Empire is free software: you can redistribute it and/or modify
struct mchrstr *mcp;
int changed;
- if (opt_SAIL) {
- /* can't retreat a ship that's sailin, bad things happend */
- if (*sp->shp_path) {
- wu(0, sp->shp_own,
- "%s %s,\nbut had sailing orders, and couldn't retreat!\n",
- prship(sp), conditions[findcondition(code)].desc[orig]);
- return 0;
- }
- }
/* check crew - uws don't count */
if (sp->shp_item[I_MILIT] == 0 && sp->shp_item[I_CIVIL] == 0) {
wu(0, sp->shp_own,
getsect(sp->shp_x, sp->shp_y, §);
switch (shp_check_nav(sp, §)) {
- case NAV_02:
- case NAV_60:
+ case SHP_STUCK_NOT:
+ break;
+ case SHP_STUCK_CONSTRUCTION:
wu(0, sp->shp_own,
"%s %s,\nbut was caught in a construction zone, and couldn't retreat!\n",
prship(sp), conditions[findcondition(code)].desc[orig]);
return 0;
- case NAV_NONE:
- case NAV_CANAL:
- wu(0, sp->shp_own,
- "%s %s,\nbut was landlocked, and couldn't retreat!\n",
- prship(sp), conditions[findcondition(code)].desc[orig]);
- return 0;
- case NAVOK:
- break;
default:
CANT_REACH();
+ /* fall through */
+ case SHP_STUCK_CANAL:
+ case SHP_STUCK_IMPASSABLE:
wu(0, sp->shp_own,
- "%s %s,\nbut was subject to an empire error, and couldn't retreat!\n",
+ "%s %s,\nbut was landlocked, and couldn't retreat!\n",
prship(sp), conditions[findcondition(code)].desc[orig]);
return 0;
}
mobcost = shp_mobcost(sp);
getsect(newx, newy, §);
- if (shp_check_nav(sp, §) != NAVOK ||
+ if (shp_check_nav(sp, §) != SHP_STUCK_NOT ||
(sect.sct_own
&& relations_with(sect.sct_own, sp->shp_own) < FRIENDLY)) {
wu(0, sp->shp_own, "%s %s,\nbut could not retreat to %s!\n",