Simplify RANDOMIZE_INDEX, eliminating two temporary variables.

This commit is contained in:
J. Tyne 2013-01-31 03:50:25 +00:00
parent 8dc87d7d82
commit 72af74ca4d

View File

@ -16,10 +16,8 @@ Note: You need to use the default map settings for the scenario to work right."
#enddef
#define RANDOMIZE_INDEX NUMBER
{VARIABLE ran_max {NUMBER}}
{VARIABLE_OP ran_max sub 1}
{VARIABLE_OP ran_range value "0..$ran_max"}
{VARIABLE_OP random rand $ran_range}
{VARIABLE_OP random rand 1..{NUMBER}}
{VARIABLE_OP random sub 1}
#enddef
#define PLACE_SPAWN_GROUP X Y