#![allow(non_camel_case_types, non_snake_case)]
use std::{
ffi::{c_char, c_void},
ops::{Deref, DerefMut},
};
use super::{cbaseanimatingoverlay::CBaseAnimatingOverlay, EHandle};
use crate::{high::vector::Vector3, size_assert};
#[repr(C)]
#[derive(Debug)]
pub struct WeaponDropInfo {
pub weaponPosition: Vector3, pub prevDropFrameCounter: c_char, pub dropFrameCounter: c_char, pub gap_e: [c_char; 2],
pub weaponAngles: Vector3, pub weaponPositionTime: f32, }
size_assert!(SIZE_DROP where WeaponDropInfo == 32);
#[repr(C)]
#[derive(Debug)]
pub struct WeaponInventory {
pub vftable: *const c_void,
pub weapons: [EHandle; 4], pub activeWeapon: EHandle, pub offhandWeapons: [EHandle; 6], }
size_assert!(SIZE_WEAPON where WeaponInventory == 56);
#[repr(C)]
#[derive(Debug)]
pub struct CTether {
pub vftable: *const c_void,
pub pos: Vector3, pub health: f32, pub nextSoundTime: f32, pub creationTime: f32, pub scriptID: i32, }
size_assert!(SIZE_TETHER where CTether == 40);
#[repr(C)]
#[derive(Debug)]
pub struct CBaseCombatCharacter {
pub base: CBaseAnimatingOverlay,
pub m_bPreventWeaponPickup: bool, pub gap_1211: [c_char; 3],
pub m_phaseShiftTimeStart: f32, pub m_phaseShiftTimeEnd: f32, pub m_flNextAttack: f32, pub m_lastFiredTime: f32, pub m_raiseFromMeleeEndTime: f32, pub m_sharedEnergyCount: i32, pub m_sharedEnergyTotal: i32, pub m_lastSharedEnergyRegenTime: f32, pub m_sharedEnergyRegenRate: f32, pub m_sharedEnergyRegenDelay: f32, pub m_lastSharedEnergyTakeTime: f32, pub m_eHull: i32, pub m_fieldOfViewCos: f32, pub m_HackedGunPos: Vector3, pub m_impactEnergyScale: f32, pub m_weaponDropInfo: WeaponDropInfo, pub m_physicsMass: f32, pub m_flDamageAccumulator: f32, pub m_prevHealth: i32, pub m_healthChangeRate: f32, pub m_healthChangeAmount: f32, pub m_healthChangeStartTime: f32, pub m_lastHealthChangeTime: f32, pub m_lastHitGroup: i32, pub m_lastDamageDir: Vector3, pub m_lastDamageForce: Vector3, pub m_deathPackage: i32, pub m_deathDirection2DInverse: Vector3, pub m_CurrentWeaponProficiency: i32, pub m_flEnemyAccurcyMultiplier: f32, pub m_npcPriorityOverride: i32, pub m_healthPerSegment: i32, pub m_hTriggerFogList: [c_char; 32], pub m_hLastFogTrigger: EHandle, pub gap_12f4: [c_char; 4],
pub m_inventory: WeaponInventory, pub m_selectedWeapon: EHandle, pub m_latestPrimaryWeapon: EHandle, pub m_latestNonOffhandWeapon: EHandle, pub m_lastCycleSlot: i32, pub m_removeWeaponOnSelectSwitch: EHandle, pub m_weaponGettingSwitchedOut: EHandle, pub m_showNewWeapon3p: bool, pub gap_1349: [c_char; 3],
pub m_weaponPermission: i32, pub m_weaponDisabled: bool, pub m_hudInfo_visibilityTestAlwaysPasses: bool, pub gap_1352: [c_char; 2],
pub m_selectedOffhand: EHandle, pub m_selectedOffhandPendingHybridAction: i32, pub m_doOffhandAnim: bool, pub m_wantInventoryChangedScriptCall: bool, pub m_doInventoryChangedScriptCall: bool, pub gap_135f: [c_char; 1],
pub m_cloakReactEndTime: f32, pub gap_1364: [c_char; 4],
pub m_tethers: [CTether; 2], pub m_titanSoul: EHandle, pub m_lastFootstepDamagePos: Vector3, pub m_muzzleAttachment: [i32; 2], pub m_prevNearestNode: i32, pub m_nearestNode: i32, pub m_nearestNodeCheckTime: f32, pub m_nearestNodeCheckPos: Vector3, pub m_nearestPolyRef: [i32; 4], pub m_nearestPolyCheckPos: [Vector3; 4], pub m_meleeExecutionUnstuckPosition: Vector3, pub m_meleeExecutionEntityBlocker: EHandle, pub m_contextAction: i32, pub m_targetInfoIconName: [c_char; 64], pub m_rodeoRiders: [EHandle; 5], pub m_numRodeoSlots: i32, }
size_assert!(SIZE_COMBAT_CHAR where CBaseCombatCharacter == 0x1498);
impl DerefMut for CBaseCombatCharacter {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.base
}
}
impl Deref for CBaseCombatCharacter {
type Target = CBaseAnimatingOverlay;
fn deref(&self) -> &Self::Target {
&self.base
}
}