Skip to content

Commit

Permalink
fix for starting a new map
Browse files Browse the repository at this point in the history
  • Loading branch information
briancullinan2 committed Sep 11, 2024
1 parent e2f6326 commit e0e83ee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion code/renderer/tr_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void RE_LoadWorldMap( const char *name );
#ifdef USE_BSP_MODELS
#define MAX_WORLD_MODELS 64
int rwi = 0;
static world_t s_worldDatas[MAX_WORLD_MODELS];
world_t s_worldDatas[MAX_WORLD_MODELS];
#define s_worldData s_worldDatas[rwi]
#ifdef tr
#undef tr
Expand Down
9 changes: 9 additions & 0 deletions code/renderer/tr_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1904,6 +1904,11 @@ static void R_Register( void )

#define EPSILON 1e-6f


#ifdef USE_BSP_MODELS
extern world_t s_worldDatas[MAX_WORLD_MODELS];
#endif

/*
===============
R_Init
Expand All @@ -1918,6 +1923,10 @@ void R_Init( void ) {
ri.Printf( PRINT_ALL, "----- R_Init -----\n" );

// clear all our internal state
#ifdef USE_BSP_MODELS
Com_Memset( &trWorlds, 0, sizeof( trWorlds ) );
Com_Memset( &s_worldDatas, 0, sizeof( s_worldDatas ) );
#endif
#ifdef USE_MULTIVM_RENDERER
Com_Memset( &trWorlds, 0, sizeof( trWorlds ) );
Com_Memset( &backEnd, 0, sizeof( backEnd ) );
Expand Down

0 comments on commit e0e83ee

Please sign in to comment.