Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default speeds UI listing some non-road assets #510

Closed
originalfoo opened this issue Aug 25, 2019 · 2 comments · Fixed by #513
Closed

Default speeds UI listing some non-road assets #510

originalfoo opened this issue Aug 25, 2019 · 2 comments · Fixed by #513
Labels
11 ALPHA TM:PE v11 alpha edition BUG Defect detected confirmed Represents confirmed issue or bug LABS TM:PE LABS branch SPEED LIMITS Feature: Speed limits
Milestone

Comments

@originalfoo
Copy link
Member

While testing a PR, I noticed the default speeds panel is including some non-road assets:

image

Note also the titlebar text too big in German language.

The issue seems to affect several kinds of network; they are not being filtered to only vehicle networks.

Network assets for testing:

Some others in the Workshop (I've not tested these but they possibly also have same issue of not being filtered out):

If we can't properly filter we might instead need a blacklist of "things that look like networks but really are not".

Correctly filtered out:

  • Pedestrian paths
  • Fences
  • Power lines
  • Ship / Aircraft routes
  • Cable car wires
  • Castle ruin walls
  • Airport runways and taxiways
  • Curbs
  • Canals
  • Pipes
  • Flood walls and quays
  • Bunch of other weird workshop networks I have
@originalfoo originalfoo added BUG Defect detected confirmed Represents confirmed issue or bug LABS TM:PE LABS branch 11 ALPHA TM:PE v11 alpha edition SPEED LIMITS Feature: Speed limits labels Aug 25, 2019
@originalfoo
Copy link
Member Author

originalfoo commented Aug 26, 2019

Been looking at the segments in Mod Tools scene explorer, noticed following in their .Info (type: NetInfo) property:

  • m_vehicleTypes = None is common on assets that should be filtered
    • That also applies to pedestrian-only paths
    • But not bicycle paths (m_vehicleTypes = Bicycle)

In summary, I think a viable filter could be something like:

// pseudo code

private bool CheckCanHaveSpeedLimit(NetInfo info) {
   return info.m_vehicleTypes != None && info.m_vehicleTypes != Bicycle ;
}

Or, alternatively, check that vehicle type can be car, train, tram, monorail, metro and any others I've not thought of.

@originalfoo
Copy link
Member Author

Also, TM:PE scans all networks during loading process at some point, so could likely hook in to that and cache results.

Could possibly also investigate #378 at same time?

originalfoo added a commit that referenced this issue Aug 30, 2019
First commit ensures that non-vehicle networks (eg. decorative networks) and bicycle paths are skipped in the speed limit manager.

Fixes #510

Second commit will add some logging either side of null netinfos to hopefully make source of them easier to track down (I suspect it's something to do with NExt2 or MOM).

#Fixes #378
@originalfoo originalfoo added this to the 11.0 milestone Nov 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
11 ALPHA TM:PE v11 alpha edition BUG Defect detected confirmed Represents confirmed issue or bug LABS TM:PE LABS branch SPEED LIMITS Feature: Speed limits
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant