HomeWildfire Games

Use pickRandom in random map scripts.
AuditedrP19305

Description

Use pickRandom in random map scripts.
Avoids helper index variables, replacing deprecated randInt calls, making the code shorter and nicer to read.

Patch By: bb
Differential Revision: https://code.wildfiregames.com/D222
Refs #4326 https://code.wildfiregames.com/D121

Details

Auditors
Sandarac
Committed
elexisMar 16 2017, 10:30 PM
Differential Revision
D121: Random function cleanup
Parents
rP19304: Fix lineendings of various new and old script and markup files.
Branches
Unknown
Tags
Unknown
Build Status
Buildable 787
Build 1243: Post-Commit BuildJenkins

Event Timeline

Sandarac raised a concern with this commit.Mar 17 2017, 7:03 AM
Sandarac added a subscriber: Sandarac.
Sandarac added inline comments.
/ps/trunk/binaries/data/mods/public/maps/skirmishes/Gallic Fields (3).js
3

The rand variable is also used later in this function, and so now a ReferenceError occurs on this map.

This commit now has outstanding concerns.Mar 17 2017, 7:03 AM
elexis requested verification of this commit.Mar 17 2017, 2:29 PM

Thanks for reporting! Fixed by rP19309

This commit now requires verification by auditors.Mar 17 2017, 2:29 PM

Reported by gameboy first at #4510

Sandarac accepted this commit.Mar 17 2017, 9:46 PM

Thanks for the fix!

All concerns with this commit have now been addressed.Mar 17 2017, 9:46 PM