mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-06-26 22:21:50 +00:00
bots_main_waitForHostTime
This commit is contained in:
@ -152,6 +152,8 @@ You can find the ModDB release post [here](https://www.moddb.com/mods/bot-warfar
|
|||||||
|
|
||||||
- bots_main_GUIDs - a list of GUIDs (comma seperated) of players who will be considered a host
|
- 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_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
|
- bots_main_debug - a boolean value (0 or 1), enables or disables the waypoint editor
|
||||||
|
@ -30,6 +30,8 @@ init()
|
|||||||
setDvar("bots_main_GUIDs", "");//guids of players who will be given host powers, comma seperated
|
setDvar("bots_main_GUIDs", "");//guids of players who will be given host powers, comma seperated
|
||||||
if(getDvar("bots_main_firstIsHost") == "")
|
if(getDvar("bots_main_firstIsHost") == "")
|
||||||
setDvar("bots_main_firstIsHost", false);//first play to connect is a host
|
setDvar("bots_main_firstIsHost", false);//first play 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") == "")
|
if(getDvar("bots_manage_add") == "")
|
||||||
setDvar("bots_manage_add", 0);//amount of bots to add to the game
|
setDvar("bots_manage_add", 0);//amount of bots to add to the game
|
||||||
|
@ -560,7 +560,7 @@ bot_wait_for_host()
|
|||||||
while (!isDefined(level) || !isDefined(level.players))
|
while (!isDefined(level) || !isDefined(level.players))
|
||||||
wait 0.05;
|
wait 0.05;
|
||||||
|
|
||||||
for(i = 0; i < 100; i++)
|
for(i = getDvarFloat("bots_main_waitForHostTime"); i > 0; i -= 0.05)
|
||||||
{
|
{
|
||||||
host = GetHostPlayer();
|
host = GetHostPlayer();
|
||||||
|
|
||||||
@ -573,7 +573,7 @@ bot_wait_for_host()
|
|||||||
if(!isDefined(host))
|
if(!isDefined(host))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for(i = 0; i < 100; i++)
|
for(i = getDvarFloat("bots_main_waitForHostTime"); i > 0; i -= 0.05)
|
||||||
{
|
{
|
||||||
if(IsDefined( host.pers[ "team" ] ))
|
if(IsDefined( host.pers[ "team" ] ))
|
||||||
break;
|
break;
|
||||||
@ -584,7 +584,7 @@ bot_wait_for_host()
|
|||||||
if(!IsDefined( host.pers[ "team" ] ))
|
if(!IsDefined( host.pers[ "team" ] ))
|
||||||
return;
|
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")
|
if(host.pers[ "team" ] == "allies" || host.pers[ "team" ] == "axis")
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user