refactor: use xash3d physics interface to handle with linkents, so do not hook dlopen/dlsym while running under xash3d

add: force set sv_forcesimulating to 1 while running under xash3d
This commit is contained in:
dmitry 2021-09-30 16:37:40 +03:00
commit 3205e1253f
No known key found for this signature in database
GPG key ID: 8297CE728B7A7E37
10 changed files with 256 additions and 42 deletions

View file

@ -442,7 +442,7 @@ public:
}
void set (const char *val) {
engfuncs.pfnCvar_DirectSet (ptr, const_cast <char *> (val));
engfuncs.pfnCvar_DirectSet (ptr, val);
}
};
@ -635,11 +635,6 @@ public:
}
};
// for android
#if defined (CR_ARCH_ARM)
extern "C" void player (entvars_t *);
#endif
class EntityLinkage : public Singleton <EntityLinkage> {
private:
#if defined (CR_WINDOWS)
@ -680,13 +675,7 @@ public:
}
public:
void callPlayerFunction (edict_t *ent) {
#if defined (CR_ARCH_ARM)
player (&ent->v);
#else
reinterpret_cast <EntityFunction> (lookup (Game::instance ().lib ().handle (), "player")) (&ent->v);
#endif
}
void callPlayerFunction (edict_t *ent);
public:
void enable () {