1
0
Fork 0
forked from fte/fteqw

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:
Spoike 2014-05-14 01:08:36 +00:00
parent 3711f71bdc
commit e693c6956b
4 changed files with 22 additions and 23 deletions

View file

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

View file

@ -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
@ -84,10 +84,6 @@ void Sys_SetThreadName(unsigned int dwThreadID, char *threadName)
__except(EXCEPTION_EXECUTE_HANDLER)
{
}
#ifdef CATCHCRASH
AddVectoredExceptionHandler(true, nonmsvc_CrashExceptionHandler);
#endif
}
#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;
}

View file

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

View file

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