Colin has spotted a bug : if you try to add or remove electrification, you will find that your money increases drastically.
Thank you for the report - problem found and will be fixed in the next version :-)
WTF, this has been a problem in simutrans-standard a long time ago... and it was not in the 4.4 version...
Why is this problem always comping back...
Because the base values for the price of the way object is an unsigned integer. If that is used in the accounting without casting, where a - is used, it overflows and becomes a very high number. The fix is to cast it to a signed integer somewhere, but, if the code is changed around, somebody might well forget to cast it back again.
Quote from: jamespetts on July 05, 2009, 11:12:23 AM
Because the base values for the price of the way object is an unsigned integer. If that is used in the accounting without casting, where a - is used, it overflows and becomes a very high number. The fix is to cast it to a signed integer somewhere, but, if the code is changed around, somebody might well forget to cast it back again.
That explains it
Quote from: Nathan Samson on July 05, 2009, 11:56:43 AM
That explains it
Quote from: Nathan Samson on July 05, 2009, 10:28:47 AM
WTF, this has been a problem in simutrans-standard a long time ago... and it was not in the 4.4 version...
Why is this problem always coming back...
This post by Nathan is strange to me because, the many years that I have been playing Simutrans this is the first time I have come across this particular phenomenon. I must have missed a version somewhere down the track.
Quote from: Colin on July 05, 2009, 04:44:07 PM
This post by Nathan is strange to me because, the many years that I have been playing Simutrans this is the first time I have come across this particular phenomenon. I must have missed a version somewhere down the track.
I think I made a mistake:
I interpreted electrifaction as laying power lines between a power factory and another factory, but what was meant here was electrification of tracks
Quote from: Nathan Samson on July 05, 2009, 09:25:45 PM
I think I made a mistake:
I interpreted electrifaction as laying power lines between a power factory and another factory, but what was meant here was electrification of tracks
I thought I had'nt seen this bug before. Yes it is electrification of Tram & Train lines.
Quote from: Colin on July 05, 2009, 09:30:13 PM
I thought I had'nt seen this bug before. Yes it is electrification of Tram & Train lines.
Thats what I mean, this particular bug indeed didn't exist before (as far as I know), but a similar bug with powerlines did
This bug seems to be reappeared in ver 6.1 again.
Thank you for the report - I will have to look into this...
Edit: I cannot reproduce this. Can you give more details about the circumstances in which it occurs?
QuoteI interpreted electrifaction as laying power lines between a power factory and another factory, but what was meant here was electrification of tracks
QuoteThats what I mean, this particular bug indeed didn't exist before (as far as I know), but a similar bug with powerlines did
For me it looks now exactly as this. Construct power line on every title gives me ~43000000 $ .
It happens when I have exe built from sources, or downloaded from http://www.43-1.org/~simutrans/simutrans-exp/i386/.
I have used clean configs but all time the same. Build 5.1 ( released 17 VII 2009 ) works ok , build 6.1 ( released 26 VII 2009 ) gives 43M per power line title.
Ubuntu 9.04, 32-bit
EDIT: I tested pak64 and pak128 on both problem is reproducible.
Ahh, sorry, I thought that it was to way electrification that reference was being made. I have found this and fixed it, and the fix will be available with the next release.
Could you commit fix to github? Current version because of this bug has very limited playability - no power lines at all
That'll be done to-morrow - I can't do it in advance of a release, because the Linux nightlies will then automatically build, and I don't want them being built with a half-baked version.