// lightmap is needed on this surface (rather than duplicating the
// logic above)
loadmodel->brushq1.lightmapupdateflags[surfacenum] = true;
+ loadmodel->lit = true;
}
}
dmodel_t *bm;
float dist, modelyawradius, modelradius;
msurface_t *surface;
- int numshadowmeshtriangles;
hullinfo_t hullinfo;
int totalstylesurfaces, totalstyles, stylecounts[256], remapstyles[256];
model_brush_lightstyleinfo_t styleinfo[256];
mod->numskins = 1;
// make a single combined shadow mesh to allow optimized shadow volume creation
- numshadowmeshtriangles = Mod_Q1BSP_CreateShadowMesh(loadmodel);
+ Mod_Q1BSP_CreateShadowMesh(loadmodel);
if (loadmodel->brush.numsubmodels)
loadmodel->brush.submodels = (dp_model_t **)Mem_Alloc(loadmodel->mempool, loadmodel->brush.numsubmodels * sizeof(dp_model_t *));
loadmodel->brushq3.data_color4f[i * 4 + 1] = in->color4ub[1] * (1.0f / 255.0f);
loadmodel->brushq3.data_color4f[i * 4 + 2] = in->color4ub[2] * (1.0f / 255.0f);
loadmodel->brushq3.data_color4f[i * 4 + 3] = in->color4ub[3] * (1.0f / 255.0f);
+ if(in->color4ub[0] != 255 || in->color4ub[1] != 255 || in->color4ub[2] != 255)
+ loadmodel->lit = true;
}
}
out->lightmaptexture = loadmodel->brushq3.data_lightmaps[n >> loadmodel->brushq3.num_lightmapmergedwidthheightdeluxepower];
if (loadmodel->brushq3.deluxemapping)
out->deluxemaptexture = loadmodel->brushq3.data_deluxemaps[n >> loadmodel->brushq3.num_lightmapmergedwidthheightdeluxepower];
+ loadmodel->lit = true;
}
}
if (VectorCompare(start, end))
Mod_CollisionBIH_TracePoint(model, frameblend, skeleton, trace, shiftstart, hitsupercontentsmask);
else
- {
Mod_CollisionBIH_TraceLine(model, frameblend, skeleton, trace, shiftstart, shiftend, hitsupercontentsmask);
- VectorSubtract(trace->endpos, boxmins, trace->endpos);
- }
return;
}
{
float segmentmins[3], segmentmaxs[3];
+ if (mod_q3bsp_optimizedtraceline.integer && VectorCompare(start->mins, start->maxs) && VectorCompare(end->mins, end->maxs))
+ {
+ if (VectorCompare(start->mins, end->mins))
+ Mod_CollisionBIH_TracePoint(model, frameblend, skeleton, trace, start->mins, hitsupercontentsmask);
+ else
+ Mod_CollisionBIH_TraceLine(model, frameblend, skeleton, trace, start->mins, end->mins, hitsupercontentsmask);
+ return;
+ }
+
// box trace, performed as brush trace
memset(trace, 0, sizeof(*trace));
trace->fraction = 1;
if (VectorCompare(start, end))
Mod_Q3BSP_TracePoint(model, frameblend, skeleton, trace, shiftstart, hitsupercontentsmask);
else
- {
Mod_Q3BSP_TraceLine(model, frameblend, skeleton, trace, shiftstart, shiftend, hitsupercontentsmask);
- VectorSubtract(trace->endpos, boxmins, trace->endpos);
- }
return;
}
msurface_t *surface;
q3mbrush_t *brush;
+ if (mod_q3bsp_optimizedtraceline.integer && VectorCompare(start->mins, start->maxs) && VectorCompare(end->mins, end->maxs))
+ {
+ if (VectorCompare(start->mins, end->mins))
+ Mod_Q3BSP_TracePoint(model, frameblend, skeleton, trace, start->mins, hitsupercontentsmask);
+ else
+ Mod_Q3BSP_TraceLine(model, frameblend, skeleton, trace, start->mins, end->mins, hitsupercontentsmask);
+ return;
+ }
+
// box trace, performed as brush trace
memset(trace, 0, sizeof(*trace));
trace->fraction = 1;
void Mod_Q3BSP_Load(dp_model_t *mod, void *buffer, void *bufferend)
{
- int i, j, numshadowmeshtriangles, lumps;
+ int i, j, lumps;
q3dheader_t *header;
float corner[3], yawradius, modelradius;
loadmodel->brush.supportwateralpha = true;
// make a single combined shadow mesh to allow optimized shadow volume creation
- numshadowmeshtriangles = Mod_Q1BSP_CreateShadowMesh(loadmodel);
+ Mod_Q1BSP_CreateShadowMesh(loadmodel);
loadmodel->brush.num_leafs = 0;
Mod_Q3BSP_RecursiveFindNumLeafs(loadmodel->brush.data_nodes);