2
0
mirror of https://github.com/rehlds/rehlds.git synced 2025-01-01 01:25:38 +03:00

Changed version in Host_Version at rehlds_fixes

Added Q_iswprint
Added cvar sv_force_ent_intersection for to bypass condition check with SOILID_SLIDEBOX and forced call SV_CheckSphereIntersection
This commit is contained in:
s1lentq 2015-10-17 05:35:42 +06:00
parent c62f8a982c
commit 55c9a80cde
5 changed files with 30 additions and 4 deletions

View File

@ -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
}
}

View File

@ -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);
}

View File

@ -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

View File

@ -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 };
/* <ca50b> ../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)

View File

@ -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;