aozhiwei 8e66fe2b1d 1
2019-07-20 14:40:19 +08:00

121 lines
2.2 KiB
C++
Executable File

#pragma once
struct PerfMonitor
{
int max_run_delay_time = 0;
int max_dispatchmsg_time = 0;
int max_timer_idle = 0;
long long out_data_size = 0;
long long in_data_size = 0;
long long read_count = 0;
long long grid_chg_times = 0;
long long test_times = 0;
std::array<long long, 30> params = {};
std::array<int, 30> entity_num = {};
};
namespace MetaData
{
struct SafeArea;
struct Equip;
}
namespace cs
{
class MFWeapon;
class MFSkin;
class MFDriver;
}
struct GasData
{
GasMode_e gas_mode = kGasInactive;
a8::Vec2 pos_old;
a8::Vec2 pos_old_bk;
a8::Vec2 pre_pos_old;
a8::Vec2 pos_new;
float rad_old = 0.0f;
float rad_new = 0.0f;
float gas_progress = 0.0f;
long long gas_start_frameno = 0;
MetaData::SafeArea* old_area_meta = nullptr;
MetaData::SafeArea* new_area_meta = nullptr;
bool is_last_gas = false;
};
struct Weapon
{
int weapon_idx = 0;
int weapon_id = 0;
int weapon_lv = 0;
int ammo = 0;
MetaData::Equip* meta = nullptr;
void ToPB(cs::MFWeapon* pb_obj);
void Recalc();
int GetClipVolume();
};
struct Tank
{
int tank_id = 0;
int tank_lv = 0;
void FromPB(const cs::MFSkin* pb_obj);
void ToPB(cs::MFSkin* pb_obj);
};
struct TankSkin
{
int skin_id = 0;
int skin_lv = 0;
void FromPB(const cs::MFSkin* pb_obj);
void ToPB(cs::MFSkin* pb_obj);
};
struct Driver
{
int driver_id = 0;
int driver_lv = 0;
void FromPB(const cs::MFDriver* pb_obj);
};
struct PlayerStats
{
int kills = 0;
int dead_times = 0;
int damage_amount_in = 0;
int damage_amount_out = 0;
int heal_amount = 0;
int history_time_alive = 0;
int history_kills = 0;
int history_damage_amount = 0;
int history_heal_amount = 0;
int gold = 0;
int score = 0;
int killer_id = 0;
std::string killer_name;
int weapon_id = 0;
int rank = 0;
};
struct HumanAbility
{
float hp = 0.0f;
float max_hp = 0.0f;
float hp_recover = 0.0f;
float atk = 0.0f;
float def = 0.0f;
float speed = 0.0f;
float shot_range = 0.0f;
float shot_speed = 0.0f;
float reload_speed = 0.0f;
};