Revision | 8873b9831575691da9bcf174a5ce00d2d3505f01 (tree) |
---|---|
Time | 2022-02-10 01:43:18 |
Author | Adam Kaminski <kaminskiadam9@gmai...> |
Commiter | Adam Kaminski |
Tentative cleanup of all gamemode CVars:
- Replaced the old duplicated, web entangled method of figuring out the game mode with a more clean and dynamic solution.
- Added a new property to the GAMEMODE lump to specify which CVar is used to enable a game mode.
@@ -178,6 +178,10 @@ | ||
178 | 178 | |
179 | 179 | Flags &= ~CVAR_ISDEFAULT; |
180 | 180 | |
181 | + // [AK] Check if this CVar enables a game mode and determine what the new game mode is. | |
182 | + if ( Flags & CVAR_GAMEMODE ) | |
183 | + GAMEMODE_DetermineGameMode( this, false ); | |
184 | + | |
181 | 185 | // [TP] |
182 | 186 | if ( DMenu::CurrentMenu != NULL ) |
183 | 187 | DMenu::CurrentMenu->CVarChanged ( this ); |
@@ -227,8 +231,8 @@ | ||
227 | 231 | |
228 | 232 | if ( sv_cheats == false ) |
229 | 233 | { |
230 | - // [AK] Don't change this CVar if it's locked in campaign mode. | |
231 | - if (( Flags & CVAR_CAMPAIGNLOCK ) && ( CAMPAIGN_InCampaign( ))) | |
234 | + // [AK] Don't change this CVar if it's locked, or used to change the game mode, in campaign mode. | |
235 | + if (( Flags & ( CVAR_CAMPAIGNLOCK | CVAR_GAMEMODE )) && ( CAMPAIGN_InCampaign( ))) | |
232 | 236 | { |
233 | 237 | Printf( "%s cannot be changed during a campaign.\n", GetName( )); |
234 | 238 | return; |
@@ -84,8 +84,11 @@ | ||
84 | 84 | // synchronized to clients with RCON access. |
85 | 85 | CVAR_SENSITIVESERVERSETTING = 1048576, |
86 | 86 | |
87 | + // [AK] This CVar is used to enable a game mode. | |
88 | + CVAR_GAMEMODE = 2097152, | |
89 | + | |
87 | 90 | // [AK] The CVar is locked for a particular game mode and cannot be set from the console during play. |
88 | - CVAR_GAMEMODELOCK = 2097152, | |
91 | + CVAR_GAMEMODELOCK = 4194304, | |
89 | 92 | }; |
90 | 93 | |
91 | 94 | union UCVarValue |
@@ -299,80 +299,10 @@ | ||
299 | 299 | //***************************************************************************** |
300 | 300 | // CONSOLE COMMANDS/VARIABLES |
301 | 301 | |
302 | -// [BB] Since cooperative defaults to true and its default value sets deathmatch | |
303 | -// and teamgame to false, we have to initialize it last. | |
304 | -CUSTOM_CVAR( Bool, cooperative, true, CVAR_SERVERINFO | CVAR_LATCH | CVAR_CAMPAIGNLOCK | CVAR_NOINITCALL ) | |
305 | -{ | |
306 | - UCVarValue Val; | |
307 | - | |
308 | - if ( self == true ) | |
309 | - { | |
310 | - Val.Bool = false; | |
311 | - | |
312 | - // Disable deathmatch and teamgame if we're playing cooperative. | |
313 | - if ( deathmatch != false ) | |
314 | - deathmatch.ForceSet( Val, CVAR_Bool ); | |
315 | - if ( teamgame != false ) | |
316 | - teamgame.ForceSet( Val, CVAR_Bool ); | |
317 | - } | |
318 | - else | |
319 | - { | |
320 | - Val.Bool = false; | |
321 | - | |
322 | - // Cooperative, so disable all related modes. | |
323 | - survival.ForceSet( Val, CVAR_Bool ); | |
324 | - invasion.ForceSet( Val, CVAR_Bool ); | |
325 | - } | |
326 | - | |
327 | - // Reset what the current game mode is. | |
328 | - GAMEMODE_DetermineGameMode( ); | |
329 | -} | |
330 | - | |
331 | -//***************************************************************************** | |
332 | -// | |
333 | -CUSTOM_CVAR( Bool, survival, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_CAMPAIGNLOCK ) | |
334 | -{ | |
335 | - UCVarValue Val; | |
336 | - | |
337 | - if ( self == true ) | |
338 | - { | |
339 | - Val.Bool = true; | |
340 | - | |
341 | - // Enable cooperative. | |
342 | - cooperative.ForceSet( Val, CVAR_Bool ); | |
343 | - | |
344 | - Val.Bool = false; | |
345 | - | |
346 | - // Disable other modes. | |
347 | - invasion.ForceSet( Val, CVAR_Bool ); | |
348 | - } | |
349 | - | |
350 | - // Reset what the current game mode is. | |
351 | - GAMEMODE_DetermineGameMode( ); | |
352 | -} | |
353 | - | |
354 | -//***************************************************************************** | |
355 | -// | |
356 | -CUSTOM_CVAR( Bool, invasion, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_CAMPAIGNLOCK ) | |
357 | -{ | |
358 | - UCVarValue Val; | |
359 | - | |
360 | - if ( self == true ) | |
361 | - { | |
362 | - Val.Bool = true; | |
363 | - | |
364 | - // Enable cooperative. | |
365 | - cooperative.ForceSet( Val, CVAR_Bool ); | |
366 | - | |
367 | - Val.Bool = false; | |
368 | - | |
369 | - // Disable other modes. | |
370 | - survival.ForceSet( Val, CVAR_Bool ); | |
371 | - } | |
372 | - | |
373 | - // Reset what the current game mode is. | |
374 | - GAMEMODE_DetermineGameMode( ); | |
375 | -} | |
302 | +// [AK] Added CVAR_GAMEMODE. | |
303 | +CVAR( Bool, cooperative, true, CVAR_SERVERINFO | CVAR_LATCH | CVAR_GAMEMODE ) | |
304 | +CVAR( Bool, survival, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_GAMEMODE ) | |
305 | +CVAR( Bool, invasion, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_GAMEMODE ) | |
376 | 306 | |
377 | 307 | //***************************************************************************** |
378 | 308 | //***************************************************************************** |
@@ -2935,9 +2935,6 @@ | ||
2935 | 2935 | // Base systems have been inited; enable cvar callbacks |
2936 | 2936 | FBaseCVar::EnableCallbacks (); |
2937 | 2937 | |
2938 | - // [BB] Make sure that the callback of cooperative is first called after the ones of deathmatch and teamgame. | |
2939 | - cooperative.Callback(); | |
2940 | - | |
2941 | 2938 | // [RC] Start the G15 LCD module here. |
2942 | 2939 | G15_Construct (); |
2943 | 2940 |
@@ -76,227 +76,15 @@ | ||
76 | 76 | //***************************************************************************** |
77 | 77 | // CONSOLE COMMANDS/VARIABLES |
78 | 78 | |
79 | -CUSTOM_CVAR( Bool, deathmatch, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_CAMPAIGNLOCK ) | |
80 | -{ | |
81 | - UCVarValue Val; | |
82 | - | |
83 | - if ( self == true ) | |
84 | - { | |
85 | - Val.Bool = false; | |
86 | - | |
87 | - // Disable teamgame if we're playing deathmatch. | |
88 | - teamgame.ForceSet( Val, CVAR_Bool ); | |
89 | - | |
90 | - // Disable cooperative if we're playing deathmatch. | |
91 | - cooperative.ForceSet( Val, CVAR_Bool ); | |
92 | - } | |
93 | - else | |
94 | - { | |
95 | - Val.Bool = false; | |
96 | - // Deathmatch has been disabled, so disable all related modes. | |
97 | - teamplay.ForceSet( Val, CVAR_Bool ); | |
98 | - duel.ForceSet( Val, CVAR_Bool ); | |
99 | - terminator.ForceSet( Val, CVAR_Bool ); | |
100 | - lastmanstanding.ForceSet( Val, CVAR_Bool ); | |
101 | - teamlms.ForceSet( Val, CVAR_Bool ); | |
102 | - possession.ForceSet( Val, CVAR_Bool ); | |
103 | - teampossession.ForceSet( Val, CVAR_Bool ); | |
104 | - | |
105 | - // If teamgame is also disabled, enable cooperative mode. | |
106 | - if ( teamgame == false ) | |
107 | - { | |
108 | - Val.Bool = true; | |
109 | - | |
110 | - if ( cooperative != true ) | |
111 | - cooperative.ForceSet( Val, CVAR_Bool ); | |
112 | - } | |
113 | - } | |
114 | - | |
115 | - // Reset what the current game mode is. | |
116 | - GAMEMODE_DetermineGameMode( ); | |
117 | -} | |
118 | - | |
119 | -//***************************************************************************** | |
120 | -// | |
121 | -CUSTOM_CVAR( Bool, teamplay, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_CAMPAIGNLOCK ) | |
122 | -{ | |
123 | - UCVarValue Val; | |
124 | - | |
125 | - if ( self == true ) | |
126 | - { | |
127 | - Val.Bool = true; | |
128 | - // Enable deathmatch. | |
129 | - deathmatch.ForceSet( Val, CVAR_Bool ); | |
130 | - | |
131 | - Val.Bool = false; | |
132 | - // Disable other modes. | |
133 | - duel.ForceSet( Val, CVAR_Bool ); | |
134 | - terminator.ForceSet( Val, CVAR_Bool ); | |
135 | - lastmanstanding.ForceSet( Val, CVAR_Bool ); | |
136 | - teamlms.ForceSet( Val, CVAR_Bool ); | |
137 | - possession.ForceSet( Val, CVAR_Bool ); | |
138 | - teampossession.ForceSet( Val, CVAR_Bool ); | |
139 | - } | |
140 | - | |
141 | - // Reset what the current game mode is. | |
142 | - GAMEMODE_DetermineGameMode( ); | |
143 | -} | |
144 | - | |
145 | -//***************************************************************************** | |
146 | -// | |
147 | -CUSTOM_CVAR( Bool, duel, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_CAMPAIGNLOCK ) | |
148 | -{ | |
149 | - UCVarValue Val; | |
150 | - | |
151 | - if ( self == true ) | |
152 | - { | |
153 | - Val.Bool = true; | |
154 | - // Enable deathmatch. | |
155 | - deathmatch.ForceSet( Val, CVAR_Bool ); | |
156 | - | |
157 | - Val.Bool = false; | |
158 | - // Disable other modes. | |
159 | - teamplay.ForceSet( Val, CVAR_Bool ); | |
160 | - terminator.ForceSet( Val, CVAR_Bool ); | |
161 | - lastmanstanding.ForceSet( Val, CVAR_Bool ); | |
162 | - teamlms.ForceSet( Val, CVAR_Bool ); | |
163 | - possession.ForceSet( Val, CVAR_Bool ); | |
164 | - teampossession.ForceSet( Val, CVAR_Bool ); | |
165 | - } | |
166 | - | |
167 | - // Reset what the current game mode is. | |
168 | - GAMEMODE_DetermineGameMode( ); | |
169 | -} | |
170 | - | |
171 | -//***************************************************************************** | |
172 | -// | |
173 | -CUSTOM_CVAR( Bool, terminator, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_CAMPAIGNLOCK ) | |
174 | -{ | |
175 | - UCVarValue Val; | |
176 | - | |
177 | - if ( self == true ) | |
178 | - { | |
179 | - Val.Bool = true; | |
180 | - // Enable deathmatch. | |
181 | - deathmatch.ForceSet( Val, CVAR_Bool ); | |
182 | - | |
183 | - Val.Bool = false; | |
184 | - // Disable other modes. | |
185 | - teamplay.ForceSet( Val, CVAR_Bool ); | |
186 | - duel.ForceSet( Val, CVAR_Bool ); | |
187 | - lastmanstanding.ForceSet( Val, CVAR_Bool ); | |
188 | - teamlms.ForceSet( Val, CVAR_Bool ); | |
189 | - possession.ForceSet( Val, CVAR_Bool ); | |
190 | - teampossession.ForceSet( Val, CVAR_Bool ); | |
191 | - } | |
192 | - | |
193 | - // Reset what the current game mode is. | |
194 | - GAMEMODE_DetermineGameMode( ); | |
195 | -} | |
196 | - | |
197 | -//***************************************************************************** | |
198 | -// | |
199 | -CUSTOM_CVAR( Bool, lastmanstanding, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_CAMPAIGNLOCK ) | |
200 | -{ | |
201 | - UCVarValue Val; | |
202 | - | |
203 | - if ( self == true ) | |
204 | - { | |
205 | - Val.Bool = true; | |
206 | - // Enable deathmatch. | |
207 | - deathmatch.ForceSet( Val, CVAR_Bool ); | |
208 | - | |
209 | - Val.Bool = false; | |
210 | - // Disable other modes. | |
211 | - teamplay.ForceSet( Val, CVAR_Bool ); | |
212 | - duel.ForceSet( Val, CVAR_Bool ); | |
213 | - terminator.ForceSet( Val, CVAR_Bool ); | |
214 | - teamlms.ForceSet( Val, CVAR_Bool ); | |
215 | - possession.ForceSet( Val, CVAR_Bool ); | |
216 | - teampossession.ForceSet( Val, CVAR_Bool ); | |
217 | - } | |
218 | - | |
219 | - // Reset what the current game mode is. | |
220 | - GAMEMODE_DetermineGameMode( ); | |
221 | -} | |
222 | - | |
223 | -//***************************************************************************** | |
224 | -// | |
225 | -CUSTOM_CVAR( Bool, teamlms, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_CAMPAIGNLOCK ) | |
226 | -{ | |
227 | - UCVarValue Val; | |
228 | - | |
229 | - if ( self == true ) | |
230 | - { | |
231 | - Val.Bool = true; | |
232 | - // Enable deathmatch. | |
233 | - deathmatch.ForceSet( Val, CVAR_Bool ); | |
234 | - | |
235 | - Val.Bool = false; | |
236 | - // Disable other modes. | |
237 | - teamplay.ForceSet( Val, CVAR_Bool ); | |
238 | - duel.ForceSet( Val, CVAR_Bool ); | |
239 | - terminator.ForceSet( Val, CVAR_Bool ); | |
240 | - lastmanstanding.ForceSet( Val, CVAR_Bool ); | |
241 | - possession.ForceSet( Val, CVAR_Bool ); | |
242 | - teampossession.ForceSet( Val, CVAR_Bool ); | |
243 | - } | |
244 | - | |
245 | - // Reset what the current game mode is. | |
246 | - GAMEMODE_DetermineGameMode( ); | |
247 | -} | |
248 | - | |
249 | -//***************************************************************************** | |
250 | -// | |
251 | -CUSTOM_CVAR( Bool, possession, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_CAMPAIGNLOCK ) | |
252 | -{ | |
253 | - UCVarValue Val; | |
254 | - | |
255 | - if ( self == true ) | |
256 | - { | |
257 | - Val.Bool = true; | |
258 | - // Enable deathmatch. | |
259 | - deathmatch.ForceSet( Val, CVAR_Bool ); | |
260 | - | |
261 | - Val.Bool = false; | |
262 | - // Disable other modes. | |
263 | - teamplay.ForceSet( Val, CVAR_Bool ); | |
264 | - duel.ForceSet( Val, CVAR_Bool ); | |
265 | - terminator.ForceSet( Val, CVAR_Bool ); | |
266 | - lastmanstanding.ForceSet( Val, CVAR_Bool ); | |
267 | - teamlms.ForceSet( Val, CVAR_Bool ); | |
268 | - teampossession.ForceSet( Val, CVAR_Bool ); | |
269 | - } | |
270 | - | |
271 | - // Reset what the current game mode is. | |
272 | - GAMEMODE_DetermineGameMode( ); | |
273 | -} | |
274 | - | |
275 | -//***************************************************************************** | |
276 | -// | |
277 | -CUSTOM_CVAR( Bool, teampossession, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_CAMPAIGNLOCK ) | |
278 | -{ | |
279 | - UCVarValue Val; | |
280 | - | |
281 | - if ( self == true ) | |
282 | - { | |
283 | - Val.Bool = true; | |
284 | - // Enable deathmatch. | |
285 | - deathmatch.ForceSet( Val, CVAR_Bool ); | |
286 | - | |
287 | - Val.Bool = false; | |
288 | - // Disable other modes. | |
289 | - teamplay.ForceSet( Val, CVAR_Bool ); | |
290 | - duel.ForceSet( Val, CVAR_Bool ); | |
291 | - terminator.ForceSet( Val, CVAR_Bool ); | |
292 | - lastmanstanding.ForceSet( Val, CVAR_Bool ); | |
293 | - teamlms.ForceSet( Val, CVAR_Bool ); | |
294 | - possession.ForceSet( Val, CVAR_Bool ); | |
295 | - } | |
296 | - | |
297 | - // Reset what the current game mode is. | |
298 | - GAMEMODE_DetermineGameMode( ); | |
299 | -} | |
79 | +// [AK] Added CVAR_GAMEMODE. | |
80 | +CVAR( Bool, deathmatch, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_GAMEMODE ) | |
81 | +CVAR( Bool, teamplay, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_GAMEMODE ) | |
82 | +CVAR( Bool, duel, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_GAMEMODE ) | |
83 | +CVAR( Bool, terminator, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_GAMEMODE ) | |
84 | +CVAR( Bool, lastmanstanding, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_GAMEMODE ) | |
85 | +CVAR( Bool, teamlms, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_GAMEMODE ) | |
86 | +CVAR( Bool, possession, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_GAMEMODE ) | |
87 | +CVAR( Bool, teampossession, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_GAMEMODE ) | |
300 | 88 | |
301 | 89 | //***************************************************************************** |
302 | 90 | // |
@@ -92,6 +92,13 @@ | ||
92 | 92 | // [AK] The result value of the current event being executed. |
93 | 93 | static LONG g_lEventResult = 1; |
94 | 94 | |
95 | +// [AK] Are we currently changing the game mode? | |
96 | +static bool g_bChangingGameMode = false; | |
97 | + | |
98 | +// [AK] A list of CVars changed during startup before the GAMEMODE lumps were parsed that we | |
99 | +// still need to call GAMEMODE_DetermineGameMode for. | |
100 | +static TArray<FBaseCVar *> g_PendingGameModeChanges; | |
101 | + | |
95 | 102 | // [BB] Implement the string table and the conversion functions for the GMF and GAMEMODE enums. |
96 | 103 | #define GENERATE_ENUM_STRINGS // Start string generation |
97 | 104 | #include "gamemode_enums.h" |
@@ -211,6 +218,11 @@ | ||
211 | 218 | strncpy( g_GameModes[GameMode].szF1Texture, sc.String, 8 ); |
212 | 219 | g_GameModes[GameMode].szF1Texture[8] = 0; |
213 | 220 | } |
221 | + else if (0 == stricmp (sc.String, "cvar")) | |
222 | + { | |
223 | + sc.MustGetString(); | |
224 | + g_GameModes[GameMode].CVarName = sc.String; | |
225 | + } | |
214 | 226 | else if ((0 == stricmp (sc.String, "gamesettings")) || (0 == stricmp (sc.String, "lockedgamesettings"))) |
215 | 227 | { |
216 | 228 | GAMEMODE_ParseGameSettingBlock( sc, GameMode, !stricmp( sc.String, "lockedgamesettings" )); |
@@ -376,10 +388,60 @@ | ||
376 | 388 | I_Error( "Players have no way of earning kills, frags, points, or wins in \"%s\".", name.GetChars( )); |
377 | 389 | else if (( ulFlags & ( ulFlags - 1 )) != 0 ) |
378 | 390 | I_Error( "There is more than one PLAYERSEARN flag enabled in \"%s\".", name.GetChars( )); |
391 | + | |
392 | + // [AK] If no CVar name was specified, throw an error message. | |
393 | + if ( g_GameModes[i].CVarName.Len( ) == 0 ) | |
394 | + { | |
395 | + I_Error( "No CVar specified for \"%s\".", name.GetChars( )); | |
396 | + } | |
397 | + else | |
398 | + { | |
399 | + FBaseCVar *pCVar = FindCVar( g_GameModes[i].CVarName, NULL ); | |
400 | + | |
401 | + // [AK] If this CVar doesn't exist, create a new one. | |
402 | + if ( pCVar == NULL ) | |
403 | + { | |
404 | + pCVar = C_CreateCVar( g_GameModes[i].CVarName, CVAR_Bool, CVAR_SERVERINFO | CVAR_LATCH | CVAR_GAMEMODE ); | |
405 | + } | |
406 | + else | |
407 | + { | |
408 | + ulFlags = pCVar->GetFlags( ) & ( CVAR_SERVERINFO | CVAR_LATCH | CVAR_GAMEMODE ); | |
409 | + | |
410 | + // [AK] If this CVar already exists, make sure that it's valid. | |
411 | + if (( pCVar->GetRealType( ) != CVAR_Bool ) || ( ulFlags != ( CVAR_SERVERINFO | CVAR_LATCH | CVAR_GAMEMODE )) || ( pCVar->GetFlags( ) & CVAR_ARCHIVE )) | |
412 | + I_Error( "Invalid CVar \"%s\" used for \"%s\". It must be a latched, unarchived serverinfo CVar of boolean type.", pCVar->GetName( ), name.GetChars( )); | |
413 | + | |
414 | + // [AK] Make sure that this CVar isn't already being used by another game mode. | |
415 | + for ( unsigned int j = GAMEMODE_COOPERATIVE; j < NUM_GAMEMODES; j++ ) | |
416 | + { | |
417 | + if (( i != j ) && ( g_GameModes[j].pCVar == pCVar )) | |
418 | + I_Error( "\"%s\" is used for more than one game mode.", pCVar->GetName( )); | |
419 | + } | |
420 | + | |
421 | + FBoolCVar *pBoolCVar = static_cast<FBoolCVar *>( pCVar ); | |
422 | + | |
423 | + // [AK] The cooperative, deathmatch, and teamgame game modes must use their respective CVars! | |
424 | + if ((( i == GAMEMODE_COOPERATIVE ) && ( pBoolCVar != &cooperative )) || | |
425 | + (( i == GAMEMODE_DEATHMATCH ) && ( pBoolCVar != &deathmatch )) || | |
426 | + (( i == GAMEMODE_TEAMGAME ) && ( pBoolCVar != &teamgame ))) | |
427 | + { | |
428 | + I_Error( "\"%s\" must use the \"%s\" CVar!", name.GetChars( ), name.GetChars( )); | |
429 | + } | |
430 | + } | |
431 | + | |
432 | + g_GameModes[i].pCVar = pCVar; | |
433 | + } | |
379 | 434 | } |
380 | 435 | |
381 | 436 | // Our default game mode is co-op. |
382 | 437 | g_CurrentGameMode = GAMEMODE_COOPERATIVE; |
438 | + | |
439 | + // [AK] Process any pending game mode changes now. | |
440 | + while ( g_PendingGameModeChanges.Size( ) > 0 ) | |
441 | + { | |
442 | + GAMEMODE_DetermineGameMode( g_PendingGameModeChanges[0], true ); | |
443 | + g_PendingGameModeChanges.Delete( 0 ); | |
444 | + } | |
383 | 445 | } |
384 | 446 | |
385 | 447 | //***************************************************************************** |
@@ -472,39 +534,86 @@ | ||
472 | 534 | |
473 | 535 | //***************************************************************************** |
474 | 536 | // |
475 | -void GAMEMODE_DetermineGameMode( void ) | |
537 | +void GAMEMODE_DetermineGameMode( FBaseCVar *pCVar, bool bForceExecution ) | |
476 | 538 | { |
477 | - g_CurrentGameMode = GAMEMODE_COOPERATIVE; | |
478 | - if ( survival ) | |
479 | - g_CurrentGameMode = GAMEMODE_SURVIVAL; | |
480 | - if ( invasion ) | |
481 | - g_CurrentGameMode = GAMEMODE_INVASION; | |
482 | - if ( deathmatch ) | |
483 | - g_CurrentGameMode = GAMEMODE_DEATHMATCH; | |
484 | - if ( teamplay ) | |
485 | - g_CurrentGameMode = GAMEMODE_TEAMPLAY; | |
486 | - if ( duel ) | |
487 | - g_CurrentGameMode = GAMEMODE_DUEL; | |
488 | - if ( terminator ) | |
489 | - g_CurrentGameMode = GAMEMODE_TERMINATOR; | |
490 | - if ( lastmanstanding ) | |
491 | - g_CurrentGameMode = GAMEMODE_LASTMANSTANDING; | |
492 | - if ( teamlms ) | |
493 | - g_CurrentGameMode = GAMEMODE_TEAMLMS; | |
494 | - if ( possession ) | |
495 | - g_CurrentGameMode = GAMEMODE_POSSESSION; | |
496 | - if ( teampossession ) | |
497 | - g_CurrentGameMode = GAMEMODE_TEAMPOSSESSION; | |
498 | - if ( teamgame ) | |
499 | - g_CurrentGameMode = GAMEMODE_TEAMGAME; | |
500 | - if ( ctf ) | |
501 | - g_CurrentGameMode = GAMEMODE_CTF; | |
502 | - if ( oneflagctf ) | |
503 | - g_CurrentGameMode = GAMEMODE_ONEFLAGCTF; | |
504 | - if ( skulltag ) | |
505 | - g_CurrentGameMode = GAMEMODE_SKULLTAG; | |
506 | - if ( domination ) | |
507 | - g_CurrentGameMode = GAMEMODE_DOMINATION; | |
539 | + UCVarValue Val; | |
540 | + | |
541 | + // [AK] Don't do this if the CVar's invalid or if we're already changing the game mode. | |
542 | + if (( pCVar == NULL ) || ( g_bChangingGameMode )) | |
543 | + return; | |
544 | + | |
545 | + // [AK] If we're in startup mode and the GAMEMODE lumps haven't been parsed yet, put this | |
546 | + // CVar into a list which we'll process once the lumps are parsed. | |
547 | + if (( gamestate == GS_STARTUP ) && ( bForceExecution == false )) | |
548 | + { | |
549 | + g_PendingGameModeChanges.Push( pCVar ); | |
550 | + return; | |
551 | + } | |
552 | + | |
553 | + FBoolCVar *pBoolCVar = static_cast<FBoolCVar *>( pCVar ); | |
554 | + ULONG ulCurrentFlags = g_GameModes[g_CurrentGameMode].ulFlags; | |
555 | + const bool bEnable = pCVar->GetGenericRep( CVAR_Bool ).Bool; | |
556 | + | |
557 | + g_bChangingGameMode = true; | |
558 | + Val.Bool = false; | |
559 | + | |
560 | + // [AK] Check if we're trying to change one of cooperative, deathmatch, and teamgame when | |
561 | + // they're supposed to be enabled in the current game mode. | |
562 | + if ((( pBoolCVar == &cooperative ) && ( ulCurrentFlags & GMF_COOPERATIVE )) || | |
563 | + (( pBoolCVar == &deathmatch ) && ( ulCurrentFlags & GMF_DEATHMATCH )) || | |
564 | + (( pBoolCVar == &teamgame ) && ( ulCurrentFlags & GMF_TEAMGAME ))) | |
565 | + { | |
566 | + // [AK] Only do something if we're trying to disable them. | |
567 | + if ( bEnable == false ) | |
568 | + { | |
569 | + // [AK] Set the CVars of all game modes to false. | |
570 | + for ( unsigned int i = GAMEMODE_COOPERATIVE; i < NUM_GAMEMODES; i++ ) | |
571 | + g_GameModes[i].pCVar->ForceSet( Val, CVAR_Bool ); | |
572 | + | |
573 | + // [AK] Change the current game mode to cooperative (default). | |
574 | + Val.Bool = true; | |
575 | + cooperative.ForceSet( Val, CVAR_Bool ); | |
576 | + g_CurrentGameMode = GAMEMODE_COOPERATIVE; | |
577 | + } | |
578 | + } | |
579 | + else | |
580 | + { | |
581 | + for ( unsigned int i = GAMEMODE_COOPERATIVE; i < NUM_GAMEMODES; i++ ) | |
582 | + { | |
583 | + // [AK] Don't execute this block if we disabled a CVar for a game mode that we're not playing. | |
584 | + if (( g_GameModes[i].pCVar == pCVar ) && (( bEnable ) || ( i == g_CurrentGameMode ))) | |
585 | + { | |
586 | + // [AK] Set cooperative, deathmatch, and teamgame to false first. | |
587 | + cooperative.ForceSet( Val, CVAR_Bool ); | |
588 | + deathmatch.ForceSet( Val, CVAR_Bool ); | |
589 | + teamgame.ForceSet( Val, CVAR_Bool ); | |
590 | + | |
591 | + // [AK] Next, set the CVars of all other game modes to false. | |
592 | + for ( unsigned int j = GAMEMODE_COOPERATIVE; j < NUM_GAMEMODES; j++ ) | |
593 | + { | |
594 | + if (( i != j ) && ( g_GameModes[j].pCVar )) | |
595 | + g_GameModes[j].pCVar->ForceSet( Val, CVAR_Bool ); | |
596 | + } | |
597 | + | |
598 | + Val.Bool = true; | |
599 | + | |
600 | + // [AK] Determine whether we should enable cooperative, deathmatch, or teamgame. | |
601 | + if ( g_GameModes[i].ulFlags & GMF_COOPERATIVE ) | |
602 | + cooperative.ForceSet( Val, CVAR_Bool ); | |
603 | + else if ( g_GameModes[i].ulFlags & GMF_DEATHMATCH ) | |
604 | + deathmatch.ForceSet( Val, CVAR_Bool ); | |
605 | + else | |
606 | + teamgame.ForceSet( Val, CVAR_Bool ); | |
607 | + | |
608 | + // [AK] Change to the new current game mode. | |
609 | + g_CurrentGameMode = static_cast<GAMEMODE_e>( i ); | |
610 | + break; | |
611 | + } | |
612 | + } | |
613 | + } | |
614 | + | |
615 | + // [AK] We're done changing the game mode now. | |
616 | + g_bChangingGameMode = false; | |
508 | 617 | } |
509 | 618 | |
510 | 619 | //***************************************************************************** |
@@ -1259,91 +1368,29 @@ | ||
1259 | 1368 | // |
1260 | 1369 | void GAMEMODE_SetCurrentMode( GAMEMODE_e GameMode ) |
1261 | 1370 | { |
1262 | - UCVarValue Val; | |
1263 | - g_CurrentGameMode = GameMode; | |
1264 | - | |
1265 | - // [RC] Set all the CVars. We can't just use "= true;" because of the latched cvars. | |
1266 | - // (Hopefully Blzut's update will save us from this garbage.) | |
1371 | + UCVarValue Val; | |
1372 | + Val.Bool = false; | |
1267 | 1373 | |
1268 | - Val.Bool = false; | |
1269 | - // [BB] Even though setting deathmatch and teamgame to false will set cooperative to true, | |
1270 | - // we need to set cooperative to false here first to clear survival and invasion. | |
1271 | - cooperative.ForceSet( Val, CVAR_Bool ); | |
1272 | - deathmatch.ForceSet( Val, CVAR_Bool ); | |
1273 | - teamgame.ForceSet( Val, CVAR_Bool ); | |
1374 | + // [AK] Don't do this if we're already changing the game mode. | |
1375 | + if ( g_bChangingGameMode ) | |
1376 | + return; | |
1377 | + | |
1378 | + g_bChangingGameMode = true; | |
1379 | + | |
1380 | + // [AK] Set the CVars of all other game modes to false. | |
1381 | + for ( unsigned int i = GAMEMODE_COOPERATIVE; i < NUM_GAMEMODES; i++ ) | |
1382 | + { | |
1383 | + if ( static_cast<GAMEMODE_e>( i ) != GameMode ) | |
1384 | + g_GameModes[i].pCVar->ForceSet( Val, CVAR_Bool ); | |
1385 | + } | |
1386 | + | |
1274 | 1387 | instagib.ForceSet( Val, CVAR_Bool ); |
1275 | 1388 | buckshot.ForceSet( Val, CVAR_Bool ); |
1276 | 1389 | |
1390 | + // [AK] Set the CVar of the desired game mode to true. | |
1391 | + g_bChangingGameMode = false; | |
1277 | 1392 | Val.Bool = true; |
1278 | - switch ( GameMode ) | |
1279 | - { | |
1280 | - case GAMEMODE_COOPERATIVE: | |
1281 | - | |
1282 | - cooperative.ForceSet( Val, CVAR_Bool ); | |
1283 | - break; | |
1284 | - case GAMEMODE_SURVIVAL: | |
1285 | - | |
1286 | - survival.ForceSet( Val, CVAR_Bool ); | |
1287 | - break; | |
1288 | - case GAMEMODE_INVASION: | |
1289 | - | |
1290 | - invasion.ForceSet( Val, CVAR_Bool ); | |
1291 | - break; | |
1292 | - case GAMEMODE_DEATHMATCH: | |
1293 | - | |
1294 | - deathmatch.ForceSet( Val, CVAR_Bool ); | |
1295 | - break; | |
1296 | - case GAMEMODE_TEAMPLAY: | |
1297 | - | |
1298 | - teamplay.ForceSet( Val, CVAR_Bool ); | |
1299 | - break; | |
1300 | - case GAMEMODE_DUEL: | |
1301 | - | |
1302 | - duel.ForceSet( Val, CVAR_Bool ); | |
1303 | - break; | |
1304 | - case GAMEMODE_TERMINATOR: | |
1305 | - | |
1306 | - terminator.ForceSet( Val, CVAR_Bool ); | |
1307 | - break; | |
1308 | - case GAMEMODE_LASTMANSTANDING: | |
1309 | - | |
1310 | - lastmanstanding.ForceSet( Val, CVAR_Bool ); | |
1311 | - break; | |
1312 | - case GAMEMODE_TEAMLMS: | |
1313 | - | |
1314 | - teamlms.ForceSet( Val, CVAR_Bool ); | |
1315 | - break; | |
1316 | - case GAMEMODE_POSSESSION: | |
1317 | - | |
1318 | - possession.ForceSet( Val, CVAR_Bool ); | |
1319 | - break; | |
1320 | - case GAMEMODE_TEAMPOSSESSION: | |
1321 | - | |
1322 | - teampossession.ForceSet( Val, CVAR_Bool ); | |
1323 | - break; | |
1324 | - case GAMEMODE_TEAMGAME: | |
1325 | - | |
1326 | - teamgame.ForceSet( Val, CVAR_Bool ); | |
1327 | - break; | |
1328 | - case GAMEMODE_CTF: | |
1329 | - | |
1330 | - ctf.ForceSet( Val, CVAR_Bool ); | |
1331 | - break; | |
1332 | - case GAMEMODE_ONEFLAGCTF: | |
1333 | - | |
1334 | - oneflagctf.ForceSet( Val, CVAR_Bool ); | |
1335 | - break; | |
1336 | - case GAMEMODE_SKULLTAG: | |
1337 | - | |
1338 | - skulltag.ForceSet( Val, CVAR_Bool ); | |
1339 | - break; | |
1340 | - case GAMEMODE_DOMINATION: | |
1341 | - | |
1342 | - domination.ForceSet( Val, CVAR_Bool ); | |
1343 | - break; | |
1344 | - default: | |
1345 | - break; | |
1346 | - } | |
1393 | + g_GameModes[GameMode].pCVar->ForceSet( Val, CVAR_Bool ); | |
1347 | 1394 | } |
1348 | 1395 | |
1349 | 1396 | //***************************************************************************** |
@@ -164,6 +164,12 @@ | ||
164 | 164 | // this game mode. |
165 | 165 | char szF1Texture[9]; |
166 | 166 | |
167 | + // [AK] The name used to find the CVar that will enable this game mode. | |
168 | + FString CVarName; | |
169 | + | |
170 | + // [AK] The CVar used to enable this game mode. | |
171 | + FBaseCVar *pCVar; | |
172 | + | |
167 | 173 | // [AK] All of the gameplay or compatibility flags we set for this game mode |
168 | 174 | // (dmflags, compatflags, lmsallowedweapons, lmsspectatorsettings, etc.). |
169 | 175 | LONG lFlagsets[NUM_FLAGSETS][3]; |
@@ -185,7 +191,7 @@ | ||
185 | 191 | char *GAMEMODE_GetF1Texture( GAMEMODE_e GameMode ); |
186 | 192 | int GAMEMODE_GetFlagsetMask( GAMEMODE_e GameMode, FIntCVar *Flagset, bool bLocked = false ); |
187 | 193 | int GAMEMODE_GetCurrentFlagsetMask( FIntCVar *Flagset, bool bLocked = false ); |
188 | -void GAMEMODE_DetermineGameMode( void ); | |
194 | +void GAMEMODE_DetermineGameMode( FBaseCVar *pCVar, bool bForceExecution ); | |
189 | 195 | bool GAMEMODE_IsGameInCountdown( void ); |
190 | 196 | bool GAMEMODE_IsGameInProgress( void ); |
191 | 197 | bool GAMEMODE_IsGameInResultSequence( void ); |
@@ -1924,134 +1924,12 @@ | ||
1924 | 1924 | //***************************************************************************** |
1925 | 1925 | // CONSOLE COMMANDS/VARIABLES |
1926 | 1926 | |
1927 | -CUSTOM_CVAR( Bool, teamgame, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_CAMPAIGNLOCK ) | |
1928 | -{ | |
1929 | - UCVarValue Val; | |
1930 | - | |
1931 | - if ( self == true ) | |
1932 | - { | |
1933 | - Val.Bool = false; | |
1934 | - | |
1935 | - // Disable deathmatch if we're setting a teamgame. | |
1936 | - deathmatch.ForceSet( Val, CVAR_Bool ); | |
1937 | - | |
1938 | - // Disable cooperative if we're setting a teamgame. | |
1939 | - cooperative.ForceSet( Val, CVAR_Bool ); | |
1940 | - } | |
1941 | - else | |
1942 | - { | |
1943 | - Val.Bool = false; | |
1944 | - // Teamgame has been disabled, so disable all related modes. | |
1945 | - ctf.ForceSet( Val, CVAR_Bool ); | |
1946 | - oneflagctf.ForceSet( Val, CVAR_Bool ); | |
1947 | - skulltag.ForceSet( Val, CVAR_Bool ); | |
1948 | - domination.ForceSet( Val, CVAR_Bool ); | |
1949 | - | |
1950 | - // If deathmatch is also disabled, enable cooperative mode. | |
1951 | - if ( deathmatch == false ) | |
1952 | - { | |
1953 | - Val.Bool = true; | |
1954 | - | |
1955 | - if ( cooperative != true ) | |
1956 | - cooperative.ForceSet( Val, CVAR_Bool ); | |
1957 | - } | |
1958 | - } | |
1959 | - | |
1960 | - // Reset what the current game mode is. | |
1961 | - GAMEMODE_DetermineGameMode( ); | |
1962 | -} | |
1963 | - | |
1964 | -//***************************************************************************** | |
1965 | -// | |
1966 | -CUSTOM_CVAR( Bool, ctf, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_CAMPAIGNLOCK ) | |
1967 | -{ | |
1968 | - UCVarValue Val; | |
1969 | - | |
1970 | - if ( self == true ) | |
1971 | - { | |
1972 | - Val.Bool = true; | |
1973 | - // Enable teamgame if we're playing CTF. | |
1974 | - teamgame.ForceSet( Val, CVAR_Bool ); | |
1975 | - | |
1976 | - Val.Bool = false; | |
1977 | - // Disable other modes. | |
1978 | - oneflagctf.ForceSet( Val, CVAR_Bool ); | |
1979 | - skulltag.ForceSet( Val, CVAR_Bool ); | |
1980 | - domination.ForceSet( Val, CVAR_Bool ); | |
1981 | - } | |
1982 | - | |
1983 | - // Reset what the current game mode is. | |
1984 | - GAMEMODE_DetermineGameMode( ); | |
1985 | -} | |
1986 | - | |
1987 | -//***************************************************************************** | |
1988 | -// | |
1989 | -CUSTOM_CVAR( Bool, oneflagctf, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_CAMPAIGNLOCK ) | |
1990 | -{ | |
1991 | - UCVarValue Val; | |
1992 | - | |
1993 | - if ( self == true ) | |
1994 | - { | |
1995 | - Val.Bool = true; | |
1996 | - // Enable teamgame if we're playing CTF. | |
1997 | - teamgame.ForceSet( Val, CVAR_Bool ); | |
1998 | - | |
1999 | - Val.Bool = false; | |
2000 | - // Disable other modes. | |
2001 | - ctf.ForceSet( Val, CVAR_Bool ); | |
2002 | - skulltag.ForceSet( Val, CVAR_Bool ); | |
2003 | - domination.ForceSet( Val, CVAR_Bool ); | |
2004 | - } | |
2005 | - | |
2006 | - // Reset what the current game mode is. | |
2007 | - GAMEMODE_DetermineGameMode( ); | |
2008 | -} | |
2009 | - | |
2010 | -//***************************************************************************** | |
2011 | -// | |
2012 | -CUSTOM_CVAR( Bool, skulltag, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_CAMPAIGNLOCK ) | |
2013 | -{ | |
2014 | - UCVarValue Val; | |
2015 | - | |
2016 | - if ( self == true ) | |
2017 | - { | |
2018 | - Val.Bool = true; | |
2019 | - // Enable teamgame if we're playing CTF. | |
2020 | - teamgame.ForceSet( Val, CVAR_Bool ); | |
2021 | - | |
2022 | - Val.Bool = false; | |
2023 | - // Disable other modes. | |
2024 | - ctf.ForceSet( Val, CVAR_Bool ); | |
2025 | - oneflagctf.ForceSet( Val, CVAR_Bool ); | |
2026 | - domination.ForceSet( Val, CVAR_Bool ); | |
2027 | - } | |
2028 | - | |
2029 | - // Reset what the current game mode is. | |
2030 | - GAMEMODE_DetermineGameMode( ); | |
2031 | -} | |
2032 | - | |
2033 | -//***************************************************************************** | |
2034 | -// | |
2035 | -CUSTOM_CVAR( Bool, domination, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_CAMPAIGNLOCK ) | |
2036 | -{ | |
2037 | - UCVarValue Val; | |
2038 | - | |
2039 | - if ( self == true ) | |
2040 | - { | |
2041 | - Val.Bool = true; | |
2042 | - // Enable teamgame if we're playing CTF. | |
2043 | - teamgame.ForceSet( Val, CVAR_Bool ); | |
2044 | - | |
2045 | - Val.Bool = false; | |
2046 | - // Disable other modes. | |
2047 | - ctf.ForceSet( Val, CVAR_Bool ); | |
2048 | - oneflagctf.ForceSet( Val, CVAR_Bool ); | |
2049 | - skulltag.ForceSet( Val, CVAR_Bool ); | |
2050 | - } | |
2051 | - | |
2052 | - // Reset what the current game mode is. | |
2053 | - GAMEMODE_DetermineGameMode( ); | |
2054 | -} | |
1927 | +// [AK] Added CVAR_GAMEMODE. | |
1928 | +CVAR( Bool, teamgame, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_GAMEMODE ) | |
1929 | +CVAR( Bool, ctf, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_GAMEMODE ) | |
1930 | +CVAR( Bool, oneflagctf, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_GAMEMODE ) | |
1931 | +CVAR( Bool, skulltag, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_GAMEMODE ) | |
1932 | +CVAR( Bool, domination, false, CVAR_SERVERINFO | CVAR_LATCH | CVAR_GAMEMODE ) | |
2055 | 1933 | |
2056 | 1934 | //***************************************************************************** |
2057 | 1935 | // |
@@ -12,6 +12,7 @@ | ||
12 | 12 | Name "Cooperative" |
13 | 13 | ShortName "COOP" |
14 | 14 | F1Texture "F1_COOP" |
15 | + CVar "cooperative" | |
15 | 16 | } |
16 | 17 | |
17 | 18 | // Survival co-op |
@@ -27,6 +28,7 @@ | ||
27 | 28 | Name "Survival" |
28 | 29 | ShortName "SURV" |
29 | 30 | F1Texture "F1_SCP" |
31 | + CVar "survival" | |
30 | 32 | } |
31 | 33 | |
32 | 34 | // Invasion |
@@ -41,6 +43,7 @@ | ||
41 | 43 | Name "Invasion" |
42 | 44 | ShortName "INVAS" |
43 | 45 | F1Texture "F1_INV" |
46 | + CVar "invasion" | |
44 | 47 | } |
45 | 48 | |
46 | 49 | // Regular deathmatch |
@@ -52,6 +55,7 @@ | ||
52 | 55 | Name "Deathmatch" |
53 | 56 | ShortName "DM" |
54 | 57 | F1Texture "F1_DM" |
58 | + CVar "deathmatch" | |
55 | 59 | } |
56 | 60 | |
57 | 61 | // Teamplay DM |
@@ -64,6 +68,7 @@ | ||
64 | 68 | Name "Team Deathmatch" |
65 | 69 | ShortName "TDM" |
66 | 70 | F1Texture "F1_TDM" |
71 | + CVar "teamplay" | |
67 | 72 | } |
68 | 73 | |
69 | 74 | // Duel |
@@ -77,6 +82,7 @@ | ||
77 | 82 | Name "Duel" |
78 | 83 | ShortName "DUEL" |
79 | 84 | F1Texture "F1_DUEL" |
85 | + CVar "duel" | |
80 | 86 | } |
81 | 87 | |
82 | 88 | // Terminator DM |
@@ -88,6 +94,7 @@ | ||
88 | 94 | Name "Terminator" |
89 | 95 | ShortName "TERM" |
90 | 96 | F1Texture "F1_TERM" |
97 | + CVar "terminator" | |
91 | 98 | } |
92 | 99 | |
93 | 100 | // Last man standing |
@@ -104,6 +111,7 @@ | ||
104 | 111 | Name "Last Man Standing" |
105 | 112 | ShortName "LMS" |
106 | 113 | F1Texture "F1_LMS" |
114 | + CVar "lastmanstanding" | |
107 | 115 | } |
108 | 116 | |
109 | 117 | // Team LMS |
@@ -121,6 +129,7 @@ | ||
121 | 129 | Name "Team Last Man Standing" |
122 | 130 | ShortName "TLMS" |
123 | 131 | F1Texture "F1_TLMS" |
132 | + CVar "teamlms" | |
124 | 133 | } |
125 | 134 | |
126 | 135 | // Possession DM |
@@ -134,6 +143,7 @@ | ||
134 | 143 | Name "Possession" |
135 | 144 | ShortName "POSS" |
136 | 145 | F1Texture "F1_POSS" |
146 | + CVar "possession" | |
137 | 147 | } |
138 | 148 | |
139 | 149 | // Team possession |
@@ -147,6 +157,7 @@ | ||
147 | 157 | Name "Team Possession" |
148 | 158 | ShortName "TM POSS" |
149 | 159 | F1Texture "F1_TPOSS" |
160 | + CVar "teampossession" | |
150 | 161 | } |
151 | 162 | |
152 | 163 | // Regular teamgame |
@@ -159,6 +170,7 @@ | ||
159 | 170 | Name "Team Game" |
160 | 171 | ShortName "TM GAME" |
161 | 172 | F1Texture "F1_TMGM" |
173 | + CVar "teamgame" | |
162 | 174 | } |
163 | 175 | |
164 | 176 | // Capture the flag |
@@ -173,6 +185,7 @@ | ||
173 | 185 | Name "Capture the Flag" |
174 | 186 | ShortName "CTF" |
175 | 187 | F1Texture "F1_CTF" |
188 | + CVar "ctf" | |
176 | 189 | } |
177 | 190 | |
178 | 191 | // One flag CTF |
@@ -187,6 +200,7 @@ | ||
187 | 200 | Name "1-Flag CTF" |
188 | 201 | ShortName "1F-CTF" |
189 | 202 | F1Texture "F1_1FCTF" |
203 | + CVar "oneflagctf" | |
190 | 204 | } |
191 | 205 | |
192 | 206 | // Skulltag |
@@ -200,6 +214,7 @@ | ||
200 | 214 | Name "Skulltag" |
201 | 215 | ShortName "ST" |
202 | 216 | F1Texture "F1_ST" |
217 | + CVar "skulltag" | |
203 | 218 | } |
204 | 219 | |
205 | 220 | // Domination |
@@ -212,4 +227,5 @@ | ||
212 | 227 | Name "Domination" |
213 | 228 | ShortName "DOM" |
214 | 229 | F1Texture "F1_DOM" |
230 | + CVar "domination" | |
215 | 231 | } |
\ No newline at end of file |