From f664c42776f88d56930043ef673e605e63032968 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sat, 17 Jul 2021 15:11:20 +0000 Subject: [PATCH] Try to boost compat with shanjaq's uhexen2 fork. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5974 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/server/pr_cmds.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/engine/server/pr_cmds.c b/engine/server/pr_cmds.c index 5009ba2c5..0a285e125 100644 --- a/engine/server/pr_cmds.c +++ b/engine/server/pr_cmds.c @@ -8871,6 +8871,13 @@ static void QCBUILTIN PF_h2getstring(pubprogfuncs_t *prinst, struct globalvars_s char *s = T_GetString(G_FLOAT(OFS_PARM0)-1); RETURN_PSTRING(s); } + +void QCBUILTIN PF_sj_strhash (pubprogfuncs_t *prinst, struct globalvars_s *pr_globals) +{ //not quite the same, but oh well + const char *str = PF_VarString(prinst, 0, pr_globals); + int len = strlen(str); + G_FLOAT(OFS_RETURN) = Com_BlockChecksum(str, len); +} #endif static void QCBUILTIN PF_StopSound(pubprogfuncs_t *prinst, struct globalvars_s *pr_globals) { @@ -11082,9 +11089,9 @@ static BuiltinList_t BuiltinList[] = { //nq qw h2 ebfs {"stopsound", PF_StopSound, 0, 0, 106, 0, D("void(entity ent, float channel)", "Terminates playback of sounds on the specified entity-channel. CHAN_AUTO should not be used.")}, //shanjaq's fork of uhexen2... listed here to avoid confusion with other builtins. - {"set_extra_flags", PF_Fixme, 0, 0, 107, 0, "void(string model, float flags)"}, - {"set_fx_color", PF_Fixme, 0, 0, 108, 0, "void(string model,float r,float g,float b,float a)"}, - {"strhash", PF_Fixme, 0, 0, 109, 0, "float(string)"}, + {"set_extra_flags", PF_Ignore, 0, 0, 107, 0, D("void(string model, float flags)", "You should probably use .traileffectnum/r_effect instead."), true}, + {"set_fx_color", PF_Ignore, 0, 0, 108, 0, D("void(string model,float r,float g,float b,float a)", "You should probably use .traileffectnum/r_effect instead and/or .glowmod and/or tenebrae_gfx_dlights."), true}, + {"strhash", PF_sj_strhash, 0, 0, 109, 0, D("float(string)", "A poor-man's strzone, apparently. digest_hex should be used instead of you care about the hash function used."), true}, {"precache_model5", PF_precache_model, 0, 0, 116, 0},//please don't use... {"precache_sound5", PF_precache_sound, 0, 0, 117, 0},