bot: refactor and clean up old code

fix: crash when saving old format pwf on hlds
bot: moved sdk headers to separate submodule
nav: improved unstuck and avoidance (thanks @commandcobra7) code
bot: use correct path slashes depending on platform for all data
cfg: removed simplified chines' translation, as it's too outdated
This commit is contained in:
jeefo 2023-05-12 20:00:06 +03:00
commit 7b58d51973
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
42 changed files with 365 additions and 3805 deletions

View file

@ -90,7 +90,7 @@ public:
private:
const char *allocStr (const char *str) const {
return STRING (engfuncs.pfnAllocString (str));
return string_t::from (engfuncs.pfnAllocString (str));
}
public:
@ -159,7 +159,7 @@ public:
void testModel (const Vector &start, const Vector &end, int hullNumber, edict_t *entToHit, TraceResult *ptr);
// trace line with channel, but allows us to store last traceline bot has fired, saving us some cpu cycles
bool testLineChannel (TraceChannel channel, const Vector &start, const Vector &end, int ignoreFlags, edict_t *ignoreEntity, TraceResult &result);
//bool testLineChannel (TraceChannel channel, const Vector &start, const Vector &end, int ignoreFlags, edict_t *ignoreEntity, TraceResult &result);
// test line
void testHull (const Vector &start, const Vector &end, int ignoreFlags, int hullNumber, edict_t *ignoreEntity, TraceResult *ptr);
@ -389,7 +389,7 @@ public:
// prints center message to specified player
template <typename ...Args> void clientPrint (edict_t *ent, const char *fmt, Args &&...args) {
if (isNullEntity (ent)) {
if (isNullEntity (ent) || ent == getLocalEntity ()) {
print (fmt, cr::forward <Args> (args)...);
return;
}
@ -398,7 +398,7 @@ public:
// prints message to client console
template <typename ...Args> void centerPrint (edict_t *ent, const char *fmt, Args &&...args) {
if (isNullEntity (ent)) {
if (isNullEntity (ent) || ent == getLocalEntity ()) {
print (fmt, cr::forward <Args> (args)...);
return;
}
@ -407,7 +407,7 @@ public:
};
// simplify access for console variables
class ConVar final : public DenyCopying {
class ConVar final : public NonCopyable {
public:
cvar_t *ptr;