mirror of
https://github.com/XLabsProject/iw4x-rawfiles.git
synced 2023-08-02 15:02:11 +02:00
Replace questionable patch with less questionable code
This commit is contained in:
parent
71e848b77d
commit
37af65985f
@ -1,9 +1,21 @@
|
|||||||
#include maps\mp\_utility;
|
#include maps\mp\_utility;
|
||||||
|
|
||||||
|
/*
|
||||||
|
Author: Intricate, Diamante
|
||||||
|
Dvars:
|
||||||
|
- scr_player_forceautoassign <bool>
|
||||||
|
false - (default) default game behaviour
|
||||||
|
true - players will be automatically assigned to a team
|
||||||
|
|
||||||
|
Notes: fs_game check was removed as the default value is now false.
|
||||||
|
If a server owner decides to set it to true, its their choice regardless of loaded mods.
|
||||||
|
Mods should replace this file in case of conflicts.
|
||||||
|
*/
|
||||||
|
|
||||||
init()
|
init()
|
||||||
{
|
{
|
||||||
//Intricate - Create DVAR for forcing auto assign, useful for server that would like it.
|
SetDvarIfUninitialized( "scr_player_forceautoassign", false );
|
||||||
SetDvarIfUninitialized("scr_player_forceautoassign", true);
|
|
||||||
if ( !isDefined( game["gamestarted"] ) )
|
if ( !isDefined( game["gamestarted"] ) )
|
||||||
{
|
{
|
||||||
game["menu_team"] = "team_marinesopfor";
|
game["menu_team"] = "team_marinesopfor";
|
||||||
@ -348,9 +360,8 @@ beginClassChoice( forceNewChoice )
|
|||||||
|
|
||||||
beginTeamChoice()
|
beginTeamChoice()
|
||||||
{
|
{
|
||||||
//Intricate - We put the auto assign where the actual team selection is. Also make sure that a mod isn't loaded, mainly to prevent bugs with them.
|
if ( getDvarInt( "scr_player_forceautoassign" ) != 0 )
|
||||||
if( GetDvar("scr_player_forceautoassign") && GetDvar("fs_game") == "" )
|
self notify( "menuresponse", game["menu_team"], "autoassign");
|
||||||
self notify("menuresponse", game["menu_team"], "autoassign");
|
|
||||||
else
|
else
|
||||||
self openpopupMenu( game["menu_team"] );
|
self openpopupMenu( game["menu_team"] );
|
||||||
|
|
||||||
@ -360,7 +371,7 @@ beginTeamChoice()
|
|||||||
showMainMenuForTeam()
|
showMainMenuForTeam()
|
||||||
{
|
{
|
||||||
assert( self.pers["team"] == "axis" || self.pers["team"] == "allies" );
|
assert( self.pers["team"] == "axis" || self.pers["team"] == "allies" );
|
||||||
|
|
||||||
team = self.pers["team"];
|
team = self.pers["team"];
|
||||||
|
|
||||||
// menu_changeclass_team is the one where you choose one of the n classes to play as.
|
// menu_changeclass_team is the one where you choose one of the n classes to play as.
|
||||||
|
Loading…
Reference in New Issue
Block a user