If I switch off YAPF for road vehicles, it fixes the problem.
This is a great way of sabotaging the opponent's road vehicles but I‘m sure it‘s not intended.

I’m using the nightly build at r5508.
Moderator: OpenTTD Developers
Added the savegame, the game crashes around the 8th October.openttd: yapf/hashtable.hpp:228: void CHashTableT<Titem_, Thash_bits_>::Push(Titem_&) [with Titem_ = CYapfRailNodeT<CYapfNodeKeyExitDir>, int Thash_bits_ = 10]: Assertion `&slot.Find(new_item.GetKey()) == __null' failed.
Code: Select all
Node& n = Yapf().GetBestNode();
TileIndex depot_tile = n.m_segment_last_tile;
assert(IsTileDepotType(depot_tile, TRANSPORT_ROAD));
+ if (!IsTileOwner(depot_tile, (Owner)v->owner)) return false;
Depot* ret = GetDepotByTile(depot_tile);
return ret;
Code: Select all
// TODO: change road YAPF unit from 10 to YAPF_TILE_LENGTH
Code: Select all
// sometimes the roadveh is not on the road (it resides on non-existing track)
// how should we handle that situation?
But what if you enable the option to let vehicles actually use other players' depots? IMO it would be advisable to have it check for that option.mart3p wrote:2. Road vehicles finding opponents depot (as reported above).
I added a line to FindNearestDepot in yapf_road.cpp, that returns false if the depot found, is not owned by the vehicle's owner. It would be better to only search for the owner's depots in the first place but I couldn't see an easy way of doing that.
r5897mart3p wrote:2. Road vehicles finding opponents depot (as reported above).
I added a line to FindNearestDepot in yapf_road.cpp, that returns false if the depot found, is not owned by the vehicle's owner.
r5898mart3p wrote:4. The goto depot command is not always working for road vehicles.
This is not a YAPF problem but effects YAPF's depot finding
Code: Select all
SDT_VAR (Patches, yapf.road_curve_penalty, SLE_UINT, NS, 0, 1 * YAPF_TILE_LENGTH, 0, 1000000, STR_NULL, NULL),
That happened due to the fact that I started the fix of r6186 before 6174 and the revision that added the road_curve_penalty to the settings. I have updated to the latest revision before committing and SVN failed to notice that there was a conflict and it 'just' ignored the changes KUDr made, which resulted in the fact that I effectively reverted them.mart3p wrote:The problem of road vehicles preferring bends has reappeared. It seems that the line in settings.c:was removed by the changes made at r6186. It also seems that the change from SDT_CONDVARs to SDT_VARs made at r6174 was also reverted by r6186.Code: Select all
SDT_VAR (Patches, yapf.road_curve_penalty, SLE_UINT, NS, 0, 1 * YAPF_TILE_LENGTH, 0, 1000000, STR_NULL, NULL),
Users browsing this forum: No registered users and 21 guests