equal
deleted
inserted
replaced
98 WaypointID cid = 0; // current index, goes to GetWaypointPoolSize()-1, then wraps to 0 |
98 WaypointID cid = 0; // current index, goes to GetWaypointPoolSize()-1, then wraps to 0 |
99 do { |
99 do { |
100 Waypoint *lwp = GetWaypoint(cid); |
100 Waypoint *lwp = GetWaypoint(cid); |
101 |
101 |
102 /* check only valid waypoints... */ |
102 /* check only valid waypoints... */ |
103 if (lwp->IsValid() && wp != lwp) { |
103 if (lwp->IsValid() && wp != lwp) { |
104 /* only waypoints with 'generic' name within the same city */ |
104 /* only waypoints with 'generic' name within the same city */ |
105 if (lwp->name == NULL && lwp->town_index == wp->town_index) { |
105 if (lwp->name == NULL && lwp->town_index == wp->town_index) { |
106 /* if lwp->town_cn < next, uint will overflow to '+inf' */ |
106 /* if lwp->town_cn < next, uint will overflow to '+inf' */ |
107 uint i = (uint)lwp->town_cn - next; |
107 uint i = (uint)lwp->town_cn - next; |
108 |
108 |