Client: add client-side base entity classes

Some shared data that was misplaced in server headers have been moved to shared.
This commit is contained in:
Kawe Mazidjatari 2024-07-29 21:01:26 +02:00
parent ceeaddb2e1
commit e8cefb64c3
17 changed files with 910 additions and 96 deletions

View File

@ -31,13 +31,20 @@ add_sources( SOURCE_GROUP "Animation"
add_sources( SOURCE_GROUP "Effects"
"shared/status_effect.h"
"shared/particleproperty.h"
"shared/particle_parse.h"
)
add_sources( SOURCE_GROUP "Collision"
add_sources( SOURCE_GROUP "Physics"
"shared/collisionproperty.cpp"
"shared/collisionproperty.h"
)
add_sources( SOURCE_GROUP "Player"
"shared/player_viewoffset.h"
"shared/player_melee.h"
)
add_sources( SOURCE_GROUP "Network"
"shared/playernet_vars.h"
"shared/usermessages.h"
@ -70,6 +77,7 @@ add_sources( SOURCE_GROUP "Script"
add_sources( SOURCE_GROUP "Weapon"
"shared/r1/weapon_bolt.cpp"
"shared/r1/weapon_bolt.h"
"shared/r1/grapple.h"
)
endif()
@ -190,11 +198,15 @@ if( ${PROJECT_NAME} STREQUAL "client_static" )
add_sources( SOURCE_GROUP "Entity"
"client/c_baseentity.cpp"
"client/c_baseentity.h"
"client/c_baseanimating.h"
"client/c_baseanimatingoverlay.h"
"client/c_basecombatcharacter.h"
"client/cliententitylist.h"
)
add_sources( SOURCE_GROUP "Player"
"client/c_baseplayer.h"
"client/c_playerlocaldata.h"
)
add_sources( SOURCE_GROUP "Input"
@ -214,6 +226,10 @@ add_sources( SOURCE_GROUP "Rendering"
"client/viewrender.h"
)
add_sources( SOURCE_GROUP "Animation"
"client/animationlayer.h"
)
add_sources( SOURCE_GROUP "Utility"
"client/movehelper_client.cpp"
"client/movehelper_client.h"

View File

@ -0,0 +1,19 @@
//===== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======//
//
// Purpose:
//
//===========================================================================//
#ifndef ANIMATIONLAYER_H
#define ANIMATIONLAYER_H
#include "studio.h"
struct C_AnimationLayer
{
void* _vftable;
CStudioHdr* m_pDispatchedStudioHdr;
int m_nDispatchedSrc;
int m_nDispatchedDst;
};
#endif // ANIMATIONLAYER_H

View File

@ -0,0 +1,84 @@
//===== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======//
//
// Purpose: Defines the client-side representation of CBaseAnimating.
//
// $NoKeywords: $
//===========================================================================//
#ifndef C_BASEANIMATING_H
#define C_BASEANIMATING_H
#include "c_baseentity.h"
struct C_SequenceTransitionerLayer
{
void* _vftable;
bool bunk0;
CBaseEntity* m_pOuter;
bool m_sequenceTransitionerLayerActive;
char gap_19[3];
float m_sequenceTransitionerLayerStartCycle;
int m_sequenceTransitionerLayerSequence;
float m_weight;
float m_sequenceTransitionerLayerPlaybackRate;
float m_sequenceTransitionerLayerStartTime;
float m_sequenceTransitionerLayerFadeOutDuration;
};
struct C_SequenceTransitioner
{
void* _vftable;
char _pad_unk[16];
C_SequenceTransitionerLayer m_sequenceTransitionerLayers[7];
char gap_50[336];
int m_sequenceTransitionerLayerCount;
};
struct PredictedAnimEventData
{
void* _vftable;
float m_predictedAnimEventTimes[8];
int m_predictedAnimEventIndices[8];
int m_predictedAnimEventCount;
int m_predictedAnimEventTarget;
int m_predictedAnimEventSequence;
int m_predictedAnimEventModel;
float m_predictedAnimEventsReadyToFireTime;
char gap_5C[4];
};
class C_BaseAnimating : public C_BaseEntity
{
char gap_a00[200];
PredictedAnimEventData m_predictedAnimEventData;
char gap_b28[152];
C_SequenceTransitioner m_SequenceTransitioner;
char gap_bc0[648];
int m_nSkin;
__int16 m_skinMod;
char gap_e4e[2];
int m_nBody;
char gap_e54[8];
int m_nResetEventsParity;
char gap_e60[160];
bool m_bSequenceFinished;
char gap_f01[7];
bool m_bSequenceLooped;
bool m_bSequenceLoops;
char gap_f0a[2];
float m_flModelScale;
char gap_f10[8];
float m_currentFrameBaseAnimating__animStartTime;
float m_currentFrameBaseAnimating__animStartCycle;
float m_currentFrameBaseAnimating__animPlaybackRate;
char gap_f24[4];
int m_currentFrameBaseAnimating__animModelIndex;
int m_currentFrameBaseAnimating__animSequence;
int m_currentFrameBaseAnimating__animSequenceParity;
float m_currentFrameBaseAnimating__m_flPoseParameters[24];
char pad[112];
};
static_assert(sizeof(C_BaseAnimating) == 0x1300);
#endif // C_BASEANIMATING_H

View File

@ -0,0 +1,37 @@
//===== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======//
//
// Purpose: Defines the client-side representation of CBaseAnimatingOverlay.
//
// $NoKeywords: $
//===========================================================================//
#ifndef C_BASEANIMATINGOVERLAY_H
#define C_BASEANIMATINGOVERLAY_H
#include "c_baseanimating.h"
#include "animationlayer.h"
class C_BaseAnimatingOverlay : public C_BaseAnimating
{
int unknownDword;
C_AnimationLayer m_AnimOverlay[9];
char gap_1308[216];
int m_AnimOverlayCount;
char gap_13e4_this_may_be_incorrect[44];
bool m_currentFrameAnimatingOverlay__animOverlayIsActive[9];
char gap_142d[3];
float m_currentFrameAnimatingOverlay__animOverlayStartTime[9];
float m_currentFrameAnimatingOverlay__animOverlayStartCycle[9];
float m_currentFrameAnimatingOverlay__animOverlayPlaybackRate[9];
int m_currentFrameAnimatingOverlay__animOverlayModelIndex[9];
int m_currentFrameAnimatingOverlay__animOverlaySequence[9];
float m_currentFrameAnimatingOverlay__animOverlayWeight[9];
int m_currentFrameAnimatingOverlay__animOverlayOrder[9];
float m_currentFrameAnimatingOverlay__animOverlayAnimTime[9];
float m_currentFrameAnimatingOverlay__animOverlayFadeInDuration[9];
float m_currentFrameAnimatingOverlay__animOverlayFadeOutDuration[9];
float m_currentFrameAnimatingOverlay__animOverlayCycle[9];
};
static_assert(sizeof(C_BaseAnimatingOverlay) == 0x1680);
#endif // C_BASEANIMATINGOVERLAY_H

View File

@ -0,0 +1,61 @@
//===== Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ======//
//
// Purpose: Defines the client-side representation of CBaseCombatCharacter.
//
// $NoKeywords: $
//===========================================================================//
#ifndef C_BASECOMBATCHARACTER_H
#define C_BASECOMBATCHARACTER_H
#include "c_baseanimatingoverlay.h"
struct WeaponInventory_Client
{
void* _vftable;
int weapons[9];
char gap_2c[24];
int activeWeapons[3];
};
class C_BaseCombatCharacter : public C_BaseAnimatingOverlay
{
float m_flNextAttack;
float m_lastFiredTime;
int m_lastFiredWeapon;
float m_raiseFromMeleeEndTime;
int m_sharedEnergyCount;
int m_sharedEnergyTotal;
int m_sharedEnergyLockoutThreshold;
float m_lastSharedEnergyRegenTime;
float m_sharedEnergyRegenRate;
float m_sharedEnergyRegenDelay;
float m_lastSharedEnergyTakeTime;
char gap_16ac[4];
WeaponInventory_Client m_inventory;
char m_selectedWeapons[2];
char gap_1702[2];
int m_latestPrimaryWeapons[2];
int m_latestPrimaryWeaponsIndexZeroOrOne[2];
char m_latestNonOffhandWeapons[2];
char m_selectedOffhands[3];
char m_selectedOffhandsPendingHybridAction[3];
char m_lastCycleSlot;
char gap_171d[3];
int m_latestMeleeWeapon;
int m_weaponPermission;
float m_weaponDelayEnableTime;
bool m_weaponDisabledInScript;
char gap_172d[36];
char m_weaponDisabledFlags;
bool m_hudInfo_visibilityTestAlwaysPasses;
char gap_1753[17];
int m_contextAction;
char gap_1768[40];
float m_phaseShiftTimeStart;
float m_phaseShiftTimeEnd;
char gap_1798[228];
};
static_assert(sizeof(C_BaseCombatCharacter) == 0x1880);
#endif // C_BASECOMBATCHARACTER_H

View File

@ -1,7 +1,90 @@
#ifndef C_BASEENTITY_H
#define C_BASEENTITY_H
#include "game/shared/collisionproperty.h"
#include "game/shared/particleproperty.h"
#include "vscript/ivscript.h"
#include "icliententity.h"
#include "mathlib/vector.h"
// How many data slots to use when in multiplayer.
#define MULTIPLAYER_BACKUP 750
class C_BaseEntity : public IClientEntity
{
char pad0[8];
void* unkHandle;
char pad1[16];
int m_iEFlags;
char gap_5c[8];
float m_currentFrame__animCycle_MAYBE;
char gap_68[16];
HSCRIPT m_hEntityScriptInstance;
const char* m_iszScriptId;
char gap_88[16];
int m_fFlags;
char gap_9c[12];
__int16 m_modelIndex;
char gap_aa[14];
Vector3D m_viewOffset;
char gap_c4[4];
int m_currentFrame__weaponGettingSwitchedOut_MAYBE[2];
bool m_currentFrame__showActiveWeapon3p_MAYBE[2];
char gap_d2[70];
int m_pMoveParent;
char gap_11c[10];
Vector3D m_vecAngVelocity;
Vector3D m_angAbsRotation;
Vector3D m_vecAbsVelocity;
Vector3D m_vecAbsOrigin;
Vector3D m_localOrigin;
Vector3D m_localAngles;
char gap_170[600];
float m_flGravity;
float m_flProxyRandomValue;
Vector3D m_vecBaseVelocity;
int m_hGroundEntity;
char gap_3e0[4];
float m_flMaxspeed;
int m_visibilityFlags;
int m_fEffects;
int m_iTeamNum;
char gap_3f4[16];
int m_passThroughFlags;
int m_passThroughThickness;
float m_passThroughDirection;
Vector3D m_deathVelocity;
Vector3D m_vecVelocity;
Vector3D m_angNetworkAngles;
float m_flFriction;
char gap_438[4];
int m_hOwnerEntity;
bool m_bRenderWithViewModels;
unsigned __int8 m_nRenderFX;
char gap_442[15];
unsigned __int8 m_nRenderMode;
unsigned __int8 m_MoveType;
unsigned __int8 m_MoveCollide;
char gap_454[4];
CCollisionProperty m_Collision;
char gap_4d8[238];
int m_nNextThinkTick;
char gap_5c4[396];
int m_phaseShiftFlags;
char gap_754[200];
CParticleProperty m_Particle;
char pad_bottom_1[368];
int m_animNetworkFlags;
bool m_networkAnimActive;
char gap_a2d[1];
bool m_animActive;
bool m_animCollisionEnabled;
bool m_animPlantingEnabled;
char gap_9d1[47];
};
static_assert(sizeof(C_BaseEntity) == 0xA00);
#endif // C_BASEENTITY_H

View File

@ -1,45 +1,331 @@
#ifndef C_BASEPLAYER_H
#define C_BASEPLAYER_H
#include "public/icliententity.h"
#include "public/icliententitylist.h"
#include "public/iclientnetworkable.h"
#include "public/iclientrenderable.h"
#include "public/iclientthinkable.h"
#include "public/iclientunknown.h"
#include "public/ihandleentity.h"
#include "public/vscript/ivscript.h"
#include "icliententity.h"
#include "icliententitylist.h"
#include "iclientnetworkable.h"
#include "iclientrenderable.h"
#include "iclientthinkable.h"
#include "iclientunknown.h"
#include "ihandleentity.h"
#include "playerstate.h"
#include "vscript/ivscript.h"
#include "c_baseentity.h"
#include "c_baseanimating.h"
#include "c_baseanimatingoverlay.h"
#include "c_basecombatcharacter.h"
#include "c_playerlocaldata.h"
#include "game/shared/r1/grapple.h"
#include "game/shared/status_effect.h"
#include "game/shared/player_viewoffset.h"
#include "game/shared/player_melee.h"
class C_BaseCombatCharacter
struct PlayerZiplineData_Client
{
int m_nPredictionData; // Unk
//int unk; // Padding?
void* _vftable;
bool m_ziplineReenableWeapons;
char gap_9[3];
float m_mountingZiplineDuration;
float m_mountingZiplineAlpha;
float m_ziplineStartTime;
float m_ziplineEndTime;
Vector3D m_mountingZiplineSourcePosition;
Vector3D m_mountingZiplineSourceVelocity;
Vector3D m_mountingZiplineTargetPosition;
char gap_40[12];
Vector3D m_ziplineUsePosition;
float m_slidingZiplineAlpha;
Vector3D m_lastMoveDir2D;
bool m_ziplineReverse;
};
class C_BaseEntity : public IClientEntity
class C_KnockBack
{
const char* m_pszModelName;
int unk0;
char pad[4]; // unk;
HSCRIPT m_hScriptInstance;
const char* m_iszScriptId;
void* _vftable;
Vector3D velocity;
float beginTime;
float endTime;
};
class C_BaseAnimating : public C_BaseEntity
class C_Player : public C_BaseCombatCharacter
{
bool unk;
bool m_bZooming;
char gap_1882[2];
float m_zoomToggleOnStartTime;
float m_zoomBaseFrac;
float m_zoomBaseTime;
float m_zoomFullStartTime;
char gap_1894[124];
int m_lastUCmdSimulationTicks;
float m_lastUCmdSimulationRemainderTime;
char gap_1918[280];
C_PlayerLocalData m_Local;
char gap_1a30[32];
float m_currentFramePlayer__timeBase;
char gap_1d1c[4];
StatusEffectTimedData m_currentFramePlayer__statusEffectsTimedPlayerCUR[10];
StatusEffectEndlessData m_currentFramePlayer__statusEffectsEndlessPlayerCUR[10];
float m_currentFramePlayer__m_flHullHeight;
float m_currentFramePlayer__m_traversalAnimProgress;
float m_currentFramePlayer__m_sprintTiltFrac;
char gap_1ebc[12];
int m_currentFramePlayer__m_ammoPoolCount[8];
char gap_1ee8[432];
Vector3D m_currentFrameLocalPlayer__m_stepSmoothingOffset;
Vector3D m_currentFrameLocalPlayer__m_vecPunchBase_Angle;
Vector3D m_currentFrameLocalPlayer__m_vecPunchBase_AngleVel;
Vector3D m_currentFrameLocalPlayer__m_vecPunchWeapon_Angle;
Vector3D m_currentFrameLocalPlayer__m_vecPunchWeapon_AngleVel;
char gap_20d4[48];
Quaternion m_currentFrameLocalPlayer__m_localGravityRotation;
char gap_2114[4];
CPlayerState pl;
char gap_2118[132];
int m_ammoPoolCapacity;
char gap_21a0[714];
int m_gestureSequences[8];
float m_gestureStartTimes[8];
float m_gestureBlendInDuration[8];
float m_gestureBlendOutDuration[8];
float m_gestureFadeOutStartTime[8];
float m_gestureFadeOutDuration[8];
int m_gestureAutoKillBitfield;
char gap_25c0[24];
int m_afButtonLast;
int m_afButtonPressed;
int m_afButtonReleased;
int m_nButtons;
int m_nImpulse;
int m_flPhysics;
float m_flStepSoundTime;
float m_flTimeAllSuitDevicesOff;
float m_fStickySprintMinTime;
bool m_bPlayedSprintStartEffects;
char gap_25fd[7];
bool m_fIsSprinting;
bool m_fIsWalking;
char gap_2606[2];
float m_sprintStartedTime;
float m_sprintStartedFrac;
float m_sprintEndedTime;
float m_sprintEndedFrac;
float m_stickySprintStartTime;
float m_damageImpulseNoDecelEndTime;
char gap_2620[12];
int m_duckState;
int m_leanState;
bool m_doingHalfDuck;
bool m_canStand;
char gap_2636[2];
Vector3D m_StandHullMin;
Vector3D m_StandHullMax;
Vector3D m_DuckHullMin;
Vector3D m_DuckHullMax;
char gap_2668[4];
Vector3D m_upDir;
Vector3D m_upDirPredicted;
Vector3D m_lastWallRunStartPos;
int m_wallRunCount;
bool m_wallRunWeak;
bool m_shouldBeOneHanded;
char gap_2696[2];
float m_oneHandFraction;
float m_animAimPitch;
float m_animAimYaw;
float m_wallRunPushAwayTime;
char gap_26a8[8];
float m_wallrunRetryTime;
Vector3D m_wallrunRetryPos;
Vector3D m_wallrunRetryNormal;
char gap_26cc[24];
float m_wallHangTime;
int m_traversalState;
int m_traversalType;
Vector3D m_traversalBegin;
Vector3D m_traversalMid;
Vector3D m_traversalEnd;
float m_traversalMidFrac;
Vector3D m_traversalForwardDir;
Vector3D m_traversalRefPos;
float m_traversalProgress;
float m_traversalStartTime;
float m_traversalHandAppearTime;
float m_traversalReleaseTime;
float m_traversalBlendOutStartTime;
Vector3D m_traversalBlendOutStartOffset;
float m_traversalYawDelta;
char gap_2754[8];
float m_wallDangleJumpOffTime;
bool m_wallDangleMayHangHere;
bool m_wallDangleForceFallOff;
bool m_wallDangleLastPushedForward;
char gap_2763[1];
int m_wallDangleDisableWeapon;
float m_wallDangleClimbProgressFloor;
bool m_wallClimbSetUp;
bool m_wallHanging;
char gap_276e[2];
GrappleData m_grapple;
char gap_2770[16];
bool m_grappleActive;
bool m_grappleNeedWindowCheck;
char gap_2802[2];
int m_grappleNextWindowHint;
char gap_2808[12];
bool m_slowMoEnabled;
bool m_sliding;
bool m_slideLongJumpAllowed;
char gap_2817[1];
float m_lastSlideTime;
float m_lastSlideBoost;
int m_gravityGrenadeStatusEffect;
bool m_bIsStickySprinting;
char gap_2825[3];
float m_prevMoveYaw;
float m_sprintTiltVel;
char gap_2830[24];
int m_hViewModels[3];
char gap_2854[4];
Player_ViewOffsetEntityData m_viewOffsetEntity;
char gap_2858[294];
int m_activeZipline;
int m_lastZipline;
float m_lastZiplineDetachTime;
bool m_ziplineValid3pWeaponLayerAnim;
char gap_29a5[3];
int m_ziplineState;
char gap_29ac[4];
PlayerZiplineData_Client m_zipline;
Vector3D m_ziplineViewOffsetPosition;
Vector3D m_ziplineViewOffsetVelocity;
int m_ziplineGrenadeEntity;
int m_ziplineGrenadeBeginStationEntity;
int m_ziplineGrenadeBeginStationAttachmentIndex;
char gap_2a44[8];
int m_playAnimationType;
bool m_detachGrappleOnPlayAnimationEnd;
char gap_2a51[3];
int m_playAnimationNext[2];
char gap_2a5c[12];
bool m_boosting;
bool m_activateBoost;
bool m_repeatedBoost;
char gap_2a6b[1];
float m_boostMeter;
bool m_jetpack;
bool m_activateJetpack;
bool m_jetpackAfterburner;
bool m_gliding;
float m_glideMeter;
float m_glideRechargeDelayAccumulator;
bool m_hovering;
bool m_isPerformingBoostAction;
char gap_2a7e[2];
float m_lastJumpHeight;
char gap_2a84[76];
Vector3D m_slipAirRestrictDirection;
float m_slipAirRestrictTime;
char gap_2ae0[400];
PlayerMelee_PlayerData m_melee;
char gap_2c70[4];
bool m_useCredit;
char gap_2ca9[979];
float m_wallRunStartTime;
float m_wallRunClearTime;
float m_onSlopeTime;
Vector3D m_lastWallNormal;
bool m_dodging;
char gap_3095[3];
float m_lastDodgeTime;
Vector3D m_vecPreviouslyPredictedOrigin;
char gap_30a8[12];
float m_flTimeLastTouchedWall;
float m_timeJetpackHeightActivateCheckPassed;
float m_flTimeLastTouchedGround;
float m_flTimeLastJumped;
float m_flTimeLastLanded;
float m_flLastLandFromHeight;
float m_usePressedTime;
float m_lastUseTime;
char gap_30d4[12];
Vector3D m_lastFakeFloorPos;
bool m_bHasJumpedSinceTouchedGround;
bool m_bDoMultiJumpPenalty;
bool m_dodgingInAir;
char gap_30ef[185];
bool m_thirdPerson;
char gap_31A9[263];
bool m_activeViewmodelModifiers[35];
char gap_32d3[701];
float m_lastMoveInputTime;
int m_ignoreEntityForMovementUntilNotTouching;
char gap_3598[1224];
float m_gameMovementUtil__m_surfaceFriction;
char gap_3a64[120];
int m_lungeTargetEntity;
bool m_isLungingToPosition;
char gap_3ae1[3];
Vector3D m_lungeTargetPosition;
Vector3D m_lungeStartPositionOffset;
Vector3D m_lungeEndPositionOffset;
float m_lungeStartTime;
float m_lungeEndTime;
bool m_lungeCanFly;
bool m_lungeLockPitch;
char gap_3b12[2];
float m_lungeStartPitch;
float m_lungeSmoothTime;
float m_lungeMaxTime;
float m_lungeMaxEndSpeed;
char gap_3b24[828];
Vector3D m_vPrevGroundNormal;
char gap_3e6c[440];
Vector3D m_pushAwayFromTopAcceleration;
char gap_4030[28];
bool m_controllerModeActive;
char gap_404d[23];
float m_skydiveForwardPoseValueVelocity;
float m_skydiveForwardPoseValueTarget;
float m_skydiveForwardPoseValueCurrent;
float m_skydiveSidePoseValueVelocity;
float m_skydiveSidePoseValueTarget;
float m_skydiveSidePoseValueCurrent;
float m_skydiveYawVelocity;
char gap_4080[24];
int m_freefallState;
float m_freefallStartTime;
float m_freefallEndTime;
float m_freefallAnticipateStartTime;
float m_freefallAnticipateEndTime;
float m_freefallDistanceToLand;
float m_skydiveDiveAngle;
bool m_skydiveIsDiving;
char gap_40b5[3];
float m_skydiveSpeed;
float m_skydiveStrafeAngle;
bool m_skydiveFreelookEnabled;
char gap_40c1[3];
Vector3D m_skydiveFreelookLockedAngle;
float m_skydivePlayerPitch;
float m_skydivePlayerYaw;
bool m_skydiveFollowing;
char gap_40d9[3];
Vector3D m_skydiveUnfollowVelocity;
char gap_40e8[1];
bool m_skydiveIsNearLeviathan;
char gap_40ea[2];
Vector3D m_skydiveLeviathanHitPosition;
Vector3D m_skydiveLeviathanHitNormal;
Vector3D m_skydiveSlipVelocity;
char gap_4110[16];
C_KnockBack m_playerKnockBacks[4];
char pad_41a0[32];
};
class C_BaseAnimatingOverlay : public C_BaseAnimating
{
};
class C_Player : public C_BaseCombatCharacter, public C_BaseAnimatingOverlay
{
};
static_assert(sizeof(C_Player) == 0x41C0);
#endif // C_BASEPLAYER_H

View File

@ -0,0 +1,96 @@
//=============================================================================//
//
// Purpose:
//
//=============================================================================//
#ifndef C_PLAYERLOCALDATA_H
#define C_PLAYERLOCALDATA_H
#include "mathlib/vector.h"
struct C_PlayerLocalData
{
void* _vftable;
int m_nStepside;
int m_nOldButtons;
int m_iHideHUD;
int m_nDuckTransitionTimeMsecs;
int m_superJumpsUsed;
bool m_jumpedOffRodeo;
char gap_1d[3];
float m_jumpPressTime;
float m_jumpHoldTime;
float m_jetpackActivateTime;
float m_flSuitPower;
float m_flSuitJumpPower;
float m_flSuitGrapplePower;
float m_flFallVelocity;
float m_flStepSize;
float m_airSlowMoFrac;
int predictableFlags;
int m_bitsActiveDevices;
int m_forceStance;
bool m_duckToggleOn;
bool m_bDrawViewmodel;
bool m_bAllowAutoMovement;
char gap_53[305];
Vector3D m_airMoveBlockPlanes[2];
float m_airMoveBlockPlaneTime;
int m_airMoveBlockPlaneCount;
float m_queuedMeleePressTime;
float m_queuedGrappleMeleeTime;
char gap_1ac[1];
bool m_disableMeleeUntilRelease;
char gap_1ae[2];
float m_meleePressTime;
int m_meleeDisabledCounter;
int m_meleeInputIndex;
char gap_1bc[4];
bool m_oneHandedWeaponUsage;
bool m_prevOneHandedWeaponUsage;
char gap_1c2[50];
bool m_titanEmbarkEnabled;
bool m_titanDisembarkEnabled;
char gap_1f6[6];
float m_playerAnimStationaryGoalFeetYaw;
bool m_playerAnimJumping;
char gap_201[3];
float m_playerAnimJumpStartTime;
bool m_playerAnimFirstJumpFrame;
bool m_playerAnimDodging;
char gap_20a[2];
int m_playerAnimJumpActivity;
bool m_playerAnimLanding;
bool m_playerAnimShouldLand;
char gap_212[2];
float m_playerAnimLandStartTime;
bool m_playerAnimInAirWalk;
char gap_219[3];
float m_playerAnimPrevFrameSequenceMotionYaw;
int m_playerAnimMeleeParity;
float m_playerAnimMeleeStartTime;
Quaternion m_playerLocalGravityToWorldTransform;
Quaternion m_playerLocalGravityBlendStartRotation;
Quaternion m_playerLocalGravityBlendEndRotation;
Vector3D m_playerLocalGravityBlendEndDirection;
float m_playerLocalGravityBlendStartTime;
float m_playerLocalGravityBlendEndTime;
float m_playerLocalGravityBlendStrength;
float m_playerLocalGravityStrength;
int m_playerLocalGravityType;
Vector3D m_playerLocalGravityPoint;
Vector3D m_playerLocalGravityLineStart;
Vector3D m_playerLocalGravityLineEnd;
int m_playerLocalGravityEntity;
int m_playerLocalGravityLineStartEntity;
int m_playerLocalGravityLineEndEntity;
float m_playerFloatLookStartTime;
float m_playerFloatLookEndTime;
float m_wallrunLatestFloorHeight;
Vector3D m_groundNormal;
bool m_continuousUseBlocked;
char gap_2e1[3];
int m_useEnt;
};
#endif // C_PLAYERLOCALDATA_H

View File

@ -18,6 +18,9 @@
#include "game/shared/takedamageinfo.h"
#include "game/shared/usercmd.h"
#include "game/shared/imovehelper.h"
#include "game/shared/player_viewoffset.h"
#include "game/shared/player_melee.h"
#include "game/shared/r1/grapple.h"
#include "playerlocaldata.h"
#include "basecombatcharacter.h"
@ -61,33 +64,6 @@ struct ThirdPersonViewData
float m_thirdPersonEntLookaheadLerpAheadRate;
float m_thirdPersonEntLookaheadLerpToCenterRate;
};
struct GrappleData
{
char gap_0[8];
Vector3D m_grappleVel;
Vector3D m_grapplePoints[4];
int m_grapplePointCount;
bool m_grappleAttached;
bool m_grapplePulling;
bool m_grappleSwinging;
bool m_grappleRetracting;
bool m_grappleForcedRetracting;
bool m_grappleGracePeriodFinished;
char gap_4e[2];
float m_grappleUsedPower;
float m_grappleActivateTime;
float m_grapplePullTime;
float m_grappleAttachTime;
float m_grappleDetachTime;
int m_grappleMeleeTarget;
int m_grappleAutoAimTarget;
bool m_grappleHasGoodVelocity;
char gap_6d[3];
float m_grappleLastGoodVelocityTime;
float m_grappleSwingDetachLowSpeed;
float m_grappleSwingHoldTime;
char gap_7c[4];
};
struct PlayerZiplineData
{
char gap_0[8];
@ -105,14 +81,6 @@ struct PlayerZiplineData
Vector3D m_lastMoveDir2D;
bool m_ziplineReverse;
};
struct Player_ViewOffsetEntityData
{
char gap_0[8];
int viewOffsetEntityHandle;
float lerpInDuration;
float lerpOutDuration;
bool stabilizePlayerEyeAngles;
};
struct CurrentData_Player
{
char gap_0[8];
@ -162,23 +130,6 @@ struct MatchMetrics
char rankedPeriodName[32];
int rankedScore;
};
struct PlayerMelee_PlayerData
{
char gap_0[8];
int meleeAttackParity;
bool attackActive;
bool attackRecoveryShouldBeQuick;
bool isSprintAttack;
char gap_f[1];
float attackStartTime;
int attackHitEntity;
float attackHitEntityTime;
float attackLastHitNonWorldEntity;
int scriptedState;
bool pendingMeleePress;
char gap_25[3];
Vector3D lungeBoost;
};
struct CPlayerShared // !TODO: MOVE INTO SHARED!!!
{

View File

@ -1,4 +1,4 @@
//========= Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ============//
//====== Copyright © 1996-2005, Valve Corporation, All rights reserved. =======//
//
// Purpose:
//
@ -10,7 +10,8 @@
#include "mathlib/vector.h"
#include "engine/ICollideable.h"
#include "game/server/baseentity.h"
class CBaseEntity;
class CCollisionProperty : public ICollideable
{

View File

@ -0,0 +1,77 @@
//====== Copyright © 1996-2005, Valve Corporation, All rights reserved. =======//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#ifndef PARTICLE_PARSE_H
#define PARTICLE_PARSE_H
//-----------------------------------------------------------------------------
// Particle attachment methods
//-----------------------------------------------------------------------------
enum ParticleAttachment_t
{
PATTACH_ABSORIGIN = 0x0, // Create at absorigin, but don't follow
PATTACH_ABSORIGIN_FOLLOW, // Create at absorigin, and update to follow the entity
PATTACH_ABSORIGIN_FOLLOW_NOROTATE, // Create at absorigin, and update to follow the entity without rotation
PATTACH_CUSTOMORIGIN, // Create at a custom origin, but don't follow
PATTACH_CUSTOMORIGIN_FOLLOW, // Create at a custom origin, follow relative position to specified entity
PATTACH_CUSTOMORIGIN_FOLLOW_NOROTATE, // Create at a custom origin, follow relative position to specified entity without rotation
PATTACH_POINT, // Create on attachment point, but don't follow
PATTACH_POINT_FOLLOW, // Create on attachment point, and update to follow the entity
PATTACH_POINT_FOLLOW_NOROTATE, // Create on attachment point, and update to follow the entity without rotation
PATTACH_EYES_FOLLOW, // Create on eyes of the attached entity, and update to follow the entity
PATTACH_OVERHEAD_FOLLOW, // Create at the top of the entity's bbox
PATTACH_WORLDORIGIN, // Used for control points that don't attach to an entity
PATTACH_ROOTBONE_FOLLOW, // Create at the root bone of the entity, and update to follow
PATTACH_EYEANGLES_FOLLOW,
PATTACH_CAMANGLES_FOLLOW,
PATTACH_WAYPOINT_VECTOR,
PATTACH_HEALTH,
PATTACH_HEAL_TARGET,
PATTACH_FRIENDLINESS,
PATTACH_PLAYER_SUIT_POWER,
PATTACH_PLAYER_GRAPPLE_POWER,
PATTACH_PLAYER_SHARED_ENERGY,
PATTACH_PLAYER_SHARED_ENERGY_FRACTION,
PATTACH_WEAPON_CHARGE_FRACTION,
PATTACH_WEAPON_SMART_AMMO_LOCK_FRACTION,
PATTACH_WEAPON_READY_TO_FIRE_FRACTION,
PATTACH_WEAPON_RELOAD_FRACTION,
PATTACH_WEAPON_DRYFIRE_FRACTION,
PATTACH_WEAPON_CLIP_AMMO_FRACTION,
PATTACH_WEAPON_CLIP_MIN_AMMO_FRACTION,
PATTACH_WEAPON_REMAINING_AMMO_FRACTION,
PATTACH_WEAPON_CLIP_AMMO_MAX,
PATTACH_WEAPON_AMMO_MAX,
PATTACH_WEAPON_LIFETIME_SHOTS,
PATTACH_WEAPON_AMMO_REGEN_RATE,
PATTACH_WEAPON_STOCKPILE_REGEN_FRAC,
PATTACH_BOOST_METER_FRACTION,
PATTACH_GLIDE_METER_FRACTION,
PATTACH_SHIELD_FRACTION,
PATTACH_STATUS_EFFECT_SEVERITY,
PATTACH_SCRIPT_NETWORK_VAR,
PATTACH_SCRIPT_NETWORK_VAR_GLOBAL,
PATTACH_SCRIPT_NETWORK_VAR_LOCAL_VIEW_PLAYER,
PATTACH_FRIENDLY_TEAM_SCORE,
PATTACH_FRIENDLY_TEAM_ROUND_SCORE,
PATTACH_ENEMY_TEAM_SCORE,
PATTACH_ENEMY_TEAM_ROUND_SCORE,
PATTACH_MINIMAP_SCALE,
PATTACH_SOUND_METER,
PATTACH_GAME_FULLY_INSTALLED_PROGRESS,
PATTACH_WAYPOINT_FLOAT,
PATTACH_TASKLIST_ITEM_FLOAT,
PATTACH_MINIMAP_ZOOM_SCALE,
PATTACH_DEATHFIELD_DISTANCE,
PATTACH_STATUS_EFFECT_TIME_REMAINING,
PATTACH_BIG_MAP_ZOOM_SCALE,
MAX_PATTACH_TYPES,
};
#endif // PARTICLE_PARSE_H

View File

@ -0,0 +1,22 @@
//====== Copyright © 1996-2005, Valve Corporation, All rights reserved. =======//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#ifndef PARTICLEPROPERTY_H
#define PARTICLEPROPERTY_H
class CParticleProperty
{
private:
void* _vftable;
CBaseEntity* m_pOuter;
CUtlVector<int> m_ParticleEffects; // TODO: reverse ParticleControlPoint_t
int m_iDormancyChangedAtFrame;
friend class CBaseEntity;
};
#endif // PARTICLEPROPERTY_H

View File

@ -0,0 +1,22 @@
#ifndef PLAYER_MELEE_H
#define PLAYER_MELEE_H
struct PlayerMelee_PlayerData
{
char gap_0[8];
int meleeAttackParity;
bool attackActive;
bool attackRecoveryShouldBeQuick;
bool isSprintAttack;
char gap_f[1];
float attackStartTime;
int attackHitEntity;
float attackHitEntityTime;
float attackLastHitNonWorldEntity;
int scriptedState;
bool pendingMeleePress;
char gap_25[3];
Vector3D lungeBoost;
};
#endif // PLAYER_MELEE_H

View File

@ -0,0 +1,13 @@
#ifndef PLAYER_VIEWOFFSET_H
#define PLAYER_VIEWOFFSET_H
struct Player_ViewOffsetEntityData
{
char gap_0[8];
int viewOffsetEntityHandle;
float lerpInDuration;
float lerpOutDuration;
bool stabilizePlayerEyeAngles;
};
#endif // PLAYER_VIEWOFFSET_H

View File

@ -0,0 +1,34 @@
#ifndef GAME_GRAPPLE_H
#define GAME_GRAPPLE_H
#include "mathlib/vector.h"
struct GrappleData
{
char gap_0[8];
Vector3D m_grappleVel;
Vector3D m_grapplePoints[4];
int m_grapplePointCount;
bool m_grappleAttached;
bool m_grapplePulling;
bool m_grappleSwinging;
bool m_grappleRetracting;
bool m_grappleForcedRetracting;
bool m_grappleGracePeriodFinished;
char gap_4e[2];
float m_grappleUsedPower;
float m_grappleActivateTime;
float m_grapplePullTime;
float m_grappleAttachTime;
float m_grappleDetachTime;
int m_grappleMeleeTarget;
int m_grappleAutoAimTarget;
bool m_grappleHasGoodVelocity;
char gap_6d[3];
float m_grappleLastGoodVelocityTime;
float m_grappleSwingDetachLowSpeed;
float m_grappleSwingHoldTime;
char gap_7c[4];
};
#endif // GAME_GRAPPLE_H

View File

@ -2,24 +2,35 @@
#define ICLIENTENTITY_H
#include "iclientunknown.h"
#include "ihandleentity.h"
#include "iclientrenderable.h"
#include "iclientnetworkable.h"
#include "iclientthinkable.h"
#include "mathlib/vector.h"
class IClientEntity : public IClientUnknown, public IClientRenderable, public IClientNetworkable, public IClientThinkable
abstract_class IClientEntity : public IClientUnknown,
public IHandleEntity,
public IClientRenderable,
public IClientNetworkable,
public IClientThinkable,
public IClientModelRenderable
{
public:
virtual __int64 sub_1405A82B0() = 0;
virtual __int64 sub_14096B640(char a2) = 0;
virtual __int64 sub_1405A9330() = 0;
virtual __int64 sub_1405A9340() = 0;
virtual __int64 sub_1405A9350() = 0;
virtual __int64 sub_1401F8F80() = 0;
virtual __int64 sub_1401F8F81() = 0;
virtual __int64 sub_1405A9360() = 0;
virtual const Vector3D& GetAbsOrigin(void) const = 0;
virtual const QAngle& GetAbsAngles(void) const = 0;
// NOTE: commented because the compiler optimizes this away, but that causes
// out class members to misalign. Once usage is made from this interface,
// remove the '__vftable' alignment member.
//public:
// virtual __int64 sub_1405A82B0() = 0;
// virtual __int64 sub_14096B640(char a2) = 0;
// virtual __int64 sub_1405A9330() = 0;
// virtual __int64 sub_1405A9340() = 0;
// virtual __int64 sub_1405A9350() = 0;
// virtual __int64 sub_1401F8F80() = 0;
// virtual __int64 sub_1401F8F81() = 0;
// virtual __int64 sub_1405A9360() = 0;
// virtual const Vector3D& GetAbsOrigin(void) const = 0;
// virtual const QAngle& GetAbsAngles(void) const = 0;
void* __vftable;
};
#endif // ICLIENTENTITY_H

View File

@ -10,6 +10,7 @@
#ifdef _WIN32
#pragma once
#endif
#include "tier1/string_t.h"
#include "mathlib/mathlib.h"
class CPlayerState