Merge branch 'master' into chatter-fixes-and-improvements

This commit is contained in:
Владислав Сухов 2024-05-17 18:33:56 +00:00
commit f049391637
26 changed files with 579 additions and 476 deletions

View file

@ -47,7 +47,8 @@ CR_DECLARE_SCOPED_ENUM (GameFlags,
HasFakePings = cr::bit (10), // on that game version we can fake bots pings
HasBotVoice = cr::bit (11), // on that game version we can use chatter
AnniversaryHL25 = cr::bit (12), // half-life 25th anniversary engine
Xash3DLegacy = cr::bit (13) // old xash3d-branch
Xash3DLegacy = cr::bit (13), // old xash3d-branch
ZombieMod = cr::bit (14) // zombie mod is active
)
// defines map type

View file

@ -269,7 +269,7 @@ public:
public:
int32_t getMaxRouteLength () const {
return length () / 2;
return (length () / 2) + (kMaxNodes / 256);
}
StringRef getAuthor () const {

View file

@ -122,6 +122,7 @@ public:
void setLastWinner (int winner);
void checkBotModel (edict_t *ent, char *infobuffer);
void checkNeedsToBeKicked ();
void refreshCreatureStatus ();
bool isTeamStacked (int team);
bool kickRandom (bool decQuota = true, Team fromTeam = Team::Unassigned);

View file

@ -189,7 +189,8 @@ public:
}
void init (int32_t length) {
m_path = cr::makeUnique <int32_t[]> (length);
const auto allocSize = static_cast <uint32_t> (length);
m_path = cr::makeUnique <int32_t[]> (allocSize);
}
};
@ -305,6 +306,7 @@ private:
bool m_moveToC4 {}; // ct is moving to bomb
bool m_needToSendWelcomeChat {}; // bot needs to greet people on server?
bool m_isCreature {}; // bot is not a player, but something else ? zombie ?
bool m_isOnInfectedTeam {}; // bot is zombie (this assumes bot is a creature)
bool m_defuseNotified {}; // bot is notified about bomb defusion
bool m_jumpSequence {}; // next path link will be jump link
bool m_checkFall {}; // check bot fall
@ -464,7 +466,7 @@ private:
void updateLookAnglesNewbie (const Vector &direction, float delta);
void setIdealReactionTimers (bool actual = false);
void updateHearing ();
void postprocessGoals (const IntArray &goals, int result[]);
void postProcessGoals (const IntArray &goals, int result[]);
void updatePickups ();
void ensureEntitiesClear ();
void checkTerrain (float movedDistance, const Vector &dirNormal);
@ -499,7 +501,7 @@ private:
void selectWeaponByIndex (int index);
void syncUpdatePredictedIndex ();
void updatePredictedIndex ();
void refreshModelName (char *infobuffer);
void refreshCreatureStatus (char *infobuffer);
void updateRightRef ();
void completeTask ();