mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-03-10 20:11:42 +00:00
Try to fix some connectivity issues.
This commit is contained in:
parent
d884d2c27f
commit
154e848d32
6 changed files with 28 additions and 14 deletions
|
@ -2073,12 +2073,15 @@ static void CL_ParsePrecache(void)
|
||||||
case 0: //models
|
case 0: //models
|
||||||
if (index < MAX_MODELS)
|
if (index < MAX_MODELS)
|
||||||
{
|
{
|
||||||
cl.model_precache[index] = Mod_ForName (name, false);
|
q_strlcpy (cl.model_name[index], name, MAX_QPATH);
|
||||||
//FIXME: if its a bsp model, generate lightmaps.
|
Mod_TouchModel (name);
|
||||||
//FIXME: update static entities with that modelindex
|
if (!cl.sendprespawn)
|
||||||
|
{
|
||||||
if (cl.model_precache[index])
|
cl.model_precache[index] = Mod_ForName (name, (index==1)?true:false);
|
||||||
GL_BuildModel(cl.model_precache[index]);
|
//FIXME: update static entities with that modelindex
|
||||||
|
if (cl.model_precache[index] && cl.model_precache[index]->type == mod_brush)
|
||||||
|
lightmaps_latecached=true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#ifdef PSET_SCRIPT
|
#ifdef PSET_SCRIPT
|
||||||
|
@ -2241,14 +2244,12 @@ static void CL_ParseStatString(int stat, const char *str)
|
||||||
//proquake has its own extension coding thing.
|
//proquake has its own extension coding thing.
|
||||||
static void CL_ParseStuffText(const char *msg)
|
static void CL_ParseStuffText(const char *msg)
|
||||||
{
|
{
|
||||||
const char *str;
|
char *str;
|
||||||
q_strlcat(cl.stuffcmdbuf, msg, sizeof(cl.stuffcmdbuf));
|
q_strlcat(cl.stuffcmdbuf, msg, sizeof(cl.stuffcmdbuf));
|
||||||
for (; (str = strchr(cl.stuffcmdbuf, '\n')); memmove(cl.stuffcmdbuf, str, Q_strlen(str)+1))
|
for (; (str = strchr(cl.stuffcmdbuf, '\n')); memmove(cl.stuffcmdbuf, str, Q_strlen(str)+1))
|
||||||
{
|
{
|
||||||
qboolean handled = false;
|
qboolean handled = false;
|
||||||
|
|
||||||
str++;//skip past the \n
|
|
||||||
|
|
||||||
if (*cl.stuffcmdbuf == 0x01 && cl.protocol == PROTOCOL_NETQUAKE) //proquake message, just strip this and try again (doesn't necessarily have a trailing \n straight away)
|
if (*cl.stuffcmdbuf == 0x01 && cl.protocol == PROTOCOL_NETQUAKE) //proquake message, just strip this and try again (doesn't necessarily have a trailing \n straight away)
|
||||||
{
|
{
|
||||||
for (str = cl.stuffcmdbuf+1; *str >= 0x01 && *str <= 0x1f; str++)
|
for (str = cl.stuffcmdbuf+1; *str >= 0x01 && *str <= 0x1f; str++)
|
||||||
|
@ -2256,6 +2257,8 @@ static void CL_ParseStuffText(const char *msg)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*str++ = 0;//skip past the \n
|
||||||
|
|
||||||
//handle special commands
|
//handle special commands
|
||||||
if (cl.stuffcmdbuf[0] == '/' && cl.stuffcmdbuf[1] == '/')
|
if (cl.stuffcmdbuf[0] == '/' && cl.stuffcmdbuf[1] == '/')
|
||||||
{
|
{
|
||||||
|
@ -2282,7 +2285,10 @@ static void CL_ParseStuffText(const char *msg)
|
||||||
|
|
||||||
//let the server exec general user commands (massive security hole)
|
//let the server exec general user commands (massive security hole)
|
||||||
if (!handled)
|
if (!handled)
|
||||||
|
{
|
||||||
Cbuf_AddTextLen(cl.stuffcmdbuf, str-cl.stuffcmdbuf);
|
Cbuf_AddTextLen(cl.stuffcmdbuf, str-cl.stuffcmdbuf);
|
||||||
|
Cbuf_AddTextLen("\n", 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1159,6 +1159,14 @@ void R_RenderView (void)
|
||||||
else if (gl_finish.value)
|
else if (gl_finish.value)
|
||||||
glFinish ();
|
glFinish ();
|
||||||
|
|
||||||
|
if (lightmaps_latecached)
|
||||||
|
{
|
||||||
|
GL_BuildLightmaps ();
|
||||||
|
GL_BuildBModelVertexBuffer ();
|
||||||
|
lightmaps_latecached=false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//Spike -- quickly draw the world from the skyroom camera's point of view.
|
//Spike -- quickly draw the world from the skyroom camera's point of view.
|
||||||
skyroom_drawn = false;
|
skyroom_drawn = false;
|
||||||
if (r_refdef.drawworld && skyroom_enabled && skyroom_visible)
|
if (r_refdef.drawworld && skyroom_enabled && skyroom_visible)
|
||||||
|
|
|
@ -326,6 +326,7 @@ extern overflowtimes_t dev_overflows; //this stores the last time overflow messa
|
||||||
|
|
||||||
//johnfitz -- moved here from r_brush.c
|
//johnfitz -- moved here from r_brush.c
|
||||||
extern int gl_lightmap_format, lightmap_bytes;
|
extern int gl_lightmap_format, lightmap_bytes;
|
||||||
|
extern qboolean lightmaps_latecached; //we need to rebuild lightmaps and model vbos before rendering.
|
||||||
|
|
||||||
#define LMBLOCK_WIDTH 256 //FIXME: make dynamic. if we have a decent card there's no real reason not to use 4k or 16k (assuming there's no lightstyles/dynamics that need uploading...)
|
#define LMBLOCK_WIDTH 256 //FIXME: make dynamic. if we have a decent card there's no real reason not to use 4k or 16k (assuming there's no lightstyles/dynamics that need uploading...)
|
||||||
#define LMBLOCK_HEIGHT 256 //Alternatively, use texture arrays, which would avoid the need to switch textures as often.
|
#define LMBLOCK_HEIGHT 256 //Alternatively, use texture arrays, which would avoid the need to switch textures as often.
|
||||||
|
|
|
@ -571,6 +571,8 @@ int Datagram_GetMessage (qsocket_t *sock)
|
||||||
}
|
}
|
||||||
|
|
||||||
length = BigLong(packetBuffer.length);
|
length = BigLong(packetBuffer.length);
|
||||||
|
if (length == 0xffffffff)
|
||||||
|
continue; //some kind of lingering QW or DP response?
|
||||||
flags = length & (~NETFLAG_LENGTH_MASK);
|
flags = length & (~NETFLAG_LENGTH_MASK);
|
||||||
length &= NETFLAG_LENGTH_MASK;
|
length &= NETFLAG_LENGTH_MASK;
|
||||||
|
|
||||||
|
|
|
@ -1998,8 +1998,8 @@ int CL_Precache_Model(const char *name)
|
||||||
{
|
{
|
||||||
strcpy(cl.model_name_csqc[i], name);
|
strcpy(cl.model_name_csqc[i], name);
|
||||||
cl.model_precache_csqc[i] = Mod_ForName (name, false);
|
cl.model_precache_csqc[i] = Mod_ForName (name, false);
|
||||||
if (cl.model_precache_csqc[i])
|
if (cl.model_precache_csqc[i] && cl.model_precache_csqc[i]->type == mod_brush)
|
||||||
GL_BuildModel(cl.model_precache_csqc[i]);
|
lightmaps_latecached=true;
|
||||||
return -i;
|
return -i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -900,9 +900,6 @@ void GL_BuildModel (qmodel_t *m)
|
||||||
//johnfitz
|
//johnfitz
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m->type == mod_brush)
|
|
||||||
lightmaps_latecached=true;
|
|
||||||
|
|
||||||
// GL_BuildBModelVertexBuffer();
|
// GL_BuildBModelVertexBuffer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue