diff --git a/rehlds/engine/host.cpp b/rehlds/engine/host.cpp index cd1a48a..816e2c9 100644 --- a/rehlds/engine/host.cpp +++ b/rehlds/engine/host.cpp @@ -1115,12 +1115,20 @@ void Host_Version(void) if (g_pcls.state != ca_dedicated) { Con_DPrintf("Protocol version %i\nExe version %s (%s)\n", PROTOCOL_VERSION, gpszVersionString, gpszProductString); +#ifdef REHLDS_FIXES + Con_DPrintf("Exe build: " __TIME__ " " __DATE__ " (%i)\n", build_number()); +#else Con_DPrintf("Exe build: 13:14:09 Aug 29 2013 (%i)\n", build_number()); +#endif // REHLDS_FIXES } else { Con_Printf("Protocol version %i\nExe version %s (%s)\n", PROTOCOL_VERSION, gpszVersionString, gpszProductString); +#ifdef REHLDS_FIXES + Con_Printf("Exe build: " __TIME__ " " __DATE__ " (%i)\n", build_number()); +#else Con_Printf("Exe build: 13:14:09 Aug 29 2013 (%i)\n", build_number()); +#endif // REHLDS_FIXES } } diff --git a/rehlds/engine/sv_main.cpp b/rehlds/engine/sv_main.cpp index 0bdefc7..3471c85 100644 --- a/rehlds/engine/sv_main.cpp +++ b/rehlds/engine/sv_main.cpp @@ -7059,8 +7059,9 @@ void SV_Init(void) Cvar_RegisterVariable(&sv_downloadurl); Cvar_RegisterVariable(&sv_version); Cvar_RegisterVariable(&sv_allow_dlfile); - - for (int i = 0; i < 512; i++) + Cvar_RegisterVariable(&sv_force_ent_intersection); + + for (int i = 0; i < ARRAYSIZE(localmodels); i++) { Q_snprintf(localmodels[i], 5u, "*%i", i); } diff --git a/rehlds/engine/unicode_strtools.cpp b/rehlds/engine/unicode_strtools.cpp index 8d9932d..f134f1c 100644 --- a/rehlds/engine/unicode_strtools.cpp +++ b/rehlds/engine/unicode_strtools.cpp @@ -114,10 +114,23 @@ decodeFinishedMaybeCESU8: goto decodeFinished; } +bool Q_iswprint(uchar16 c) +{ +#ifdef _WIN32 + return iswprint(c) != 0; +#else + // TODO: implement me + // check it out if it is unprintable characters + +#endif // _WIN32 + + return true; +} + int __cdecl Q_IsUnprintableW(uchar16 c) { #ifdef REHLDS_FIXES - if (!iswprint(c)) + if (!Q_iswprint(c)) return 1; #endif // REHLDS_FIXES diff --git a/rehlds/engine/world.cpp b/rehlds/engine/world.cpp index 4c771b3..3346736 100644 --- a/rehlds/engine/world.cpp +++ b/rehlds/engine/world.cpp @@ -36,6 +36,7 @@ beam_planes_t beam_planes; areanode_t sv_areanodes[32]; int sv_numareanodes; +cvar_t sv_force_ent_intersection = { "sv_force_ent_intersection", "0", 0, 0.0f, NULL }; /* ../engine/world.c:48 */ void ClearLink(link_t *l) @@ -1219,7 +1220,8 @@ void SV_ClipToLinks(areanode_t *node, moveclip_t *clip) && clip->boxmaxs[0] >= touch->v.absmin[0] && clip->boxmaxs[1] >= touch->v.absmin[1] && clip->boxmaxs[2] >= touch->v.absmin[2] - && (touch->v.solid == SOLID_SLIDEBOX || SV_CheckSphereIntersection(touch, clip->start, clip->end)) + && ((touch->v.solid == SOLID_SLIDEBOX && sv_force_ent_intersection.string[0] == '0') + || SV_CheckSphereIntersection(touch, clip->start, clip->end)) && (!clip->passedict || clip->passedict->v.size[0] == 0.0f || touch->v.size[0] != 0.0f)) { if (clip->trace.allsolid) diff --git a/rehlds/engine/world.h b/rehlds/engine/world.h index 0b5ed4a..9c04e79 100644 --- a/rehlds/engine/world.h +++ b/rehlds/engine/world.h @@ -87,6 +87,8 @@ extern box_planes_t box_planes; extern beam_planes_t beam_planes; extern areanode_t sv_areanodes[32]; extern int sv_numareanodes; + +extern cvar_t sv_force_ent_intersection; /* hull_t box_hull; hull_t beam_hull;