mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-10 23:27:57 -05:00
Grief: decrease sv_connectTimeout dvar
Remove replacing _zm::onallplayersready
This commit is contained in:
@ -4,7 +4,6 @@
|
||||
#include maps\mp\gametypes_zm\_hud_util;
|
||||
#include maps\mp\gametypes_zm\_hud_message;
|
||||
|
||||
#include scripts/zm/replaced/_zm;
|
||||
#include scripts/zm/replaced/_zm_audio_announcer;
|
||||
#include scripts/zm/replaced/_zm_game_module;
|
||||
#include scripts/zm/replaced/_zm_gametype;
|
||||
@ -19,7 +18,6 @@ main()
|
||||
return;
|
||||
}
|
||||
|
||||
replaceFunc(maps/mp/zombies/_zm::onallplayersready, scripts/zm/replaced/_zm::onallplayersready);
|
||||
replaceFunc(maps/mp/gametypes_zm/_zm_gametype::onspawnplayer, scripts/zm/replaced/_zm_gametype::onspawnplayer);
|
||||
replaceFunc(maps/mp/zombies/_zm_audio_announcer::playleaderdialogonplayer, scripts/zm/replaced/_zm_audio_announcer::playleaderdialogonplayer);
|
||||
replaceFunc(maps/mp/zombies/_zm_game_module::wait_for_team_death_and_round_end, scripts/zm/replaced/_zm_game_module::wait_for_team_death_and_round_end);
|
||||
@ -45,7 +43,8 @@ init()
|
||||
setDvar( "zombies_minplayers", 2 );
|
||||
}
|
||||
|
||||
setDvar( "ui_scorelimit", 3 );
|
||||
setDvar("sv_connectTimeout", 30);
|
||||
setDvar("ui_scorelimit", 3);
|
||||
|
||||
setteamscore("axis", 0);
|
||||
setteamscore("allies", 0);
|
||||
@ -199,7 +198,6 @@ set_grief_vars()
|
||||
level.grief_score["A"] = 0;
|
||||
level.grief_score["B"] = 0;
|
||||
level.game_mode_griefed_time = 2.5;
|
||||
level.crash_delay = 20;
|
||||
}
|
||||
|
||||
grief_onplayerconnect()
|
||||
|
@ -7,56 +7,6 @@ check_quickrevive_for_hotjoin(disconnecting_player)
|
||||
// always use coop quick revive
|
||||
}
|
||||
|
||||
onallplayersready()
|
||||
{
|
||||
while ( getPlayers().size == 0 )
|
||||
{
|
||||
wait 0.1;
|
||||
}
|
||||
game[ "state" ] = "playing";
|
||||
wait_for_all_players_to_connect( level.crash_delay );
|
||||
setinitialplayersconnected();
|
||||
flag_set( "initial_players_connected" );
|
||||
while ( !aretexturesloaded() )
|
||||
{
|
||||
wait 0.05;
|
||||
}
|
||||
thread maps/mp/zombies/_zm::start_zombie_logic_in_x_sec( 3 );
|
||||
maps/mp/zombies/_zm::fade_out_intro_screen_zm( 5, 1.5, 1 );
|
||||
}
|
||||
|
||||
wait_for_all_players_to_connect( max_wait )
|
||||
{
|
||||
timeout = int( max_wait * 10 );
|
||||
cur_time = 0;
|
||||
player_count_actual = 0;
|
||||
while ( getnumconnectedplayers() < getnumexpectedplayers() || player_count_actual != getnumexpectedplayers() )
|
||||
{
|
||||
players = getPlayers();
|
||||
player_count_actual = 0;
|
||||
for ( i = 0; i < players.size; i++ )
|
||||
{
|
||||
players[ i ] freezecontrols( 1 );
|
||||
if ( players[ i ].sessionstate == "playing" )
|
||||
{
|
||||
player_count_actual++;
|
||||
}
|
||||
}
|
||||
|
||||
wait 0.1;
|
||||
|
||||
if ( getPlayers().size >= getDvarInt( "zombies_minplayers" ) )
|
||||
{
|
||||
cur_time++;
|
||||
}
|
||||
|
||||
if ( cur_time >= timeout )
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
actor_damage_override( inflictor, attacker, damage, flags, meansofdeath, weapon, vpoint, vdir, shitloc, psoffsettime, boneindex )
|
||||
{
|
||||
if ( !isDefined( self ) || !isDefined( attacker ) )
|
||||
|
Reference in New Issue
Block a user