View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0000484 | FSSCP | FRED | public | 2005-07-24 16:10 | 2006-03-02 02:45 |
| Reporter | karajorma | Assigned To | Goober5000 | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | resolved | Resolution | fixed | ||
| Summary | 0000484: Non-random behavoiour in the random-of SEXP | ||||
| Description | When using the random-of SEXP with a list of 5 items the 5th appears to get choosen less often than the other 4. In addition when used with a repeating when-argument SEXP the randomly choosen ship changes between repeats. | ||||
| Additional Information | More infomation and sample missions are available in this thread on HLP http://dynamic.gamespy.com/~freespace/forums/showthread.php?s=&threadid=33786 updated link: http://www.hard-light.net/forums/index.php/topic,33786.0.html | ||||
| Tags | No tags attached. | ||||
|
|
Since search isn't working you on the new site can you track down the original thread and post a link here? |
|
|
You're really on a roll, aren't you. ;) http://www.hard-light.net/forums/index.php/topic,33786.0.html As a general rule, to convert from an old thread to a new thread, just replace the number in the above link with the number in the threadID from the vB link. :) P.S. Have you committed the repeat-count fixes yet? :p |
|
|
Ah cool, thanks. I think I fixed this while HLP was down but I wanted be sure what I was seeing was actually what it was supposed to be doing, and from your comment in that thread it is. I was under the impression there was a test mission in that thread but I don't see one. Looks like there should be one in the last post but the link is missing. I'll just have to make something to test with myself and if it did get fixed I'll commit. "P.S. Have you committed the repeat-count fixes yet?" Nope, found a bug. A couple actually. Nothing big but from the bugs that keep getting reported to me, it's minor in comparrison, so I haven't worked on it any more. I'll try and get it finished and in CVS later today. |
|
|
There were a couple test missions in that thread, but they were attachments... and the attachments got lost when we switched boards. :( I've ICQ'd karajorma to re-upload his missions to Mantis. |
|
2005-11-18 17:59
|
|
|
2005-11-18 18:00
|
|
|
|
If I remember how this went Bosch should sing about there being 5 bottles of beer as often as any other number. As it was he only sang about it once in a blue moon. Anyway I've re-uploaded the mission for you. edited on: 11-18-05 13:04 |
|
|
Fixed. A value was being set in sexp[].value rather than sexp[].flags Why this was causing the last option to be picked less is beyond me but when I fixed the lack of persistance that bug died as well. |
|
|
Actually, I don't think this is fixed. :p I just noticed that random-of calls rand_internal for each iteration of the loop. And since C/C++ recalculates the loop limit on each iteration of the loop (something I didn't realize before) this results in the loop upper limit continually being changed. As a result the odds of getting the last entry in the list decrease the longer the list is. :p I'll fix this when I get home tonight. edited on: 03-01-06 16:08 |
|
|
K, that's fixed. |
|
|
Everything should work now. :) |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2005-07-24 16:10 | karajorma | New Issue | |
| 2005-07-24 19:39 | Goober5000 | Status | new => assigned |
| 2005-07-24 19:39 | Goober5000 | Assigned To | => Goober5000 |
| 2005-11-18 04:26 | taylor | Note Added: 0003883 | |
| 2005-11-18 04:46 | Goober5000 | Note Added: 0003884 | |
| 2005-11-18 04:46 | Goober5000 | Additional Information Updated | |
| 2005-11-18 09:09 | taylor | Note Added: 0003885 | |
| 2005-11-18 15:44 | Goober5000 | Note Added: 0003886 | |
| 2005-11-18 17:59 | karajorma | File Added: Bug Test 01 - Random Of.fs2 | |
| 2005-11-18 18:00 | karajorma | File Added: Bug Test 02 - Random Of.fs2 | |
| 2005-11-18 18:04 | karajorma | Note Added: 0003887 | |
| 2005-11-18 18:04 | karajorma | Note Edited: 0003887 | |
| 2006-03-01 18:22 | karajorma | Assigned To | Goober5000 => karajorma |
| 2006-03-01 19:58 | karajorma | Status | assigned => resolved |
| 2006-03-01 19:58 | karajorma | Resolution | open => fixed |
| 2006-03-01 19:58 | karajorma | Note Added: 0005007 | |
| 2006-03-01 21:07 | Goober5000 | Status | resolved => feedback |
| 2006-03-01 21:07 | Goober5000 | Resolution | fixed => reopened |
| 2006-03-01 21:07 | Goober5000 | Note Added: 0005010 | |
| 2006-03-01 21:08 | Goober5000 | Note Edited: 0005010 | |
| 2006-03-01 21:08 | Goober5000 | Note Edited: 0005010 | |
| 2006-03-02 02:45 | Goober5000 | Note Added: 0005014 | |
| 2006-03-02 02:45 | Goober5000 | Status | feedback => resolved |
| 2006-03-02 02:45 | Goober5000 | Resolution | reopened => fixed |
| 2006-03-02 02:45 | Goober5000 | Assigned To | karajorma => Goober5000 |
| 2006-03-02 02:45 | Goober5000 | Note Added: 0005015 |