(fuel, load, shp_check_nav, retreat_ship1, shp_nav_one_sector)
(shp_check_nav, sail_nav_fleet, bigcity_dchr[], sector_navigation[]) (d_navigation): Add a NEW d_navigation enum NAV_CANAL to indicate that a sector has canal capability. Add canal determination logic to shp_check_nav(). Update sector_navigation[] with new canal navigation enum. Use shp_check_nav() to determine the sector can be navigated.
This commit is contained in:
parent
82df8cfe0c
commit
74e4e2810a
9 changed files with 44 additions and 45 deletions
|
@ -188,7 +188,7 @@ retreat_ship1(struct shpstr *sp, s_char code, int orig)
|
|||
}
|
||||
|
||||
getsect(sp->shp_x, sp->shp_y, §);
|
||||
switch (shp_check_nav(§)) {
|
||||
switch (shp_check_nav(§, sp)) {
|
||||
case CN_CONSTRUCTION:
|
||||
wu(0, sp->shp_own,
|
||||
"%s %s,\nbut was caught in a construction zone, and couldn't retreat!\n",
|
||||
|
@ -262,7 +262,7 @@ retreat_ship1(struct shpstr *sp, s_char code, int orig)
|
|||
mobcost = 480.0 / (mobcost + techfact(sp->shp_tech, mobcost));
|
||||
|
||||
getsect(newx, newy, §);
|
||||
if (shp_check_nav(§) != CN_NAVIGABLE ||
|
||||
if (shp_check_nav(§, sp) != CN_NAVIGABLE ||
|
||||
(sect.sct_own && !player->owner &&
|
||||
getrel(getnatp(sect.sct_own), sp->shp_own) < FRIENDLY)) {
|
||||
wu(0, sp->shp_own, "%s %s,\nbut could not retreat to %s!\n",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue