mirror of
https://github.com/ineedbots/iw3_bot_warfare.git
synced 2025-04-20 17:55:42 +00:00
bots_main_waitForHostTime
This commit is contained in:
parent
c0504e9af8
commit
a6e2a524f4
@ -154,6 +154,8 @@ You can easily setup a local LAN dedicated server for you to join and play on. H
|
||||
|
||||
- bots_main_GUIDs - a list of GUIDs (comma seperated) of players who will be considered a host
|
||||
|
||||
- bots_main_waitForHostTime - a float value, how long in seconds to wait for the host player to connect before adding in bots
|
||||
|
||||
- bots_main_menu - a boolean value (0 or 1), enables or disables the menu
|
||||
|
||||
- bots_main_debug - a boolean value (0 or 1), enables or disables the waypoint editor
|
||||
|
@ -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
|
||||
|
@ -691,7 +691,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();
|
||||
|
||||
@ -704,7 +704,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;
|
||||
@ -715,7 +715,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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user