MantisBT - Zandronum
View Issue Details
0001604Zandronum[All Projects] Suggestionpublic2013-12-07 03:412018-09-30 23:06
Chronos Ouroboros 
Torr Samaho 
normalfeatureN/A
closedfixed 
 
2.02.0 
0001604: Backport frandom
frandom(returns a random floating point value between min and max) is a feature used by a bunch of mods, this could make several wads and Realm667 entries compatible with Zandronum.
2.4
child of 0001490closed Torr Samaho Backport ZDoom 2.5.0 
Issue History
2013-12-07 03:41Chronos OuroborosNew Issue
2013-12-07 03:42Chronos OuroborosNote Added: 0007668
2013-12-07 03:43Chronos OuroborosNote Edited: 0007668bug_revision_view_page.php?bugnote_id=7668#r4259
2014-01-14 18:49LlewellynNote Added: 0008003
2014-01-14 20:14DuskNote Added: 0008004
2014-01-14 20:14DuskAssigned To => Torr Samaho
2014-01-14 20:14DuskStatusnew => needs testing
2014-01-14 20:14DuskRelationship addedparent of 0001642
2014-01-14 20:15DuskRelationship addedchild of 0001490
2014-01-14 20:15DuskRelationship deletedparent of 0001642
2014-01-14 20:15DuskTarget Version => 2.0
2014-02-23 17:38QentNote Added: 0008275
2014-02-23 17:38QentStatusneeds testing => resolved
2014-02-23 17:38QentFixed in Version => 2.0-beta
2014-02-23 17:38QentResolutionopen => fixed
2015-01-23 04:56Blzut3Fixed in Version2.0-beta => 2.0
2018-09-30 23:06Blzut3Statusresolved => closed

Notes
(0007668)
Chronos Ouroboros   
2013-12-07 03:42   
(edited on: 2013-12-07 03:43)
I tried searching for this but there was no feature suggestion about this, so I added it since this is a very useful feature.
It's also my first suggestion, I don't know if I made it right...

(0008003)
Llewellyn   
2014-01-14 18:49   
If you really need FRandom right now, you can do what the source does right now for random, which is to multiply a decimal and a random number. An example used in the Decorate is to get the FRandom of 1 and 4.984375, you subtract the lower bound (1), and divide 255. Then in your replacement you do this: 1 + random(0, 255) * 0.015625
(0008004)
Dusk   
2014-01-14 20:14   
frandom should be present in Zandronum 2.0 alpha.
(0008275)
Qent   
2014-02-23 17:38   
Frandom works fine. There's some weird behavior were the result gets truncated to an int before doing some operations, but that is also a bug in ZDoom 2.5.0.