58 lines
2.2 KiB
C++
58 lines
2.2 KiB
C++
#pragma once
|
|
|
|
namespace respawn
|
|
{
|
|
struct glow_config_t
|
|
{
|
|
uint8_t general_mode;
|
|
uint8_t border_mode;
|
|
uint8_t border_len;
|
|
uint8_t transp_lvl;
|
|
};
|
|
|
|
class c_player : public c_entity
|
|
{
|
|
public:
|
|
NETVAR_FIELD(flags, this, int, "DT_Player", "m_fFlags");
|
|
NETVAR_FIELD(life_state, this, uint8_t, "DT_Player", "m_lifeState");
|
|
|
|
NETVAR_FIELD(health, this, int, "DT_Player", "m_iHealth");
|
|
NETVAR_FIELD(health_max, this, int, "DT_Player", "m_iMaxHealth");
|
|
|
|
NETVAR_FIELD(view_model, this, int, "DT_Player", "m_hViewModels");
|
|
|
|
NETVAR_FIELD(armor, this, int, "DT_BaseEntity", "m_shieldHealth");
|
|
NETVAR_FIELD(armor_max, this, int, "DT_BaseEntity", "m_shieldHealthMax");
|
|
|
|
NETVAR_FIELD(team_number, this, int, "DT_BaseEntity", "m_iTeamNum");
|
|
NETVAR_FIELD(observer_mode, this, int, "DT_LocalPlayerExclusive", "m_iObserverMode");
|
|
|
|
NETVAR_FIELD(bleed_out_state, this, int, "DT_Player", "m_bleedoutState");
|
|
NETVAR_FIELD(bleed_out_start_time, this, float, "DT_Player", "m_bleedoutStartTime");
|
|
|
|
NETVAR_FIELD(is_zooming, this, bool, "DT_Player", "m_bZooming");
|
|
NETVAR_FIELD(latest_primary_weapon, this, DWORD_PTR, "DT_BaseCombatCharacter", "m_latestPrimaryWeapons");
|
|
|
|
DATA_FIELD(server_time, this, float, 0x20D8);
|
|
DATA_FIELD(last_visible_time, this, float, dyn_offs::_::player::last_visible_time);
|
|
|
|
DATA_FIELD(glow_enabled, this, int, 0x3C8);
|
|
DATA_FIELD(glow_type, this, int, 0x3D0);
|
|
DATA_FIELD(glow_config, this, glow_config_t, 0x2C4);
|
|
DATA_FIELD(glow_color, this, color_t, 0x1D0);
|
|
DATA_FIELD(glow_distance, this, float, 0x3B4);
|
|
|
|
DATA_FIELD(velocity, this, math::Vector3, 0x140);
|
|
DATA_FIELD(view_offset, this, math::Vector3, dyn_offs::_::player::view_offset); // "48 83 EC 38 8B 05 ? ? ? ? 0F 29 74 24 20 83 F8 FF 74 22 0F B7 D0 48 8D 05 ? ? ? ? 48 C1 E2 05 48 03 D0 0F B7 05 ? ? ? ? 39 42 08"
|
|
DATA_FIELD(eye_angles, this, math::Angle3, dyn_offs::_::player::eye_angles); // "48 83 EC 58 80 3D ? ? ? ? ? 48 8B 05 ? ? ? ?"
|
|
DATA_FIELD(dyn_angles, this, math::Angle3, dyn_offs::_::player::eye_angles - 0x10);
|
|
|
|
bool is_visible() noexcept;
|
|
bool get_bone_position(size_t index, math::Vector3& result) noexcept;
|
|
|
|
c_weapon* get_active_weapon() noexcept;
|
|
c_view_model* get_view_model() noexcept;
|
|
private:
|
|
};
|
|
}
|