CitiesSkylinesMods / TMPE

Cities: Skylines Traffic Manager: President Edition
https://steamcommunity.com/sharedfiles/filedetails/?id=1637663252
MIT License
574 stars 85 forks source link

Modernise several uses of `GetSortedLanes()` batch 2 #1496

Closed originalfoo closed 2 years ago

originalfoo commented 2 years ago

Another batch.

originalfoo commented 2 years ago

bump

originalfoo commented 2 years ago

Added guard against null segment Info and Info.m_lanes based on vanilla CSL code.

@krzychu124 || @kianzarrin can you do a quick check of https://github.com/CitiesSkylinesMods/TMPE/pull/1496/commits/cc2dc85b834448b8c80b03367f964df877e95bef just to make sure no issues before I merge?

kianzarrin commented 2 years ago

Oh sorry I forgot to look at this. We should generally use GetSegmentLaneIndexesAndIds() to avoid such mistakes. but that is out of scope of this PR

originalfoo commented 2 years ago

@kianzarrin that's tracked in https://github.com/CitiesSkylinesMods/TMPE/issues/1489