fix: startup on hlds_l 3111e (still needs nosmid)
build: add option to build bot without any smid instructions refactor: fix static analyzer warnings crlib: update submodule (fix double anglevectors call)
This commit is contained in:
parent
3d84b96534
commit
c7c5e0eaf9
14 changed files with 92 additions and 70 deletions
|
|
@ -530,17 +530,6 @@ CR_LINKAGE_C int GetEngineFunctions (enginefuncs_t *table, int *) {
|
|||
};
|
||||
}
|
||||
|
||||
table->pfnLightStyle = [] (int style, char *val) {
|
||||
// this function update lightstyle for the bots
|
||||
|
||||
illum.updateLight (style, val);
|
||||
|
||||
if (game.is (GameFlags::Metamod)) {
|
||||
RETURN_META (MRES_IGNORED);
|
||||
}
|
||||
engfuncs.pfnLightStyle (style, val);
|
||||
};
|
||||
|
||||
if (game.is (GameFlags::Legacy)) {
|
||||
table->pfnFindEntityByString = [] (edict_t *edictStartSearchAfter, const char *field, const char *value) {
|
||||
// round starts in counter-strike 1.5
|
||||
|
|
@ -555,21 +544,34 @@ 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::Legacy)) {
|
||||
table->pfnLightStyle = [] (int style, char *val) {
|
||||
// this function update lightstyle for the bots
|
||||
|
||||
illum.updateLight (style, val);
|
||||
|
||||
if (game.is (GameFlags::Metamod)) {
|
||||
RETURN_META_VALUE (MRES_SUPERCEDE, authid.chars ());
|
||||
RETURN_META (MRES_IGNORED);
|
||||
}
|
||||
return authid.chars ();
|
||||
}
|
||||
engfuncs.pfnLightStyle (style, val);
|
||||
};
|
||||
|
||||
if (game.is (GameFlags::Metamod)) {
|
||||
RETURN_META_VALUE (MRES_IGNORED, nullptr);
|
||||
}
|
||||
return engfuncs.pfnGetPlayerAuthId (e);
|
||||
};
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue