1 prespawn_randomize() {
2 prefix = "weapon_";
3 targetname = "weapon_pickup";
4 if( level.weapon_random ) {
5 for( i = 0; i < level.weap_coordinates.size; i++ ) {
6 random_weapon = randomint( ( level.weap_name.size - 1 ) * 10 );
7 j = int( random_weapon / 10 );
8 weapon_spawn( prefix + level.weap_name[j], targetname, level.weap_coordinates[i], level.weap_angles[i], level.weap_flag[i] );
9 }
10 }
11 else{
12 for( i = 0; i < level.weap_coordinates.size; i++ ) {
13 weapon_spawn( prefix + level.weap_name[i], targetname, level.weap_coordinates[i], level.weap_angles[i], level.weap_flag[i] );
14 }
15 }
16 }