1 float intermission_running; // This was moved here from mauvebot.c
\r
2 float intermission_exittime; // This was moved here from g_world.c
\r
3 void (entity AD) ParseTFDetect;
\r
5 entity () FindIntermission =
\r
10 spot = find (world, classname, "info_intermission");
\r
13 cyc = (random () * 1);
\r
16 spot = find (world, classname, "info_player_start");
\r
21 spot = find (world, classname, "info_player_deathmatch");
\r
24 cyc = (random () * 6);
\r
27 spot = find (spot, classname, "info_player_deathmatch");
\r
30 spot = find (spot, classname, "info_player_deathmatch");
\r
36 objerror ("FindIntermission: no spot");
\r
39 // This sets all the settings for the level including teams allowed, and lives and legal classes etc.
\r
40 // it is called only once, for the first player who joins
\r
41 void () DecodeLevelParms =
\r
43 if (parems_decoded == 1)
\r
46 // The following allows play on Nexuiz/NexCTF maps if there is no info_tfdetect on a map
\r
47 if (team1maxplayers == 0)
\r
48 team1maxplayers = 4;
\r
49 if (team2maxplayers == 0)
\r
50 team2maxplayers = 4;
\r
51 if (team1lives == 0)
\r
53 if (team2lives == 0)
\r
56 local entity decent;
\r
57 decent = find (world, classname, "info_tfdetect");
\r
58 if ((decent != world))
\r
60 // teamplay = cvar ("teamplay");
\r
61 // if ((teamplay == 0))
\r
63 cvar_set ("teamplay", "21?TeamFortress");
\r
65 ParseTFDetect (decent); // This returns the map's team/class allowances
\r
66 if (((number_of_teams <= 0.000000) || (number_of_teams >= 5.000000)))
\r
68 number_of_teams = 4.000000;
\r
75 // Execute Change Level
\r
76 void () execute_changelevel =
\r
80 intermission_running = 1;
\r
83 intermission_exittime = (time + 5);
\r
87 intermission_exittime = (time + 2);
\r
92 pos = FindIntermission ();
\r
93 other = find (world, classname, "player");
\r
94 while ((other != world))
\r
96 other.view_ofs = '0 0 0';
\r
97 other.v_angle = pos.mangle;
\r
98 other.angles = pos.mangle;
\r
100 other.nextthink = (time + 0.5);
\r
101 other.takedamage = 0;
\r
103 other.movetype = 0;
\r
104 other.modelindex = 0;
\r
105 setorigin (other, pos.origin);
\r
106 other = find (other, classname, "player");
\r