This commit is contained in:
INeedBots 2020-11-29 18:17:46 -06:00
parent a358285862
commit c675a4a46c
2 changed files with 16 additions and 8 deletions

View File

@ -946,7 +946,7 @@ start_bot_threads()
self thread bot_sd_defenders(); self thread bot_sd_defenders();
self thread bot_sd_attackers(); self thread bot_sd_attackers();
// war and cap self thread bot_cap();
} }
self thread bot_revive_think(); self thread bot_revive_think();
@ -3874,24 +3874,24 @@ bot_cap()
{ {
wait( randomintrange( 3, 5 ) ); wait( randomintrange( 3, 5 ) );
if ( self IsUsingRemote() || self.bot_lock_goal ) if ( self.bot_lock_goal )
{ {
continue; continue;
} }
if(!isDefined(level.capZones)) if(!isDefined(level.teamFlagZones))
continue; continue;
if(!isDefined(level.teamFlags)) if(!isDefined(level.teamFlags))
continue; continue;
myflag = level.teamFlags[myteam]; myflag = level.teamFlags[myteam];
myzone = level.capZones[myteam]; myzone = level.teamFlagZones[myteam];
theirflag = level.teamFlags[otherTeam]; theirflag = level.teamFlags[otherTeam];
theirzone = level.capZones[otherTeam]; theirzone = level.teamFlagZones[otherTeam];
if(!myflag maps\mp\gametypes\_gameobjects::isHome()) if(myflag maps\mp\gametypes\_gameobjects::isObjectAwayFromHome())
{ {
carrier = myflag.carrier; carrier = myflag.carrier;
@ -3906,7 +3906,7 @@ bot_cap()
} }
else else
{ {
if(theirflag maps\mp\gametypes\_gameobjects::isHome() && randomint(100) < 50) if(!theirflag maps\mp\gametypes\_gameobjects::isObjectAwayFromHome() && randomint(100) < 50)
{ //take their flag { //take their flag
self bot_cap_get_flag(theirflag); self bot_cap_get_flag(theirflag);
} }
@ -3923,7 +3923,7 @@ bot_cap()
if(theirzone.bots > 2 || randomInt(100) < 45) if(theirzone.bots > 2 || randomInt(100) < 45)
{ {
//kill carrier //kill carrier
if(carrier _hasPerk( "specialty_coldblooded" )) if(carrier hasPerk( "specialty_gpsjammer" ))
continue; continue;
origin = carrier.origin; origin = carrier.origin;

View File

@ -362,6 +362,14 @@ isGased()
return (isdefined(self.inPoisonArea) && self.inPoisonArea && !self hasPerk("specialty_gas_mask")); return (isdefined(self.inPoisonArea) && self.inPoisonArea && !self hasPerk("specialty_gas_mask"));
} }
/*
If the player is the flag carrier
*/
isFlagCarrier()
{
return (isDefined(self.isFlagCarrier) && self.isFlagCarrier);
}
/* /*
Returns a valid grenade launcher weapon Returns a valid grenade launcher weapon
*/ */