mirror of
https://github.com/ineedbots/t4_bot_warfare.git
synced 2025-04-22 16:05:44 +00:00
bots_loadout_rank dvar
This commit is contained in:
parent
0a2ad28468
commit
10751e2e65
@ -123,6 +123,8 @@ Pressing the menu button again closes menus.
|
|||||||
|
|
||||||
- bots_loadout_allow_op - a boolean value (0 or 1), whether or not if the bots are allowed to use jug, marty, etc.
|
- bots_loadout_allow_op - a boolean value (0 or 1), whether or not if the bots are allowed to use jug, marty, etc.
|
||||||
|
|
||||||
|
- bots_loadout_rank - an integer number, bots will be around this rank, -1 is average of all players in game, 0 is all random
|
||||||
|
|
||||||
- bots_play_move - a boolean value (0 or 1), whether or not if the bots will move
|
- bots_play_move - a boolean value (0 or 1), whether or not if the bots will move
|
||||||
- bots_play_knife - a boolean value (0 or 1), whether or not if the bots will use the knife
|
- bots_play_knife - a boolean value (0 or 1), whether or not if the bots will use the knife
|
||||||
- bots_play_fire - a boolean value (0 or 1), whether or not if the bots will fire their weapons
|
- bots_play_fire - a boolean value (0 or 1), whether or not if the bots will fire their weapons
|
||||||
|
@ -60,6 +60,8 @@ init()
|
|||||||
setDvar("bots_loadout_reasonable", false);
|
setDvar("bots_loadout_reasonable", false);
|
||||||
if(getDvar("bots_loadout_allow_op") == "")//allows jug, marty and laststand
|
if(getDvar("bots_loadout_allow_op") == "")//allows jug, marty and laststand
|
||||||
setDvar("bots_loadout_allow_op", true);
|
setDvar("bots_loadout_allow_op", true);
|
||||||
|
if(getDvar("bots_loadout_rank") == "")// what rank the bots should be around, -1 is around the players, 0 is all random
|
||||||
|
setDvar("bots_loadout_rank", -1);
|
||||||
|
|
||||||
if(getDvar("bots_play_move") == "")//bots move
|
if(getDvar("bots_play_move") == "")//bots move
|
||||||
setDvar("bots_play_move", true);
|
setDvar("bots_play_move", true);
|
||||||
|
@ -814,6 +814,11 @@ get_random_weapon(groups, rank)
|
|||||||
Gets an exp amount for the bot that is nearish the host's xp.
|
Gets an exp amount for the bot that is nearish the host's xp.
|
||||||
*/
|
*/
|
||||||
bot_get_rank()
|
bot_get_rank()
|
||||||
|
{
|
||||||
|
rank = 1;
|
||||||
|
rank_dvar = getDvarInt("bots_loadout_rank");
|
||||||
|
|
||||||
|
if (rank_dvar == -1)
|
||||||
{
|
{
|
||||||
ranks = [];
|
ranks = [];
|
||||||
bot_ranks = [];
|
bot_ranks = [];
|
||||||
@ -857,6 +862,15 @@ bot_get_rank()
|
|||||||
s = array_std_deviation( ranks, avg );
|
s = array_std_deviation( ranks, avg );
|
||||||
|
|
||||||
rank = Round( random_normal_distribution( avg, s, 0, level.maxRank ) );
|
rank = Round( random_normal_distribution( avg, s, 0, level.maxRank ) );
|
||||||
|
}
|
||||||
|
else if (rank_dvar == 0)
|
||||||
|
{
|
||||||
|
rank = Round( random_normal_distribution( 35, 15, 0, level.maxRank ) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rank = Round( random_normal_distribution( rank_dvar, 5, 0, level.maxRank ) );
|
||||||
|
}
|
||||||
|
|
||||||
return maps\mp\gametypes\_rank::getRankInfoMinXP( rank );
|
return maps\mp\gametypes\_rank::getRankInfoMinXP( rank );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user