View Issue Details

IDProjectCategoryView StatusLast Update
0001823FSSCPFREDpublic2008-11-20 20:02
ReporterFUBAR-BDHR Assigned Tokarajorma  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.6.9 
Fixed 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.

Activities

2008-11-18 00:52

 

randtest.fs2 (3,655 bytes)

FUBAR-BDHR

2008-11-18 00:53

developer   ~0010214

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

chief1983

2008-11-19 17:42

administrator   ~0010233

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

2008-11-20 20:02

administrator   ~0010241

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 20:32 FUBAR-BDHR New Issue
2008-11-17 21:47 karajorma Status new => assigned
2008-11-17 21:47 karajorma Assigned To => karajorma
2008-11-18 00:52 FUBAR-BDHR File Added: randtest.fs2
2008-11-18 00:53 FUBAR-BDHR Note Added: 0010214
2008-11-19 17:42 chief1983 Note Added: 0010233
2008-11-20 20:02 karajorma Status assigned => resolved
2008-11-20 20:02 karajorma Fixed in Version => 3.6.10
2008-11-20 20:02 karajorma Resolution open => fixed
2008-11-20 20:02 karajorma Note Added: 0010241