mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 20:11:44 +00:00
fix some bugs.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5185 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
3f391a719a
commit
0b3a11335a
4 changed files with 33 additions and 43 deletions
|
@ -942,6 +942,13 @@ void CL_CheckForResend (void)
|
|||
|
||||
SVC_DirectConnect();
|
||||
}
|
||||
else if (1)
|
||||
{
|
||||
net_from = connectinfo.adr;
|
||||
Q_snprintfz(net_message.data, net_message.maxsize, "xxxxconnect\\protocol\\darkplaces 3\\protocols\\DP7 DP6 DP5 RMQ FITZ NEHAHRABJP2 NEHAHRABJP NEHAHRABJP3 QUAKE\\challenge\\0x%x\\name\\%s", SV_NewChallenge(), name.string);
|
||||
Cmd_TokenizeString (net_message.data+4, false, false);
|
||||
SVC_DirectConnect();
|
||||
}
|
||||
else
|
||||
CL_ConnectToDarkPlaces("", &connectinfo.adr);
|
||||
// connectinfo.trying = false;
|
||||
|
|
|
@ -2973,14 +2973,17 @@ static const char *If_Token_Term(const char *func, const char **end)
|
|||
{
|
||||
level--;
|
||||
if (!level)
|
||||
{
|
||||
s2++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (*s2 == '(')
|
||||
level++;
|
||||
s2++;
|
||||
}
|
||||
func = If_Token(s, end, IF_PRI_MAX);
|
||||
*end = s2+1;
|
||||
*end = s2;
|
||||
s = *end;
|
||||
s2 = func;
|
||||
}
|
||||
|
|
|
@ -2054,6 +2054,8 @@ static void Q1BSP_ClustersInSphere_Union(mleaf_t *firstleaf, vec3_t center, floa
|
|||
if (node->contents < 0)
|
||||
{ //leaf! mark/merge it.
|
||||
size_t c = (mleaf_t *)node - firstleaf;
|
||||
if (c == -1)
|
||||
return;
|
||||
if (unionwith)
|
||||
out[c>>3] |= (1<<(c&7)) & unionwith[c>>3];
|
||||
else
|
||||
|
@ -2097,7 +2099,7 @@ static qbyte *Q1BSP_ClustersInSphere(model_t *mod, vec3_t center, float radius,
|
|||
if (pvsbuffer->buffersize < mod->pvsbytes)
|
||||
pvsbuffer->buffer = BZ_Realloc(pvsbuffer->buffer, pvsbuffer->buffersize=mod->pvsbytes);
|
||||
Q_memset (pvsbuffer->buffer, 0, mod->pvsbytes);
|
||||
Q1BSP_ClustersInSphere_Union(mod->leafs-1, center, radius, mod->nodes, pvsbuffer->buffer, NULL);//unionwith);
|
||||
Q1BSP_ClustersInSphere_Union(mod->leafs+1, center, radius, mod->nodes, pvsbuffer->buffer, NULL);//unionwith);
|
||||
return pvsbuffer->buffer;
|
||||
}
|
||||
|
||||
|
|
|
@ -1998,47 +1998,6 @@ struct font_s *Font_LoadFont(float vheight, const char *fontfilename)
|
|||
if (f->singletexture->status == TEX_LOADING)
|
||||
COM_WorkerPartialSync(f->singletexture, &f->singletexture->status, TEX_LOADING);
|
||||
}
|
||||
|
||||
//halflife fonts are awkward. 256 chars are placed horizontally, and are 2 chars narrower than the height.
|
||||
//FIXME: we ought to reprocess the image, for old gpus to avoid downscaling...
|
||||
/*if (f->singletexture && f->singletexture->status == TEX_LOADED && f->singletexture->width == (f->singletexture->height-2) * 256)
|
||||
{
|
||||
f->txwidth = f->singletexture->width;
|
||||
f->txheight = f->singletexture->height;
|
||||
for ( ; i < 256; i++)
|
||||
{
|
||||
c = Font_GetCharStore(f, i);
|
||||
|
||||
c->advance = f->charheight;
|
||||
c->bmh = f->singletexture->height;
|
||||
c->bmw = f->singletexture->height-2;
|
||||
c->bmx = i*(f->singletexture->height-2);
|
||||
c->bmy = 0;
|
||||
c->left = 0;
|
||||
c->top = 0;
|
||||
c->nextchar = 0; //these chars are not linked in
|
||||
c->texplane = BITMAPPLANE;
|
||||
}
|
||||
return f; //fixme: no 0xe0XX range
|
||||
}
|
||||
else*/
|
||||
{
|
||||
/*force it to load, even if there's nothing there*/
|
||||
for (i = ((fmt==FMT_QUAKE)?32:0); i < ((fmt==FMT_QUAKE)?128:256); i++)
|
||||
{
|
||||
c = Font_GetCharStore(f, i);
|
||||
|
||||
c->advance = f->charheight;
|
||||
c->bmh = PLANEWIDTH/16;
|
||||
c->bmw = PLANEWIDTH/16;
|
||||
c->bmx = (i&15)*(PLANEWIDTH/16);
|
||||
c->bmy = (i/16)*(PLANEWIDTH/16);
|
||||
c->left = 0;
|
||||
c->top = 0;
|
||||
c->nextchar = 0; //these chars are not linked in
|
||||
c->texplane = BITMAPPLANE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
defaultplane = INVALIDPLANE;/*assume the bitmap plane - don't use the fallback as people don't think to use com_parseutf8*/
|
||||
|
@ -2072,6 +2031,25 @@ struct font_s *Font_LoadFont(float vheight, const char *fontfilename)
|
|||
|
||||
if (defaultplane != INVALIDPLANE)
|
||||
{
|
||||
if (!f->faces)
|
||||
{
|
||||
/*force it to load, even if there's nothing there*/
|
||||
for (i = ((fmt==FMT_QUAKE)?32:0); i < ((fmt==FMT_QUAKE)?128:256); i++)
|
||||
{
|
||||
c = Font_GetCharStore(f, i);
|
||||
|
||||
c->advance = f->charheight;
|
||||
c->bmh = PLANEWIDTH/16;
|
||||
c->bmw = PLANEWIDTH/16;
|
||||
c->bmx = (i&15)*(PLANEWIDTH/16);
|
||||
c->bmy = (i/16)*(PLANEWIDTH/16);
|
||||
c->left = 0;
|
||||
c->top = 0;
|
||||
c->nextchar = 0; //these chars are not linked in
|
||||
c->texplane = defaultplane;
|
||||
}
|
||||
}
|
||||
|
||||
/*pack the default chars into it*/
|
||||
for (i = 0xe000; i <= 0xe0ff; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue