fix: allow to plant bomb only when icon blinking (ref #323)
fix: random bots shoots and enemy ignorance on es_industrial (ref #323)
This commit is contained in:
parent
b56a598876
commit
9201daf9f9
8 changed files with 19 additions and 14 deletions
|
|
@ -1012,7 +1012,7 @@ void Bot::checkMsgQueue () {
|
|||
}
|
||||
|
||||
// prevent terrorists from buying on es maps
|
||||
if (game.mapIs (MapFlags::Escape) && m_team == Team::Terrorist) {
|
||||
if (game.mapIs (MapFlags::Escape) && m_team == Team::Terrorist && !m_inBuyZone) {
|
||||
m_buyState = BuyState::Done;
|
||||
}
|
||||
|
||||
|
|
@ -3475,7 +3475,12 @@ void Bot::takeBlind (int alpha) {
|
|||
// this function gets called by network message handler, when screenfade message get's send
|
||||
// it's used to make bot blind from the grenade.
|
||||
|
||||
m_maxViewDistance = rg.get (10.0f, 20.0f);
|
||||
m_viewDistance = rg.get (10.0f, 20.0f);
|
||||
|
||||
// do not take in effect some unique map effects on round start
|
||||
if (bots.getRoundStartTime () + 5.0f < game.time ()) {
|
||||
m_viewDistance = m_maxViewDistance;
|
||||
}
|
||||
m_blindTime = game.time () + static_cast <float> (alpha - 200) / 16.0f;
|
||||
|
||||
if (m_blindTime < game.time ()) {
|
||||
|
|
|
|||
|
|
@ -327,7 +327,7 @@ bool Bot::lookupEnemies () {
|
|||
continue;
|
||||
}
|
||||
|
||||
// extra skill player can see thru smoke... if beeing attacked
|
||||
// extra skill player can see through smoke... if being attacked
|
||||
if (cv_whose_your_daddy.bool_ () && (player->v.button & (IN_ATTACK | IN_ATTACK2)) && m_viewDistance < m_maxViewDistance) {
|
||||
nearestDistanceSq = cr::sqrf (m_maxViewDistance);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@
|
|||
|
||||
ConVar cv_version ("version", product.version.chars (), Var::ReadOnly);
|
||||
|
||||
gamefuncs_t dllapi;
|
||||
newgamefuncs_t newapi;
|
||||
enginefuncs_t engfuncs;
|
||||
gamedll_funcs_t dllfuncs;
|
||||
gamefuncs_t dllapi {};
|
||||
newgamefuncs_t newapi {};
|
||||
enginefuncs_t engfuncs {};
|
||||
gamedll_funcs_t dllfuncs {};
|
||||
|
||||
meta_globals_t *gpMetaGlobals = nullptr;
|
||||
gamedll_funcs_t *gpGamedllFuncs = nullptr;
|
||||
|
|
|
|||
|
|
@ -1265,7 +1265,7 @@ int BotManager::getPlayerPriority (edict_t *ent) {
|
|||
}
|
||||
|
||||
// give bots some priority
|
||||
if (bot->m_hasC4 || bot->m_isVIP || bot->m_hasHostage || bot->m_healthValue < ent->v.health) {
|
||||
if (bot->m_hasC4 || bot->m_isVIP || bot->m_hasHostage || bot->m_healthValue < ent->v.health || (bot->m_currentTravelFlags & PathFlag::Jump)) {
|
||||
return bot->entindex () + kHighPriority;
|
||||
}
|
||||
auto task = bot->getCurrentTaskId ();
|
||||
|
|
@ -1452,8 +1452,8 @@ void Bot::newRound () {
|
|||
m_changeViewTime = game.time () + (rg.chance (25) ? mp_freezetime.float_ () : 0.0f);
|
||||
m_aimErrorTime = game.time ();
|
||||
|
||||
m_viewDistance = 4096.0f;
|
||||
m_maxViewDistance = 4096.0f;
|
||||
m_viewDistance = Frustum::kMaxViewDistance;
|
||||
m_maxViewDistance = Frustum::kMaxViewDistance;
|
||||
|
||||
m_liftEntity = nullptr;
|
||||
m_pickupItem = nullptr;
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ AStarResult AStarAlgo::find (int botTeam, int srcIndex, int destIndex, NodeAdder
|
|||
auto rsRandomizer = 1.0f;
|
||||
|
||||
// randomize path on round start now and then
|
||||
if (cv_path_randomize_on_round_start.bool_ () && bots.getRoundStartTime () + mp_freezetime.float_ () + 2.0f > game.time ()) {
|
||||
if (cv_path_randomize_on_round_start.bool_ () && bots.getRoundStartTime () + 4.0f > game.time ()) {
|
||||
rsRandomizer = rg.get (0.5f, static_cast <float> (botTeam) * 2.0f + 5.0f);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ void Bot::normal_ () {
|
|||
pushChatterMessage (Chatter::GoingToGuardVIPSafety); // play info about that
|
||||
}
|
||||
}
|
||||
else if (game.mapIs (MapFlags::Demolition) && ((m_pathFlags & NodeFlag::Goal) || m_inBombZone)) {
|
||||
else if (game.mapIs (MapFlags::Demolition) && ((m_pathFlags & NodeFlag::Goal) && m_inBombZone)) {
|
||||
// is it a terrorist carrying the bomb?
|
||||
if (m_hasC4) {
|
||||
if ((m_states & Sense::SeeingEnemy) && numFriendsNear (pev->origin, 768.0f) == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue