(sector_mcost, bp_neighbors): Fix for MOB_RAIL and sct_rail == 0.
Closes #781528.
if (do_bonus == MOB_ROAD) {
d = d / (1.0 + sp->sct_road / 122.0);
} else if (do_bonus == MOB_RAIL) {
+ if (sp->sct_rail <= 0)
+ return -1.0;
d = d / (1.0 + sp->sct_rail / 100.0);
} else {
if (d < 2.0)
bp_neighbors(struct as_coord c, struct as_coord *cp, void *pp)
{
struct sctstr *sectp = (void *)empfile[EF_SECTOR].cache;
+ struct bestp *bp = pp;
coord x, y;
coord nx, ny;
int n = 0, q;
move through it. We calculate it later. */
if (dchr[sp->sct_type].d_mcst == 0)
continue;
+ if (bp->bp_mobtype == MOB_RAIL && sp->sct_rail == 0)
+ continue;
if (sp->sct_own != from->sct_own)
continue;
cp[n].x = sx;