mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-22 05:55:42 +00:00
iw4x
This commit is contained in:
parent
86b9957bb6
commit
15d878a12e
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
init()
|
init()
|
||||||
{
|
{
|
||||||
|
//Intricate - Create DVAR for forcing auto assign, useful for server that would like it.
|
||||||
|
SetDvarIfUninitialized("scr_player_forceautoassign", true);
|
||||||
if ( !isDefined( game["gamestarted"] ) )
|
if ( !isDefined( game["gamestarted"] ) )
|
||||||
{
|
{
|
||||||
game["menu_team"] = "team_marinesopfor";
|
game["menu_team"] = "team_marinesopfor";
|
||||||
@ -139,7 +141,10 @@ onMenuResponse()
|
|||||||
{
|
{
|
||||||
self closepopupMenu();
|
self closepopupMenu();
|
||||||
self closeInGameMenu();
|
self closeInGameMenu();
|
||||||
self openpopupMenu( game["menu_changeclass_allies"] );
|
if ( getDvar( "g_gametype" ) != "oitc" && getDvar( "g_gametype" ) != "gg" && getDvar( "g_gametype" ) != "ss" && !isDefined(level.customClassCB) )
|
||||||
|
{
|
||||||
|
self openpopupMenu( game["menu_changeclass_allies"] );
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,7 +152,10 @@ onMenuResponse()
|
|||||||
{
|
{
|
||||||
self closepopupMenu();
|
self closepopupMenu();
|
||||||
self closeInGameMenu();
|
self closeInGameMenu();
|
||||||
self openpopupMenu( game["menu_changeclass_axis"] );
|
if ( getDvar( "g_gametype" ) != "oitc" && getDvar( "g_gametype" ) != "gg" && getDvar( "g_gametype" ) != "ss" && !isDefined(level.customClassCB) )
|
||||||
|
{
|
||||||
|
self openpopupMenu( game["menu_changeclass_axis"] );
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -174,8 +182,14 @@ onMenuResponse()
|
|||||||
|
|
||||||
if ( response == "endround" )
|
if ( response == "endround" )
|
||||||
{
|
{
|
||||||
|
if ( !self isHost() )
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if ( !level.gameEnded )
|
if ( !level.gameEnded )
|
||||||
{
|
{
|
||||||
|
setDvar("sv_dontrotate", 1);
|
||||||
level thread maps\mp\gametypes\_gamelogic::forceEnd();
|
level thread maps\mp\gametypes\_gamelogic::forceEnd();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -310,6 +324,17 @@ beginClassChoice( forceNewChoice )
|
|||||||
{
|
{
|
||||||
assert( self.pers["team"] == "axis" || self.pers["team"] == "allies" );
|
assert( self.pers["team"] == "axis" || self.pers["team"] == "allies" );
|
||||||
|
|
||||||
|
if ( getDvar( "g_gametype" ) == "oitc" || getDvar( "g_gametype" ) == "gg" || getDvar( "g_gametype" ) == "ss" || isDefined(level.customClassCB) )
|
||||||
|
{
|
||||||
|
if ( !isAlive( self ) )
|
||||||
|
self thread maps\mp\gametypes\_playerlogic::predictAboutToSpawnPlayerOverTime( 0.1 );
|
||||||
|
|
||||||
|
self.selectedClass = true;
|
||||||
|
self menuClass( "assault_mp,0" );
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
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.
|
||||||
@ -323,7 +348,12 @@ beginClassChoice( forceNewChoice )
|
|||||||
|
|
||||||
beginTeamChoice()
|
beginTeamChoice()
|
||||||
{
|
{
|
||||||
self openpopupMenu( game["menu_team"] );
|
//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( GetDvar("scr_player_forceautoassign") && GetDvar("fs_game") == "" )
|
||||||
|
self notify("menuresponse", game["menu_team"], "autoassign");
|
||||||
|
else
|
||||||
|
self openpopupMenu( game["menu_team"] );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -431,7 +461,6 @@ menuSpectator()
|
|||||||
self thread maps\mp\gametypes\_playerlogic::spawnSpectator();
|
self thread maps\mp\gametypes\_playerlogic::spawnSpectator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
menuClass( response )
|
menuClass( response )
|
||||||
{
|
{
|
||||||
self closeMenus();
|
self closeMenus();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user