void Player_Statistic::net_load(NET_Packet* P)
{
	m_dwTotalShots += P->r_u32();
	u32 NumWeapons = P->r_u32();
	
	victims_table::victims_table_t	vt_storage(
			_alloca(sizeof(victims_table::victims_table_t::value_type)*255), 255);
	bone_table::bone_table_t		bt_storage(
		_alloca(sizeof(bone_table::bone_table_t::value_type)*65), 65);

	victims_table vict_table(vt_storage);
	bone_table bone_table(bt_storage);
		
	vict_table.net_load(P);
	bone_table.net_load(P);

	for (u32 i=0; i<NumWeapons; i++)
	{
		shared_str WName;
		P->r_stringZ(WName);
		WEAPON_STATS_it tmp_wst_it = FindPlayersWeapon(WName.c_str());
		R_ASSERT(tmp_wst_it != aWeaponStats.end());
		tmp_wst_it->net_load(P, vict_table, bone_table);
	}
};
Beispiel #2
0
void Player_Statistic::net_load(NET_Packet* P)
{
	m_dwTotalShots += P->r_u32();
	u32 NumWeapons = P->r_u32();
	for (u32 i=0; i<NumWeapons; i++)
	{
		shared_str WName;
		P->r_stringZ(WName);
		Weapon_Statistic& WS = *(FindPlayersWeapon(*WName));
		WS.net_load(P);
	}
};