예제 #1
0
//--------------------------------------------
void WP_LoadWeaponParms (void)
{
	char *buffer;
	int len;

	len = gi.FS_ReadFile("ext_data/weapons.dat",(void **) &buffer);

	// initialise the data area
	memset(weaponData, 0, WP_NUM_WEAPONS * sizeof(weaponData_t));	

	WP_ParseParms(buffer);

	gi.FS_FreeFile( buffer );	//let go of the buffer
}
예제 #2
0
//--------------------------------------------
void WP_LoadWeaponParms (void)
{
	char *buffer;
	int len;

	len = gi.FS_ReadFile("ext_data/weapons.dat",(void **) &buffer);

	if (len == -1)
	{
		Com_Error(ERR_FATAL,"Cannot find ext_data/weapons.dat!\n");		
	}

	// initialise the data area
	memset(weaponData, 0, WP_NUM_WEAPONS * sizeof(weaponData_t));	

	WP_ParseParms(buffer);

	gi.FS_FreeFile( buffer );	//let go of the buffer
}
예제 #3
0
//--------------------------------------------
void WP_LoadWeaponParms (void)
{
	char *buffer;

	gi.FS_ReadFile("ext_data/weapons.dat",(void **) &buffer);

	// initialise the data area
	memset(weaponData, 0, sizeof(weaponData));

	// put in the default values, because backwards compatibility is awesome!
	for(int i = 0; i < WP_NUM_WEAPONS; i++)
	{
		weaponData[i].damage = defaultDamage[i];
		weaponData[i].altDamage = defaultAltDamage[i];
		weaponData[i].splashDamage = defaultSplashDamage[i];
		weaponData[i].altSplashDamage = defaultAltSplashDamage[i];
		weaponData[i].splashRadius = defaultSplashRadius[i];
		weaponData[i].altSplashRadius = defaultAltSplashRadius[i];
	}

	WP_ParseParms(buffer);

	gi.FS_FreeFile( buffer );	//let go of the buffer
}