mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 14:42:13 +00:00
hopefully that won't break anything too much...
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4656 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
3711f71bdc
commit
e693c6956b
4 changed files with 22 additions and 23 deletions
|
@ -2194,7 +2194,7 @@ int FTENET_GetLocalAddress(int port, qboolean ipx, qboolean ipv4, qboolean ipv6,
|
|||
struct sockaddr_in from;
|
||||
from.sin_family = AF_INET;
|
||||
from.sin_port = port;
|
||||
memcpy(&from.sin_addr, h->h_addr_list[b], sizeof(&from.sin_addr));
|
||||
memcpy(&from.sin_addr, h->h_addr_list[b], sizeof(from.sin_addr));
|
||||
SockadrToNetadr((struct sockaddr_qstorage*)&from, addresses);
|
||||
|
||||
*adrflags++ = 0;
|
||||
|
|
|
@ -58,7 +58,7 @@ unsigned int WINAPI threadwrapper(void *args)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
#if defined(_DEBUG) && defined(_MSC_VER)
|
||||
const DWORD MS_VC_EXCEPTION=0x406D1388;
|
||||
#pragma pack(push,8)
|
||||
typedef struct tagTHREADNAME_INFO
|
||||
|
@ -71,23 +71,19 @@ typedef struct tagTHREADNAME_INFO
|
|||
#pragma pack(pop)
|
||||
void Sys_SetThreadName(unsigned int dwThreadID, char *threadName)
|
||||
{
|
||||
THREADNAME_INFO info;
|
||||
info.dwType = 0x1000;
|
||||
info.szName = threadName;
|
||||
info.dwThreadID = dwThreadID;
|
||||
info.dwFlags = 0;
|
||||
THREADNAME_INFO info;
|
||||
info.dwType = 0x1000;
|
||||
info.szName = threadName;
|
||||
info.dwThreadID = dwThreadID;
|
||||
info.dwFlags = 0;
|
||||
|
||||
__try
|
||||
{
|
||||
RaiseException( MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(ULONG_PTR), (ULONG_PTR*)&info );
|
||||
}
|
||||
__except(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef CATCHCRASH
|
||||
AddVectoredExceptionHandler(true, nonmsvc_CrashExceptionHandler);
|
||||
#endif
|
||||
__try
|
||||
{
|
||||
RaiseException( MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(ULONG_PTR), (ULONG_PTR*)&info );
|
||||
}
|
||||
__except(EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -114,9 +110,12 @@ void *Sys_CreateThread(char *name, int (*func)(void *), void *args, int priority
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef _DEBUG
|
||||
#if defined(_DEBUG) && defined(_MSC_VER)
|
||||
Sys_SetThreadName(tid, name);
|
||||
#endif
|
||||
#ifdef CATCHCRASH
|
||||
AddVectoredExceptionHandler(true, nonmsvc_CrashExceptionHandler);
|
||||
#endif
|
||||
|
||||
return (void *)handle;
|
||||
}
|
||||
|
|
|
@ -4411,7 +4411,7 @@ TRACE(("LoadBrushModel %i\n", __LINE__));
|
|||
|
||||
mod->radius = RadiusFromBounds (mod->mins, mod->maxs);
|
||||
|
||||
mod->numleafs = bm->visleafs;
|
||||
// mod->numleafs = bm->visleafs;
|
||||
|
||||
memset(&mod->batches, 0, sizeof(mod->batches));
|
||||
mod->vbos = NULL;
|
||||
|
|
|
@ -818,15 +818,15 @@ void SV_MulticastProtExt(vec3_t origin, multicast_t to, int dimension_mask, int
|
|||
{
|
||||
vec3_t delta;
|
||||
VectorSubtract(origin, client->edict->v->origin, delta);
|
||||
if (Length(delta) <= 1024)
|
||||
if (DotProduct(delta, delta) <= 1024*1024)
|
||||
goto inrange;
|
||||
}
|
||||
|
||||
// -1 is because pvs rows are 1 based, not 0 based like leafs
|
||||
if (mask != sv.pvs)
|
||||
if (mask != sv.pvs) //leaf 0 is the solid see-all region, so no point figuring out where the players are
|
||||
{
|
||||
vec3_t pos;
|
||||
VectorAdd(client->edict->v->origin, client->edict->v->view_ofs, pos);
|
||||
// -1 is because pvs rows are 1 based, not 0 based like leafs
|
||||
leafnum = sv.world.worldmodel->funcs.LeafnumForPoint (sv.world.worldmodel, pos)-1;
|
||||
if ( !(mask[leafnum>>3] & (1<<(leafnum&7)) ) )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue