bots_main_firstIsHost enabled by default for new users

This commit is contained in:
INeedGames 2020-12-24 17:49:24 -06:00
parent 5f84895d0d
commit 164a42882d
3 changed files with 13 additions and 4 deletions

View File

@ -7,6 +7,13 @@ It aims to add playable AI to the multiplayer games of CoD4.
You can find the ModDB release post [here](https://www.moddb.com/mods/bot-warfare/downloads/cod4x-bot-warfare-latest) and the CoD4x.me post [here](https://cod4x.me/index.php?/forums/topic/3116-release-bot-warfare/). You can find the ModDB release post [here](https://www.moddb.com/mods/bot-warfare/downloads/cod4x-bot-warfare-latest) and the CoD4x.me post [here](https://cod4x.me/index.php?/forums/topic/3116-release-bot-warfare/).
## <span style="color:red">Important to public dedicated servers</span>
The ```bots_main_firstIsHost``` DVAR is enabled by default!
This is so inexperienced users of the mod can access with menu without any configuration.
Make sure to disable this DVAR by adding ```set bots_main_firstIsHost 0``` in your server config!
## Contents ## Contents
- [Features](#Features) - [Features](#Features)
- [Installation](#Installation) - [Installation](#Installation)
@ -65,11 +72,11 @@ You can easily setup a local LAN dedicated server for you to join and play on. H
## Documentation ## Documentation
### Menu Usage ### Menu Usage
You can open the menu by pressing the primary grenade and secondary grenade buttons together. - You can open the menu by pressing the primary grenade and secondary grenade buttons together.
You can navigate the options by the pressing the ADS and fire keys, and you can select options by pressing your melee key. - You can navigate the options by the pressing the ADS and fire keys, and you can select options by pressing your melee key.
Pressing the menu button again closes menus. - Pressing the menu button again closes menus.
### DVARs ### DVARs
- bots_manage_add - an integer amount of bots to add to the game, resets to 0 once the bots have been added. - bots_manage_add - an integer amount of bots to add to the game, resets to 0 once the bots have been added.

View File

@ -23,7 +23,7 @@ init()
if(getDvar("bots_main_GUIDs") == "") if(getDvar("bots_main_GUIDs") == "")
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 player to connect is a host setDvar("bots_main_firstIsHost", true);//first player to connect is a host
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

View File

@ -23,6 +23,8 @@ doHostCheck()
result = false; result = false;
if (getDvar("bots_main_firstIsHost") != "0") if (getDvar("bots_main_firstIsHost") != "0")
{ {
printToConsole("WARNING: bots_main_firstIsHost is enabled");
if (getDvar("bots_main_firstIsHost") == "1") if (getDvar("bots_main_firstIsHost") == "1")
{ {
setDvar("bots_main_firstIsHost", self getguid()); setDvar("bots_main_firstIsHost", self getguid());