fakequeries: fixed hooking problems on certain providers
linkage: added support for fake steam ids for bots controlled via yb_enable_fake_steamids) note that fake steam ids just used for give ability server owners to run statistics modules with tracking by steam ids ant not nicknames.
This commit is contained in:
parent
0f9e890509
commit
1dc1043f7d
5 changed files with 42 additions and 1 deletions
|
|
@ -534,6 +534,22 @@ CR_LINKAGE_C int GetEngineFunctions (enginefuncs_t *table, int *) {
|
|||
};
|
||||
}
|
||||
|
||||
table->pfnGetPlayerAuthId = [] (edict_t *e) -> const char * {
|
||||
if (bots[e]) {
|
||||
auto authid = util.getFakeSteamId (e);
|
||||
|
||||
if (game.is (GameFlags::Metamod)) {
|
||||
RETURN_META_VALUE (MRES_SUPERCEDE, authid.chars ());
|
||||
}
|
||||
return authid.chars ();
|
||||
}
|
||||
|
||||
if (game.is (GameFlags::Metamod)) {
|
||||
RETURN_META_VALUE (MRES_IGNORED, nullptr);
|
||||
}
|
||||
return engfuncs.pfnGetPlayerAuthId (e);
|
||||
};
|
||||
|
||||
table->pfnEmitSound = [] (edict_t *entity, int channel, const char *sample, float volume, float attenuation, int flags, int pitch) {
|
||||
// this function tells the engine that the entity pointed to by "entity", is emitting a sound
|
||||
// which fileName is "sample", at level "channel" (CHAN_VOICE, etc...), with "volume" as
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue