2022-08-09 18:00 EDT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001823FSSCPFREDpublic2008-11-20 15:02
Assigned Tokarajorma 
Product Version3.6.9 
Target VersionFixed in Version3.6.10 
Summary0001823: Rand-multiple has multiple problems
DescriptionHere's the latest. Attempting to do a random range from -400000 to 400000 it looked like the values kept repeating. Displaying the results to the screen it seems that the highest values archived never exceeded -370000. Reworked it to do between 0 and 800000 and the results never exceeded 30000.

Rand-multiple also has a habit of repeating values and starting at the same value just like rand. Haven't been able to narrow down why but you seem to be able to get around it if you use a separate every-time event to evaluate random-multiple and store the values to variables.
Additional InformationNoticed in TBP 3.6.9 but confirmed in recent 3.6.10 builds. I'll upload a couple of test missions as soon as I strip out the classified parts. Also need to make or find an example of the second part. No seed values used.
TagsNo tags attached.
Attached Files




FUBAR-BDHR (developer)

First test mission uploaded. It already made a liar out of me. It hit as high as -367496 one time.


chief1983 (administrator)

Understandable since the problem is that it will never go greater than 32768, and that's a difference of 32504, near the upper edge of its limit. Now if you saw it go higher than 367232, it'd be very strange indeed.


karajorma (administrator)

Fixed. But it's not the only place that the game uses rand() so the others will need to be checked sooner or later.

-Issue History
Date Modified Username Field Change
2008-11-17 15:32 FUBAR-BDHR New Issue
2008-11-17 16:47 karajorma Status new => assigned
2008-11-17 16:47 karajorma Assigned To => karajorma
2008-11-17 19:52 FUBAR-BDHR File Added: randtest.fs2
2008-11-17 19:53 FUBAR-BDHR Note Added: 0010214
2008-11-19 12:42 chief1983 Note Added: 0010233
2008-11-20 15:02 karajorma Status assigned => resolved
2008-11-20 15:02 karajorma Fixed in Version => 3.6.10
2008-11-20 15:02 karajorma Resolution open => fixed
2008-11-20 15:02 karajorma Note Added: 0010241
+Issue History