Esempio n. 1
0
int BotSetupGoalAI( bool singleplayer ) {
	if ( GGameType & GAME_ET ) {
		g_singleplayer = singleplayer;
	} else {
		//check if teamplay is on
		g_gametype = LibVarValue( "g_gametype", "0" );
	}
	//item configuration file
	const char* filename = LibVarString( "itemconfig", "items.c" );
	if ( GGameType & GAME_ET ) {
		PS_SetBaseFolder( BOTFILESBASEFOLDER );
	}
	//load the item configuration
	itemconfig = LoadItemConfig( filename );
	if ( GGameType & GAME_ET ) {
		PS_SetBaseFolder( "" );
	}
	if ( !itemconfig ) {
		BotImport_Print( PRT_FATAL, "couldn't load item config\n" );
		return GGameType & GAME_Quake3 ? Q3BLERR_CANNOTLOADITEMCONFIG : WOLFBLERR_CANNOTLOADITEMCONFIG;
	}

	if ( GGameType & GAME_Quake3 ) {
		droppedweight = LibVar( "droppedweight", "1000" );
	}
	//everything went ok
	return BLERR_NOERROR;
}
Esempio n. 2
0
//===========================================================================
//
// Parameter:				-
// Returns:					-
// Changes Globals:		-
//===========================================================================
int BotSetupWeaponAI( void ) {
	char *file;

	file = LibVarString( "weaponconfig", "weapons.c" );
	weaponconfig = LoadWeaponConfig( file );
	if ( !weaponconfig ) {
		botimport.Print( PRT_FATAL, "couldn't load the weapon config\n" );
		return BLERR_CANNOTLOADWEAPONCONFIG;
	} //end if

#ifdef DEBUG_AI_WEAP
	DumpWeaponConfig( weaponconfig );
#endif //DEBUG_AI_WEAP
	   //
	return BLERR_NOERROR;
} //end of the function BotSetupWeaponAI
Esempio n. 3
0
//===========================================================================
//
// Parameter:				-
// Returns:					-
// Changes Globals:		-
//===========================================================================
int BotSetupGoalAI( void ) {
	char *filename;

	//check if teamplay is on
	g_gametype = LibVarValue( "g_gametype", "0" );
	//item configuration file
	filename = LibVarString( "itemconfig", "items.c" );
	//load the item configuration
	itemconfig = LoadItemConfig( filename );
	if ( !itemconfig ) {
		botimport.Print( PRT_FATAL, "couldn't load item config\n" );
		return BLERR_CANNOTLOADITEMCONFIG;
	} //end if
	  //everything went ok
	return BLERR_NOERROR;
} //end of the function BotSetupGoalAI