Incorrect surf_styles param size for LightPlane.
Most callee's already used MAXCPULIGHTMAPS as size, which the function expects.
This commit is contained in:
parent
435a020cb8
commit
771500d9f8
2 changed files with 2 additions and 2 deletions
|
@ -582,7 +582,7 @@ void Mod_SubmodelLoaded(struct model_s *mod, int state);
|
|||
#ifdef RUNTIMELIGHTING
|
||||
struct relight_ctx_s;
|
||||
struct llightinfo_s;
|
||||
void LightPlane (struct relight_ctx_s *ctx, struct llightinfo_s *threadctx, lightstyleindex_t surf_styles[4], unsigned int *surf_expsamples, qbyte *surf_rgbsamples, qbyte *surf_deluxesamples, vec4_t surf_plane, vec4_t surf_texplanes[2], vec2_t exactmins, vec2_t exactmaxs, int texmins[2], int texsize[2], float lmscale); //special version that doesn't know what a face is or anything.
|
||||
void LightPlane (struct relight_ctx_s *ctx, struct llightinfo_s *threadctx, lightstyleindex_t surf_styles[MAXCPULIGHTMAPS], unsigned int *surf_expsamples, qbyte *surf_rgbsamples, qbyte *surf_deluxesamples, vec4_t surf_plane, vec4_t surf_texplanes[2], vec2_t exactmins, vec2_t exactmaxs, int texmins[2], int texsize[2], float lmscale); //special version that doesn't know what a face is or anything.
|
||||
struct relight_ctx_s *LightStartup(struct relight_ctx_s *ctx, struct model_s *model, qboolean shadows, qboolean skiplit);
|
||||
void LightReloadEntities(struct relight_ctx_s *ctx, const char *entstring, qboolean ignorestyles);
|
||||
void LightShutdown(struct relight_ctx_s *ctx);
|
||||
|
|
|
@ -5738,7 +5738,7 @@ void Terr_Brush_Draw(heightmap_t *hm, batch_t **batches, entity_t *e)
|
|||
{
|
||||
if (br->faces[j].relight && dorelight)
|
||||
{
|
||||
lightstyleindex_t styles[4] = {0,INVALID_LIGHTSTYLE,INVALID_LIGHTSTYLE,INVALID_LIGHTSTYLE};
|
||||
lightstyleindex_t styles[max(2,MAXCPULIGHTMAPS)] = {0,INVALID_LIGHTSTYLE};
|
||||
int texsize[2] = {br->faces[j].lmextents[0]-1, br->faces[j].lmextents[1]-1};
|
||||
vec2_t exactmins, exactmaxs;
|
||||
int m, k;
|
||||
|
|
Loading…
Reference in a new issue