mirror of
https://github.com/ineedbots/t5_bot_warfare.git
synced 2025-04-20 08:45:42 +00:00
bots_loadout_rank bots_loadout_codpoints
This commit is contained in:
parent
8701417d9a
commit
54c2925599
@ -985,6 +985,9 @@ bot_get_cod_points()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cp_dvar = getDvarInt("bots_loadout_codpoints");
|
||||||
|
if (cp_dvar == -1)
|
||||||
|
{
|
||||||
players = get_players();
|
players = get_players();
|
||||||
total_points = [];
|
total_points = [];
|
||||||
|
|
||||||
@ -1008,6 +1011,15 @@ bot_get_cod_points()
|
|||||||
|
|
||||||
point_average = array_average( total_points );
|
point_average = array_average( total_points );
|
||||||
self.pers["bot"][ "cod_points" ] = Int( point_average * RandomFloatRange( 0.6, 0.8 ) );
|
self.pers["bot"][ "cod_points" ] = Int( point_average * RandomFloatRange( 0.6, 0.8 ) );
|
||||||
|
}
|
||||||
|
else if(cp_dvar == 0)
|
||||||
|
{
|
||||||
|
self.pers["bot"][ "cod_points" ] = Round( random_normal_distribution( 50000, 15000, 0, 100000 ) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
self.pers["bot"][ "cod_points" ] = Round( random_normal_distribution( cp_dvar, 1500, 0, 100000 ) );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1015,6 +1027,11 @@ bot_get_cod_points()
|
|||||||
*/
|
*/
|
||||||
bot_get_rank()
|
bot_get_rank()
|
||||||
{
|
{
|
||||||
|
rank = 1;
|
||||||
|
rank_dvar = getDvarInt("bots_loadout_rank");
|
||||||
|
|
||||||
|
if (rank_dvar == -1)
|
||||||
|
{
|
||||||
players = get_players();
|
players = get_players();
|
||||||
|
|
||||||
ranks = [];
|
ranks = [];
|
||||||
@ -1058,7 +1075,16 @@ bot_get_rank()
|
|||||||
avg = array_average( ranks );
|
avg = array_average( ranks );
|
||||||
s = array_std_deviation( ranks, avg );
|
s = array_std_deviation( ranks, avg );
|
||||||
|
|
||||||
rank = Int( 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, 20, 0, level.maxRank ) );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
rank = Round( random_normal_distribution( rank_dvar, 5, 0, level.maxRank ) );
|
||||||
|
}
|
||||||
|
|
||||||
self.pers["bot"]["rankxp"] = maps\mp\gametypes\_rank::getRankInfoMinXP( rank );
|
self.pers["bot"]["rankxp"] = maps\mp\gametypes\_rank::getRankInfoMinXP( rank );
|
||||||
}
|
}
|
||||||
|
@ -47,6 +47,10 @@ 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_loadout_codpoints") == "")// how much cod points a bot should have, -1 is around the players, 0 is all random
|
||||||
|
setDvar("bots_loadout_codpoints", -1);
|
||||||
|
|
||||||
level.bots = [];
|
level.bots = [];
|
||||||
level.bot_decoys = [];
|
level.bot_decoys = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user