Elvas Tower: XNAMatrix.M32 returns a NaN value - Elvas Tower

Jump to content

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

XNAMatrix.M32 returns a NaN value Rate Topic: -----

#11 User is offline   edwardk 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 1,350
  • Joined: 11-December 09
  • Gender:Male
  • Location:Chula Vista, CA
  • Simulator:MSTS
  • Country:

Posted 12 August 2015 - 12:24 PM

I am going to throw this question out there. Is MSTS's ability to work with invisible items such as the item mentioned above and the FRED and the reason to work with them considered a hack? I ask because even though OR is considered more advanced than MSTS, understanding how the above items are suppose to be processed is beneficial to the project. In short, we never found a proper way to work with them.

Edward K.

#12 User is offline   copperpen 

  • Executive Vice President
  • Group: Status: Elite Member
  • Posts: 3,144
  • Joined: 08-August 05
  • Gender:Male
  • Simulator:MSTS & OR
  • Country:

Posted 12 August 2015 - 01:34 PM

I don't think they are a hack in the true sense of the word. They are an anomaly like the invisible cars with no couplers that in MSTS do not couple to the train, but in OR they do. I even have a complete consist that has no couplers, but in OR the behaviour is exactly the same as one that has couplers.

#13 User is online   James Ross 

  • Open Rails Developer
  • Group: Status: Elite Member
  • Posts: 5,492
  • Joined: 30-June 10
  • Gender:Not Telling
  • Simulator:Open Rails
  • Country:

Posted 13 August 2015 - 04:41 AM

View Postdennisat, on 12 August 2015 - 09:39 AM, said:

I've tested a patch to XNAMatrixFromMSTSCoordinates() that detects the zero divide condition that causes XNAMatrix to have bad values. The patch is on the bug report Bug 1484205. Since I've forgotten practically everything I learnt about matrices 45 years ago, I'm prepared for some adverse comments!

Thanks for the patch! I don't know off-hand if the code "run = 1" is right but myself or someone else should be able to confirm that by looking at some of the other code (more than is included in the patch file itself).

View Postedwardk, on 12 August 2015 - 12:24 PM, said:

I am going to throw this question out there. Is MSTS's ability to work with invisible items such as the item mentioned above and the FRED and the reason to work with them considered a hack? I ask because even though OR is considered more advanced than MSTS, understanding how the above items are suppose to be processed is beneficial to the project. In short, we never found a proper way to work with them.

My personal feelings are that they are tricks (rather than hacks) in the MSTS world, but either way I would consider them low priority for compatibility. Even so, when we find a bug in fundamental-style code (like we did here with XNAMatrixFromMSTSCoordinates) we should definitely fix it, since this code (despite its name in this case) is very likely to live on in to the OR content world.

#14 User is offline   dennisat 

  • Conductor
  • Group: Status: Contributing Member
  • Posts: 474
  • Joined: 16-February 13
  • Gender:Male
  • Simulator:Open Rails & MSTS
  • Country:

Posted 13 August 2015 - 06:19 AM

View PostJames Ross, on 13 August 2015 - 04:41 AM, said:

Thanks for the patch! I don't know off-hand if the code "run = 1" is right but myself or someone else should be able to confirm that by looking at some of the other code (more than is included in the patch file itself)

Yes, I think it will be clear what I'm suggesting when you see the patch applied to the source.

Dennis

  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users