commit b886cdbdec307a570819df086f7f65e0aec8f7f3 parent 70dcefe2f9d3da21e3f969ae5b352636b12b5985 Author: Michael Savage <mikejsavage@gmail.com> Date: Fri Dec 30 12:46:17 +0200 MSVC warning Diffstat:
bsp.cc | | | 2 | ++ |
bsp.h | | | 2 | +- |
diff --git a/bsp.cc b/bsp.cc @@ -1,3 +1,4 @@ +#include <stddef.h> #include <math.h> #include "game.h" @@ -119,6 +120,7 @@ void BSP::load_vis() { const BSP_HeaderLump & hl = header->lumps[ LUMP_VISIBILITY ]; vis = reinterpret_cast< BSP_Vis * >( contents + hl.off ); + vis->pvs = ( u8 * ) vis + offsetof( BSP_Vis, pvs ); ASSERT( hl.len == 2 * sizeof( u32 ) + vis->num_clusters * vis->cluster_size ); diff --git a/bsp.h b/bsp.h @@ -134,7 +134,7 @@ struct BSP_Vis { u32 num_clusters; u32 cluster_size; - u8 pvs[]; + u8 * pvs; }; // LUMP_LIGHTARRAY