nav: fix double jumping when bot gets stuck

bot: restore bot difficulty levels (ref #729)
bot: probably fix freezetime accident shooting (ref #729)
build: use noexecstack when building library
refactor: rework some old code and remove unnecessary things
This commit is contained in:
jeefo 2025-09-01 23:20:36 +03:00
commit 95f907434b
No known key found for this signature in database
GPG key ID: D696786B81B667C8
26 changed files with 157 additions and 194 deletions

View file

@ -157,10 +157,23 @@ private:
int menuGraphPath (int item);
int menuCampDirections (int item);
int menuAutoPathDistance (int item);
int menuKickPage1 (int item);
int menuKickPage2 (int item);
int menuKickPage3 (int item);
int menuKickPage4 (int item);
int menuKickPage1 (int item) {
return menuKickPage (1, item);
}
int menuKickPage2 (int item) {
return menuKickPage (2, item);
}
int menuKickPage3 (int item) {
return menuKickPage (3, item);
}
int menuKickPage4 (int item) {
return menuKickPage (4, item);
}
int menuKickPage (int page, int item);
private:
void createMenus ();

View file

@ -77,9 +77,6 @@ public:
// bot fakeping manager
class BotFakePingManager final : public Singleton <BotFakePingManager> {
private:
mutable Mutex m_cs {};
private:
CountdownTimer m_recalcTime {};
PingBitMsg m_pbm {};

View file

@ -59,6 +59,8 @@ private:
edict_t *m_killerEntity {}; // killer entity for bots
BotTeamData m_teamData[kGameTeamNum] {}; // teams shared data
CountdownTimer m_holdQuotaManagementTimer {}; // prevent from running quota management for some time
protected:
BotCreateResult create (StringRef name, int difficulty, int personality, int team, int skin);

View file

@ -275,6 +275,10 @@ public:
return m_pathsCheckFailed;
}
void setPathsCheckFailed (const bool value) {
m_pathsCheckFailed = value;
}
public:
// do the pathfinding
bool find (int srcIndex, int destIndex, NodeAdderFn onAddedNode, int *pathDistance = nullptr);

View file

@ -124,7 +124,6 @@ public:
}
void setHighestDamageForTeam (int32_t team, int32_t value) {
MutexScopedLock lock (m_damageUpdateLock);
m_teamHighestDamage[team] = value;
}
};

View file

@ -58,7 +58,7 @@ public:
~Folders () = default;
public:
CTS_BUILD_STR bot { "yapb" };
CTS_BUILD_STR bot { product.nameLower };
CTS_BUILD_STR addons { "addons" };
CTS_BUILD_STR config { "conf" };
CTS_BUILD_STR data { "data" };

View file

@ -730,7 +730,6 @@ public:
Array <int32_t> m_goalHist {};
FrameDelay m_thinkTimer {};
FrameDelay m_fullThinkTimer {};
public:
Bot (edict_t *bot, int difficulty, int personality, int team, int skin);
@ -738,7 +737,6 @@ public:
public:
void logic (); /// the things that can be executed while skipping frames
void upkeep ();
void spawned ();
void takeBlind (int alpha);
void takeDamage (edict_t *inflictor, int damage, int armor, int bits);