leezer3 / OpenBVE

OpenBVE- A free train simulator
http://www.openbve-project.net
275 stars 52 forks source link

Grade indication refers to wrong spot #976

Open mtkft opened 8 months ago

mtkft commented 8 months ago

Description

The grade indications obtained by typing C-n in the sim seem to be based on track/fly-by cam position rather than vehicle

Reproduction

  1. enable grade display (C-n one, two, or three times depending on your mode preference)
  2. move train to grade or flat and make note of indication
  3. move freecam to somewhere else where the track (I guess wherever the camera is abeam) is at a different grade (or is flat/not flat, whichever the train's zero position isn't) and observe indication has changed

Route

Menvár route 1 via bve.hu

Train

>custom "K" car being dev'd by me, but probs not applicable<

Logs

openBVE Bug Report01_01_2024.zip

Related information

leezer3 commented 8 months ago

This sounds like you're using the track-based camera (F3), not free camera (F2)

When in free camera mode or in-cab, the gradient displayed will be that at the train's position. In track based camera mode, the camera follows the gradient / curve of the track, and so it would at first thought appear logical that the gradient displayed is that of the current camera position?

mtkft commented 8 months ago

Calling either of them "freecam" is probably not the best move just re: ambiguity, but I'm editing my OP to affirm that yeah, F3 mode track camera.

The speed and distance-to-stop/-pass indications stay in reference to the train, so I would argue knowing it at the train position is good for consistency. Two thoughts.

  1. I shoulda checked myself before I wrecked myself: this isn't a regression, as I've just observed it with my older version I play for plugin reasons, 1.8.4.4
  2. It's arguably more useful in some situations to know how your train is situated so as not to panic if you come off the brakes at a stop or want to be proactive with power/brakes on a grade in general (while moving, that is). In the immortal words of that ad for beans, ¿porqué no los dos? I could maybe retreat to a fork and offer a PR about this and a different grade-related issue I've not complained about in this thread, or you can just close this as a wontfix if you're more compelled by (1) than by (2).
leezer3 commented 8 months ago

Dunno to be honest, I think that either is probably 'correct' in it's own way.

With my thinking hat on, speed and distance to station are still distinctly train related mind. IIRC this was something that got added relatively early on, and isn't something anybody has actually commented on before......

Marginally unrelated- What is the plugin issue with the current version? Not aware of anything being specifically broken at the minute.....

mtkft commented 8 months ago

That's certainly emboldening! I'll have a little PR together this week and tested if/when I can work my way into building my forked code (because I might talk the talk but I really am pretty green with actual application programs). Can/should I make a branch about this or pr from a forked repo?

The plugin thing isn't you: the three fabulous releases that OpenBVE Workshop (Gábor Cserháti and Levente Kasza, as I recall, are the masterminds) pushed out before they closed up shop >shaking my fist at kids doing shameless plagiarism< feature custom ATS plugins that animate cab switches (door side select, turn signals/hazards/brights, bell plunger) and the exterior turn signals. Oh, and the spring-loaded hold brake of Ganz/Tatra >read: PCCs far removed< fame also seems to depend on that plugin. Those work in 1.8.[not sure when they actually broke] 64bit or in 1.9.* 32bit, which comes with its own issues, so I retain a copy of 1.8.4.4 for my Budapest trolley fix. But I've rambled long enough, I'm on discord at the same five letters to offer more rants.

leezer3 commented 8 months ago

Please, any contributions are welcome.

With the plugin, they seem to have pulled the downloads, otherwise I'd have a closer look. If you zip up the dll and cfg files and upload them here, I can take a look at what they're doing and see if anything obvious is the matter.