mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-29 23:22:01 +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;
|
struct sockaddr_in from;
|
||||||
from.sin_family = AF_INET;
|
from.sin_family = AF_INET;
|
||||||
from.sin_port = port;
|
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);
|
SockadrToNetadr((struct sockaddr_qstorage*)&from, addresses);
|
||||||
|
|
||||||
*adrflags++ = 0;
|
*adrflags++ = 0;
|
||||||
|
|
|
@ -58,7 +58,7 @@ unsigned int WINAPI threadwrapper(void *args)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#if defined(_DEBUG) && defined(_MSC_VER)
|
||||||
const DWORD MS_VC_EXCEPTION=0x406D1388;
|
const DWORD MS_VC_EXCEPTION=0x406D1388;
|
||||||
#pragma pack(push,8)
|
#pragma pack(push,8)
|
||||||
typedef struct tagTHREADNAME_INFO
|
typedef struct tagTHREADNAME_INFO
|
||||||
|
@ -84,10 +84,6 @@ void Sys_SetThreadName(unsigned int dwThreadID, char *threadName)
|
||||||
__except(EXCEPTION_EXECUTE_HANDLER)
|
__except(EXCEPTION_EXECUTE_HANDLER)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CATCHCRASH
|
|
||||||
AddVectoredExceptionHandler(true, nonmsvc_CrashExceptionHandler);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -114,9 +110,12 @@ void *Sys_CreateThread(char *name, int (*func)(void *), void *args, int priority
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#if defined(_DEBUG) && defined(_MSC_VER)
|
||||||
Sys_SetThreadName(tid, name);
|
Sys_SetThreadName(tid, name);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CATCHCRASH
|
||||||
|
AddVectoredExceptionHandler(true, nonmsvc_CrashExceptionHandler);
|
||||||
|
#endif
|
||||||
|
|
||||||
return (void *)handle;
|
return (void *)handle;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4411,7 +4411,7 @@ TRACE(("LoadBrushModel %i\n", __LINE__));
|
||||||
|
|
||||||
mod->radius = RadiusFromBounds (mod->mins, mod->maxs);
|
mod->radius = RadiusFromBounds (mod->mins, mod->maxs);
|
||||||
|
|
||||||
mod->numleafs = bm->visleafs;
|
// mod->numleafs = bm->visleafs;
|
||||||
|
|
||||||
memset(&mod->batches, 0, sizeof(mod->batches));
|
memset(&mod->batches, 0, sizeof(mod->batches));
|
||||||
mod->vbos = NULL;
|
mod->vbos = NULL;
|
||||||
|
|
|
@ -818,15 +818,15 @@ void SV_MulticastProtExt(vec3_t origin, multicast_t to, int dimension_mask, int
|
||||||
{
|
{
|
||||||
vec3_t delta;
|
vec3_t delta;
|
||||||
VectorSubtract(origin, client->edict->v->origin, delta);
|
VectorSubtract(origin, client->edict->v->origin, delta);
|
||||||
if (Length(delta) <= 1024)
|
if (DotProduct(delta, delta) <= 1024*1024)
|
||||||
goto inrange;
|
goto inrange;
|
||||||
}
|
}
|
||||||
|
|
||||||
// -1 is because pvs rows are 1 based, not 0 based like leafs
|
if (mask != sv.pvs) //leaf 0 is the solid see-all region, so no point figuring out where the players are
|
||||||
if (mask != sv.pvs)
|
|
||||||
{
|
{
|
||||||
vec3_t pos;
|
vec3_t pos;
|
||||||
VectorAdd(client->edict->v->origin, client->edict->v->view_ofs, 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;
|
leafnum = sv.world.worldmodel->funcs.LeafnumForPoint (sv.world.worldmodel, pos)-1;
|
||||||
if ( !(mask[leafnum>>3] & (1<<(leafnum&7)) ) )
|
if ( !(mask[leafnum>>3] & (1<<(leafnum&7)) ) )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue