Commit graph

7 commits

Author SHA1 Message Date
elexis
36400458bf Add randomAngle helper function to abbreviate calls.
This was SVN commit r20874.
2018-01-15 14:20:57 +00:00
elexis
a227a7f45b Remove optional arguments from randFloat, since the function can be called from the simulation and that should explicitly specify arguments if the defaults aren't entirely self-evident.
Make a lot of calls easier to read.

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

This was SVN commit r19464.
2017-04-27 14:57:21 +00:00
elexis
da2b89583a Replace many deprecated randInt calls with randBool.
Add optional probability to randBool to receive true and use where
applicable.

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

This was SVN commit r19355.
2017-03-28 04:28:55 +00:00
elexis
08fbf223f6 Unify random integer and float helper functions of GUI, Simulation and AI.
Patch By: bb
Differential Revision: D121
Refs: #4326

Removes the Random.js simulation helper and randomFloat function of the
random map scripts library.
Adds randomIntInclusive and randomIntExclusive to make the calls more
readable and fix and prevent off-by-one mistakes.
Adds randBool and use it in an AI occurance. It will be used in many
places by the random map scripts.
Use the pickRandom function introduced in 3c56638e8b in more applicable
occurances.
Replace remaining occurances of Math.random() with the new functions to
easily test completeness.

Cleanup of the random map script functions will come in a separate
commit.

This was SVN commit r19270.
2017-03-03 21:13:10 +00:00
mimo
3c56638e8b petra: cleanup of chat messages based on patch by bb, refs #4326
This was SVN commit r19109.
2017-01-04 20:02:56 +00:00
mimo
faa2090146 cleanup
This was SVN commit r19101.
2017-01-02 19:18:06 +00:00
fatherbushido
0a82149e62 Add missing file in previous commit.
This was SVN commit r19076.
2016-12-27 10:12:05 +00:00