From 40c9a2fb82697ba3401f201465b826a109a12048 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sat, 2 Dec 2023 17:25:18 +0300 Subject: [PATCH] engine: make Mod_SampleSizeForFace accept const surface --- engine/common/mod_bmodel.c | 2 +- engine/common/mod_local.h | 2 +- engine/ref_api.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/common/mod_bmodel.c b/engine/common/mod_bmodel.c index 834f8420..2e7d95c6 100644 --- a/engine/common/mod_bmodel.c +++ b/engine/common/mod_bmodel.c @@ -980,7 +980,7 @@ Mod_SampleSizeForFace return the current lightmap resolution per face ================== */ -int Mod_SampleSizeForFace( msurface_t *surf ) +int Mod_SampleSizeForFace( const msurface_t *surf ) { if( !surf || !surf->texinfo ) return LM_SAMPLE_SIZE; diff --git a/engine/common/mod_local.h b/engine/common/mod_local.h index 80d8b580..ccf6e7f0 100644 --- a/engine/common/mod_local.h +++ b/engine/common/mod_local.h @@ -155,7 +155,7 @@ int Mod_CheckLump( const char *filename, const int lump, int *lumpsize ); int Mod_ReadLump( const char *filename, const int lump, void **lumpdata, int *lumpsize ); int Mod_SaveLump( const char *filename, const int lump, void *lumpdata, int lumpsize ); mleaf_t *Mod_PointInLeaf( const vec3_t p, mnode_t *node ); -int Mod_SampleSizeForFace( msurface_t *surf ); +int Mod_SampleSizeForFace( const msurface_t *surf ); byte *Mod_GetPVSForPoint( const vec3_t p ); void Mod_UnloadBrushModel( model_t *mod ); void Mod_PrintWorldStats_f( void ); diff --git a/engine/ref_api.h b/engine/ref_api.h index b4ac9461..a1cda649 100644 --- a/engine/ref_api.h +++ b/engine/ref_api.h @@ -307,7 +307,7 @@ typedef struct ref_api_s qboolean (*CL_AddVisibleEntity)( cl_entity_t *ent, int entityType ); // brushes - int (*Mod_SampleSizeForFace)( struct msurface_s *surf ); + int (*Mod_SampleSizeForFace)( const struct msurface_s *surf ); qboolean (*Mod_BoxVisible)( const vec3_t mins, const vec3_t maxs, const byte *visbits ); struct world_static_s *(*GetWorld)( void ); // returns &world mleaf_t *(*Mod_PointInLeaf)( const vec3_t p, mnode_t *node );