mirror of
https://github.com/ineedbots/t4_bot_warfare.git
synced 2025-06-27 06:41:58 +00:00
bots_main_waitForHostTime
This commit is contained in:
@ -24,6 +24,8 @@ init()
|
||||
setDvar("bots_main_GUIDs", "");//guids of players who will be given host powers, comma seperated
|
||||
if(getDvar("bots_main_firstIsHost") == "")
|
||||
setDvar("bots_main_firstIsHost", true);//first player to connect is a host
|
||||
if(getDvar("bots_main_waitForHostTime") == "")
|
||||
setDvar("bots_main_waitForHostTime", 10.0);//how long to wait to wait for the host player
|
||||
|
||||
if(getDvar("bots_manage_add") == "")
|
||||
setDvar("bots_manage_add", 0);//amount of bots to add to the game
|
||||
|
@ -718,7 +718,7 @@ bot_wait_for_host()
|
||||
while (!isDefined(level) || !isDefined(level.players))
|
||||
wait 0.05;
|
||||
|
||||
for(i = 0; i < 100; i++)
|
||||
for(i = getDvarFloat("bots_main_waitForHostTime"); i > 0; i -= 0.05)
|
||||
{
|
||||
host = GetHostPlayer();
|
||||
|
||||
@ -731,7 +731,7 @@ bot_wait_for_host()
|
||||
if(!isDefined(host))
|
||||
return;
|
||||
|
||||
for(i = 0; i < 100; i++)
|
||||
for(i = getDvarFloat("bots_main_waitForHostTime"); i > 0; i -= 0.05)
|
||||
{
|
||||
if(IsDefined( host.pers[ "team" ] ))
|
||||
break;
|
||||
@ -742,7 +742,7 @@ bot_wait_for_host()
|
||||
if(!IsDefined( host.pers[ "team" ] ))
|
||||
return;
|
||||
|
||||
for(i = 0; i < 100; i++)
|
||||
for(i = getDvarFloat("bots_main_waitForHostTime"); i > 0; i -= 0.05)
|
||||
{
|
||||
if(host.pers[ "team" ] == "allies" || host.pers[ "team" ] == "axis")
|
||||
break;
|
||||
|
Reference in New Issue
Block a user