mirror of
https://github.com/ineedbots/t5_bot_warfare.git
synced 2025-04-20 16:45:43 +00:00
bots_loadout_prestige
This commit is contained in:
parent
54c2925599
commit
f4732c8a83
@ -177,6 +177,42 @@ fixSecondarySwitch(weap)
|
||||
self setSpawnWeapon(weap);
|
||||
}
|
||||
|
||||
/*
|
||||
Gets the prestige
|
||||
*/
|
||||
bot_get_prestige()
|
||||
{
|
||||
p_dvar = getDvarInt("bots_loadout_prestige");
|
||||
p = 0;
|
||||
|
||||
if (p_dvar == -1)
|
||||
{
|
||||
for (i = 0; i < level.players.size; i++)
|
||||
{
|
||||
player = level.players[i];
|
||||
|
||||
if (!isDefined(player.team))
|
||||
continue;
|
||||
|
||||
if (player is_bot())
|
||||
continue;
|
||||
|
||||
p = player maps\mp\gametypes\_persistence::statGet( "plevel" );
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (p_dvar == -2)
|
||||
{
|
||||
p = randomInt(17);
|
||||
}
|
||||
else
|
||||
{
|
||||
p = p_dvar;
|
||||
}
|
||||
|
||||
self.pers["bot"]["prestige"] = p;
|
||||
}
|
||||
|
||||
/*
|
||||
Gives the rank to the bot
|
||||
*/
|
||||
@ -188,8 +224,12 @@ bot_rank()
|
||||
|
||||
self.pers["rankxp"] = self.pers["bot"]["rankxp"];
|
||||
rankId = self maps\mp\gametypes\_rank::getRankForXp( self.pers["bot"]["rankxp"] );
|
||||
prestige = self.pers["bot"]["prestige"];
|
||||
|
||||
self.pers["rank"] = rankId;
|
||||
self setRank( rankId );
|
||||
self.pers["prestige"] = prestige;
|
||||
self.pers["plevel"] = prestige;
|
||||
self setRank( rankId, prestige );
|
||||
|
||||
if(!level.gameEnded)
|
||||
level waittill("game_ended");
|
||||
|
@ -17,6 +17,7 @@ added()
|
||||
{
|
||||
self maps\mp\bots\_bot_loadout::bot_get_cod_points();
|
||||
self maps\mp\bots\_bot_loadout::bot_get_rank();
|
||||
self maps\mp\bots\_bot_loadout::bot_get_prestige();
|
||||
|
||||
self maps\mp\bots\_bot_loadout::bot_setKillstreaks();
|
||||
|
||||
|
@ -51,6 +51,8 @@ init()
|
||||
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);
|
||||
if(getDvar("bots_loadout_prestige") == "")// what pretige the bots will be, -1 is the players, -2 is random
|
||||
setDvar("bots_loadout_prestige", -1);
|
||||
|
||||
level.bots = [];
|
||||
level.bot_decoys = [];
|
||||
|
Loading…
x
Reference in New Issue
Block a user