void R_Q3BSP_DrawFace(entity_render_t *ent, q3mface_t *face)
{
rmeshstate_t m;
- if ((face->texture->renderflags & Q3MTEXTURERENDERFLAGS_NODRAW) || !face->numtriangles)
+ if (!face->numtriangles)
return;
+ if (face->texture->renderflags)
+ {
+ if (face->texture->renderflags & Q3MTEXTURERENDERFLAGS_SKY)
+ {
+ if (skyrendernow)
+ {
+ skyrendernow = false;
+ if (skyrendermasked)
+ R_Sky();
+ }
+
+ R_Mesh_Matrix(&ent->matrix);
+
+ GL_Color(fogcolor[0] * r_colorscale, fogcolor[1] * r_colorscale, fogcolor[2] * r_colorscale, 1);
+ if (skyrendermasked)
+ {
+ // depth-only (masking)
+ qglColorMask(0,0,0,0);
+ // just to make sure that braindead drivers don't draw anything
+ // despite that colormask...
+ GL_BlendFunc(GL_ZERO, GL_ONE);
+ }
+ else
+ {
+ // fog sky
+ GL_BlendFunc(GL_ONE, GL_ZERO);
+ }
+ GL_DepthMask(true);
+ GL_DepthTest(true);
+
+ memset(&m, 0, sizeof(m));
+ R_Mesh_State_Texture(&m);
+
+ GL_VertexPointer(face->data_vertex3f);
+ R_Mesh_Draw(face->numvertices, face->numtriangles, face->data_element3i);
+ qglColorMask(1,1,1,1);
+ return;
+ }
+ if (face->texture->renderflags & Q3MTEXTURERENDERFLAGS_NODRAW)
+ return;
+ }
+ R_Mesh_Matrix(&ent->matrix);
face->visframe = r_framecount;
memset(&m, 0, sizeof(m));
GL_BlendFunc(GL_ONE, GL_ZERO);
out->firstmarksurface = loadmodel->brushq1.marksurfaces + LittleShort(in->firstmarksurface);
out->nummarksurfaces = LittleShort(in->nummarksurfaces);
+ if (out->firstmarksurface < 0 || LittleShort(in->firstmarksurface) + out->nummarksurfaces > loadmodel->brushq1.nummarksurfaces)
+ {
+ Con_Printf("Mod_Q1BSP_LoadLeafs: invalid marksurface range %i:%i outside range %i:%i\n", out->firstmarksurface, out->firstmarksurface + out->nummarksurfaces, 0, loadmodel->brushq1.nummarksurfaces);
+ out->firstmarksurface = NULL;
+ out->nummarksurfaces = 0;
+ }
out->pvsdata = pvs;
+ memset(out->pvsdata, 0xFF, pvschainbytes);
pvs += pvschainbytes;
p = LittleLong(in->visofs);
if (p >= 0)
- Mod_Q1BSP_DecompressVis(loadmodel->brushq1.data_compressedpvs + p, loadmodel->brushq1.data_compressedpvs + loadmodel->brushq1.num_compressedpvs, out->pvsdata, out->pvsdata + pvschainbytes);
- else
- memset(out->pvsdata, 0xFF, pvschainbytes);
+ {
+ if (p >= loadmodel->brushq1.num_compressedpvs)
+ Con_Printf("Mod_Q1BSP_LoadLeafs: invalid visofs\n");
+ else
+ Mod_Q1BSP_DecompressVis(loadmodel->brushq1.data_compressedpvs + p, loadmodel->brushq1.data_compressedpvs + loadmodel->brushq1.num_compressedpvs, out->pvsdata, out->pvsdata + pvschainbytes);
+ }
for (j = 0;j < 4;j++)
out->ambient_sound_level[j] = in->ambient_level[j];
out->renderflags = 0;
if (!strcmp(out->name, "caulk") || !strcmp(out->name, "common/caulk") || !strcmp(out->name, "textures/common/caulk"))
out->renderflags |= Q3MTEXTURERENDERFLAGS_NODRAW;
+ if (!strncmp(out->name, "textures/skies/", 15))
+ out->renderflags |= Q3MTEXTURERENDERFLAGS_SKY;
out->number = i;
Mod_LoadSkinFrame(&out->skin, out->name, TEXF_MIPMAP | TEXF_ALPHA | TEXF_PRECACHE, false, true, true);
*/
#define Q3MTEXTURERENDERFLAGS_NODRAW 1
+#define Q3MTEXTURERENDERFLAGS_SKY 2
typedef struct q3mtexture_s
{
int skyboxelements[6*2*3] =
{
- // skyside[0]
- 8, 9, 10,
- 8, 10, 11,
+ // skyside[3]
+ 0, 1, 2,
+ 0, 2, 3,
// skyside[1]
4, 5, 6,
4, 6, 7,
+ // skyside[0]
+ 8, 9, 10,
+ 8, 10, 11,
// skyside[2]
12, 13, 14,
12, 14, 15,
- // skyside[3]
- 0, 1, 2,
- 0, 2, 3,
// skyside[4]
16, 17, 18,
16, 18, 19,
-n darkplaces: server is starting before the "port" cvar is set by commandline and scripts? (yummyluv)
-n darkplaces: typing ip in join game menu should show 'trying' and 'no response' after a while, or 'no network' if networking is not initialized (yummyluv)
-n dpmod: make grapple off-hand (joe hill)
+0 darkplaces: server should send sv_gravity to client somehow (Vermeulen)
+0 darkplaces: server should send slowmo to client somehow (Vermeulen)
0 darkplaces: make a getattachmentvectors qc builtin (Supajoe)
0 darkplaces: add _reflect textures which filter use of skybox as a cubemap reflection (FrikaC)
0 darkplaces: ability to disable fopen builtin access to read /, read data/, write data/, or disable fopen builtin entirely