2019-03-18 15:47:44 +08:00

57 lines
1.2 KiB
C++

#pragma once
#include "entity.h"
#include "cs_proto.pb.h"
namespace MetaData
{
struct Player;
}
struct HumanFrameData
{
::google::protobuf::RepeatedPtrField<::cs::MFBullet> bullets;
::google::protobuf::RepeatedPtrField<::cs::MFShot> shots;
};
class Human : public Entity
{
public:
int team_id = 0;
std::string team_uniid;
MetaData::Player* meta = nullptr;
float health = 0.0;
bool dead = false;
bool downed = false;
bool disconnected = false;
int anim_type = 0;
int anim_seq = 0;
int action_type = 0;
int skin = 0;
int helmet = 0;
int chest = 0;
int weapon = 0;
int energy_shield = 0;
int vip = 0;
int sdmg = 0;
HumanFrameData frame_data;
bool moving = false;
Vector2D move_dir;
std::set<Human*> my_seen_players;
std::set<Human*> seen_me_players;
std::set<Human*> new_players;
std::set<Human*> part_players;
Human();
virtual ~Human() override;
virtual float GetSpeed() override;
virtual void FillMFObjectPart(cs::MFObjectPart* part_data) override;
virtual void FillMFObjectFull(cs::MFObjectFull* full_data) override;
void Shot(Vector2D& target_dir, float speed);
};