Skip to content

Commit d7b6af1

Browse files
committed
-Reducing memory footprint of client bot
1 parent 7f0781d commit d7b6af1

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

src/parsec/e_loader.cpp

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,8 @@ void LoadObjectData()
12161216
void LoadData( char *cfn, int dispinfo )
12171217
{
12181218
ASSERT( cfn != NULL );
1219-
1219+
extern int headless_bot;
1220+
12201221
ctrl_file_name = cfn;
12211222
display_info = FALSE; //dispinfo;
12221223

@@ -1227,12 +1228,14 @@ void LoadData( char *cfn, int dispinfo )
12271228
// just be irritating.
12281229

12291230
ParseCtrlFile( PARSE_EVERYTHING );
1230-
1231-
ReadPalettes();
1232-
ReadTextures();
1233-
ReadSamples();
1231+
if(!headless_bot){
1232+
ReadPalettes();
1233+
ReadTextures();
1234+
ReadSamples();
1235+
ReadBitmapsAndCharsets();
1236+
}
12341237
LoadObjectData();
1235-
ReadBitmapsAndCharsets();
1238+
12361239
}
12371240

12381241

src/parsec/g_boot.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,8 @@ int GameBoot()
327327
limit_timeval_cur = 1000000000;
328328

329329
// init color maps
330-
InitColorMaps();
330+
if(!headless_bot)
331+
InitColorMaps();
331332

332333
// alloc storage for MyShip
333334
AllocMyShip();

0 commit comments

Comments
 (0)