diff --git a/Amalgam/Amalgam.vcxproj b/Amalgam/Amalgam.vcxproj
index 4e5a25c3..6a518464 100644
--- a/Amalgam/Amalgam.vcxproj
+++ b/Amalgam/Amalgam.vcxproj
@@ -544,7 +544,6 @@
-
diff --git a/Amalgam/Amalgam.vcxproj.filters b/Amalgam/Amalgam.vcxproj.filters
index d693aa59..94250bf8 100644
--- a/Amalgam/Amalgam.vcxproj.filters
+++ b/Amalgam/Amalgam.vcxproj.filters
@@ -138,7 +138,6 @@
-
diff --git a/Amalgam/cpp.hint b/Amalgam/cpp.hint
index 6b0c2ea7..7c1eb36a 100644
--- a/Amalgam/cpp.hint
+++ b/Amalgam/cpp.hint
@@ -36,25 +36,25 @@ namespace MAKE_INTERFACE_SCOPE \
{\
inline InterfaceInit_t name##InterfaceInit_t(reinterpret_cast(&I::name), dll, signature, offset, deref, true); \
}
-#define NETVAR(_name, type, table, name) type& _name() \
+#define NETVAR(_name, type, table, name) inline type& _name() \
{ \
static int nOffset = U::NetVars.GetNetVar(table, name); \
return *reinterpret_cast(uintptr_t(this) + nOffset); \
}
-#define NETVAR_OFF(_name, type, table, name, offset) type& _name() \
+#define NETVAR_OFF(_name, type, table, name, offset) inline type& _name() \
{ \
static int nOffset = U::NetVars.GetNetVar(table, name) + offset; \
return *reinterpret_cast(uintptr_t(this) + nOffset); \
}
-#define OFFSET(name, type, offset) type& name() \
+#define OFFSET(name, type, offset) inline type& name() \
{ \
return *reinterpret_cast(uintptr_t(this) + offset); \
}
-#define VIRTUAL(name, type, fn, base, index) type name() \
+#define VIRTUAL(name, type, fn, base, index) inline type name() \
{ \
return reinterpret_cast(U::Memory.GetVFunc(base, index))(base); \
}
-#define CONDGET(name, conditions, cond) bool name() \
+#define CONDGET(name, conditions, cond) inline bool name() \
{ \
return (conditions & cond); \
}
diff --git a/Amalgam/src/SDK/Definitions/Main/CBaseAnimating.h b/Amalgam/src/SDK/Definitions/Main/CBaseAnimating.h
index 2881ad34..3b6ae391 100644
--- a/Amalgam/src/SDK/Definitions/Main/CBaseAnimating.h
+++ b/Amalgam/src/SDK/Definitions/Main/CBaseAnimating.h
@@ -33,7 +33,7 @@ public:
NETVAR_OFF(GetModelPtr, CStudioHdr*, "CBaseAnimating", "m_nMuzzleFlashParity", 12);
- int GetHitboxGroup(int nHitbox)
+ inline int GetHitboxGroup(int nHitbox)
{
auto pModel = GetModel();
if (!pModel) return -1;
@@ -47,7 +47,7 @@ public:
return pBox->group;
}
- int GetNumOfHitboxes()
+ inline int GetNumOfHitboxes()
{
auto pModel = GetModel();
if (!pModel) return 0;
@@ -59,7 +59,7 @@ public:
return pSet->numhitboxes;
}
- Vec3 GetHitboxOrigin(int nHitbox, Vec3 vOffset = {})
+ inline Vec3 GetHitboxOrigin(int nHitbox, Vec3 vOffset = {})
{
auto pModel = GetModel();
if (!pModel) return {};
@@ -79,7 +79,7 @@ public:
return vOut;
}
- Vec3 GetHitboxCenter(int nHitbox, Vec3 vOffset = {})
+ inline Vec3 GetHitboxCenter(int nHitbox, Vec3 vOffset = {})
{
auto pModel = GetModel();
if (!pModel) return {};
@@ -99,7 +99,7 @@ public:
return vOut;
}
- void GetHitboxInfo(int nHitbox, Vec3* pCenter = nullptr, Vec3* pMins = nullptr, Vec3* pMaxs = nullptr, matrix3x4* pMatrix = nullptr, Vec3 vOffset = {})
+ inline void GetHitboxInfo(int nHitbox, Vec3* pCenter = nullptr, Vec3* pMins = nullptr, Vec3* pMaxs = nullptr, matrix3x4* pMatrix = nullptr, Vec3 vOffset = {})
{
auto pModel = GetModel();
if (!pModel) return;
@@ -127,29 +127,29 @@ public:
memcpy(*pMatrix, aBones[pBox->bone], sizeof(matrix3x4));
}
- std::array& m_flPoseParameter()
+ inline std::array& m_flPoseParameter()
{
static int nOffset = U::NetVars.GetNetVar("CBaseAnimating", "m_flPoseParameter");
return *reinterpret_cast*>(uintptr_t(this) + nOffset);
}
- CUtlVector* GetCachedBoneData()
+ inline CUtlVector* GetCachedBoneData()
{
static int nOffset = U::NetVars.GetNetVar("CBaseAnimating", "m_hLightingOrigin") - 88;
return reinterpret_cast*>(uintptr_t(this) + nOffset);
}
- float FrameAdvance(float flInterval)
+ inline float FrameAdvance(float flInterval)
{
return S::CBaseAnimating_FrameAdvance.As()(this, flInterval);
}
- void GetBonePosition(int iBone, Vector& origin, QAngle& angles)
+ inline void GetBonePosition(int iBone, Vector& origin, QAngle& angles)
{
S::CBaseAnimating_GetBonePosition.As()(this, iBone, origin, angles);
}
- __inline bool GetAttachment(int number, Vec3& origin)
+ inline bool GetAttachment(int number, Vec3& origin)
{
return reinterpret_cast(U::Memory.GetVFunc(this, 71))(this, number, origin);
}
diff --git a/Amalgam/src/SDK/Definitions/Main/CBaseCombatCharacter.h b/Amalgam/src/SDK/Definitions/Main/CBaseCombatCharacter.h
index b4f87b3c..aeb10874 100644
--- a/Amalgam/src/SDK/Definitions/Main/CBaseCombatCharacter.h
+++ b/Amalgam/src/SDK/Definitions/Main/CBaseCombatCharacter.h
@@ -9,7 +9,7 @@ public:
NETVAR(m_hMyWeapons, EHANDLE, "CBaseCombatCharacter", "m_hMyWeapons");
NETVAR(m_bGlowEnabled, bool, "CBaseCombatCharacter", "m_bGlowEnabled");
- __inline size_t* GetMyWeapons()
+ inline size_t* GetMyWeapons()
{
static int nOffset = U::NetVars.GetNetVar("CBaseCombatCharacter", "m_hMyWeapons");
return reinterpret_cast(uintptr_t(this) + nOffset);
diff --git a/Amalgam/src/SDK/Definitions/Main/CBaseCombatWeapon.h b/Amalgam/src/SDK/Definitions/Main/CBaseCombatWeapon.h
index d48b2d81..5ad2620d 100644
--- a/Amalgam/src/SDK/Definitions/Main/CBaseCombatWeapon.h
+++ b/Amalgam/src/SDK/Definitions/Main/CBaseCombatWeapon.h
@@ -26,7 +26,7 @@ public:
VIRTUAL(GetName, const char*, const char* (__fastcall*)(void*), this, 332);
- bool HasAmmo()
+ inline bool HasAmmo()
{
return S::CBaseCombatWeapon_HasAmmo.As()(this);
}
diff --git a/Amalgam/src/SDK/Definitions/Main/CBaseEntity.h b/Amalgam/src/SDK/Definitions/Main/CBaseEntity.h
index a5ff9b05..51c8984b 100644
--- a/Amalgam/src/SDK/Definitions/Main/CBaseEntity.h
+++ b/Amalgam/src/SDK/Definitions/Main/CBaseEntity.h
@@ -94,19 +94,19 @@ public:
VIRTUAL(UpdateVisibility, void, void(__fastcall*)(CBaseEntity*), this, 91);
- Vec3 GetCenter()
+ inline Vec3 GetCenter()
{
return m_vecOrigin() + Vec3(0, 0, (m_vecMins().z + m_vecMaxs().z) / 2);
}
- Vec3 GetRenderCenter()
+ inline Vec3 GetRenderCenter()
{
Vec3 vMin = {}, vMax = {};
GetRenderBounds(vMin, vMax);
return GetRenderOrigin() + Vec3(0.f, 0.f, (vMin.z + vMax.z) / 2);
}
- bool IsInValidTeam(int* pTeamNumOut = nullptr)
+ inline bool IsInValidTeam(int* pTeamNumOut = nullptr)
{
int nTeamNum = m_iTeamNum();
@@ -125,7 +125,7 @@ public:
}
}
- CBaseEntity* GetMoveParent()
+ inline CBaseEntity* GetMoveParent()
{
static int nOffset = U::NetVars.GetNetVar("CBaseEntity", "moveparent") - 8;
auto m_pMoveParent = reinterpret_cast(uintptr_t(this) + nOffset);
@@ -136,7 +136,7 @@ public:
return m_pMoveParent->Get();
}
- CBaseEntity* NextMovePeer()
+ inline CBaseEntity* NextMovePeer()
{
static int nOffset = U::NetVars.GetNetVar("CBaseEntity", "moveparent") - 16;
auto m_pMovePeer = reinterpret_cast(uintptr_t(this) + nOffset);
@@ -147,7 +147,7 @@ public:
return m_pMovePeer->Get();
}
- CBaseEntity* FirstMoveChild()
+ inline CBaseEntity* FirstMoveChild()
{
static int nOffset = U::NetVars.GetNetVar("CBaseEntity", "moveparent") - 24;
auto m_pMoveChild = reinterpret_cast(uintptr_t(this) + nOffset);
@@ -158,39 +158,39 @@ public:
return m_pMoveChild->Get();
}
- void SetAbsOrigin(const Vec3& absOrigin)
+ inline void SetAbsOrigin(const Vec3& absOrigin)
{
S::CBaseEntity_SetAbsOrigin.As()(this, absOrigin);
}
- void SetAbsAngles(const Vec3& absAngles)
+ inline void SetAbsAngles(const Vec3& absAngles)
{
S::CBaseEntity_SetAbsAngles.As()(this, absAngles);
}
- void SetAbsVelocity(const Vec3& vecAbsVelocity)
+ inline void SetAbsVelocity(const Vec3& vecAbsVelocity)
{
S::CBaseEntity_SetAbsVelocity.As()(this, vecAbsVelocity);
}
- void EstimateAbsVelocity(Vec3& vel)
+ inline void EstimateAbsVelocity(Vec3& vel)
{
S::CBaseEntity_EstimateAbsVelocity.As()(this, vel);
}
- Vec3 GetAbsVelocity()
+ inline Vec3 GetAbsVelocity()
{
Vec3 vOut;
EstimateAbsVelocity(vOut);
return vOut;
}
- void CreateShadow()
+ inline void CreateShadow()
{
S::CBaseEntity_CreateShadow.As()(this);
}
- void InvalidateBoneCache()
+ inline void InvalidateBoneCache()
{
S::CBaseEntity_InvalidateBoneCache.As()(this);
}
diff --git a/Amalgam/src/SDK/Definitions/Main/CBaseObject.h b/Amalgam/src/SDK/Definitions/Main/CBaseObject.h
index 776dc621..5b33203c 100644
--- a/Amalgam/src/SDK/Definitions/Main/CBaseObject.h
+++ b/Amalgam/src/SDK/Definitions/Main/CBaseObject.h
@@ -33,25 +33,25 @@ public:
VIRTUAL(GetNumBuildPoints, int, int(__fastcall*)(void*), IHasBuildPoints(), 0);
- void* IHasBuildPoints()
+ inline void* IHasBuildPoints()
{
static int nOffset = U::NetVars.GetNetVar("CBaseObject", "m_iUpgradeLevel") - 340;
return reinterpret_cast(uintptr_t(this) + nOffset);
};
- bool GetBuildPoint(int iPoint, Vec3& vecOrigin, Vec3& vecAngles)
+ inline bool GetBuildPoint(int iPoint, Vec3& vecOrigin, Vec3& vecAngles)
{
void* pPoints = IHasBuildPoints();
return reinterpret_cast(U::Memory.GetVFunc(pPoints, 1))(pPoints, iPoint, vecOrigin, vecAngles);
}
- __inline int GetBuildPointAttachmentIndex(int iPoint)
+ inline int GetBuildPointAttachmentIndex(int iPoint)
{
void* pPoints = IHasBuildPoints();
return reinterpret_cast(U::Memory.GetVFunc(pPoints, 2))(pPoints, iPoint);
}
- bool IsDisabled()
+ inline bool IsDisabled()
{
return m_bDisabled() || m_bHasSapper();
}
@@ -71,7 +71,7 @@ public:
NETVAR(m_iKills, int, "CObjectSentrygun", "m_iKills");
NETVAR(m_iAssists, int, "CObjectSentrygun", "m_iAssists");
- __inline int MaxAmmoShells()
+ inline int MaxAmmoShells()
{
if (m_iUpgradeLevel() == 1 || m_bMiniBuilding())
return 150;
@@ -79,7 +79,7 @@ public:
return 200;
}
- __inline void GetAmmoCount(int& iShells, int& iMaxShells, int& iRockets, int& iMaxRockets)
+ inline void GetAmmoCount(int& iShells, int& iMaxShells, int& iRockets, int& iMaxRockets)
{
const bool bIsMini = m_bMiniBuilding();
diff --git a/Amalgam/src/SDK/Definitions/Main/CBasePlayer.h b/Amalgam/src/SDK/Definitions/Main/CBasePlayer.h
index 05593d34..b3cfd461 100644
--- a/Amalgam/src/SDK/Definitions/Main/CBasePlayer.h
+++ b/Amalgam/src/SDK/Definitions/Main/CBasePlayer.h
@@ -86,43 +86,43 @@ public:
VIRTUAL(PostThink, void, void(__fastcall*)(void*), this, 262);
VIRTUAL(GetRenderedWeaponModel, CBaseAnimating*, CBaseAnimating*(__fastcall*)(void*), this, 251);
- void SelectItem(const char* ptr, int subtype)
+ inline void SelectItem(const char* ptr, int subtype)
{
reinterpret_cast(U::Memory.GetVFunc(this, 271))(this, ptr, subtype);
}
- bool IsAlive()
+ inline bool IsAlive()
{
return m_lifeState() == LIFE_ALIVE;
}
- Vec3 GetShootPos()
+ inline Vec3 GetShootPos()
{
return m_vecOrigin() + m_vecViewOffset();
}
- Vec3 GetEyePosition()
+ inline Vec3 GetEyePosition()
{
return GetAbsOrigin() + m_vecViewOffset();
}
- bool OnSolid()
+ inline bool OnSolid()
{
return m_hGroundEntity() || IsOnGround();
}
- bool IsSwimming()
+ inline bool IsSwimming()
{
return m_nWaterLevel() > 1;
}
- __inline void SetCurrentCmd(CUserCmd* pCmd)
+ inline void SetCurrentCmd(CUserCmd* pCmd)
{
static int nOffset = U::NetVars.GetNetVar("CBasePlayer", "m_hConstraintEntity") - 8;
*reinterpret_cast(uintptr_t(this) + nOffset) = pCmd;
}
- int GetAmmoCount(int iAmmoType)
+ inline int GetAmmoCount(int iAmmoType)
{
return S::CBasePlayer_GetAmmoCount.As()(this, iAmmoType);
}
diff --git a/Amalgam/src/SDK/Definitions/Main/CBaseProjectile.h b/Amalgam/src/SDK/Definitions/Main/CBaseProjectile.h
index 4f87d088..071a3917 100644
--- a/Amalgam/src/SDK/Definitions/Main/CBaseProjectile.h
+++ b/Amalgam/src/SDK/Definitions/Main/CBaseProjectile.h
@@ -84,7 +84,7 @@ public:
NETVAR_OFF(m_flCreationTime, float, "CTFGrenadePipebombProjectile", "m_iType", 4);
NETVAR_OFF(m_bPulsed, bool, "CTFGrenadePipebombProjectile", "m_iType", 12);
- bool HasStickyEffects()
+ inline bool HasStickyEffects()
{
return m_iType() == TF_GL_MODE_REMOTE_DETONATE || m_iType() == TF_GL_MODE_REMOTE_DETONATE_PRACTICE;
}
diff --git a/Amalgam/src/SDK/Definitions/Main/CCollisionProperty.h b/Amalgam/src/SDK/Definitions/Main/CCollisionProperty.h
index 5b013346..9150ee2c 100644
--- a/Amalgam/src/SDK/Definitions/Main/CCollisionProperty.h
+++ b/Amalgam/src/SDK/Definitions/Main/CCollisionProperty.h
@@ -36,13 +36,13 @@ public:
class CCollisionProperty : public ICollideable
{
public:
- void SetCollisionBounds(const Vec3& mins, const Vec3& maxs)
+ inline void SetCollisionBounds(const Vec3& mins, const Vec3& maxs)
{
static auto func = S::CCollisionPropert_SetCollisionBounds.As();
func(this, mins, maxs);
}
- void CalcNearestPoint(const Vec3& vecWorldPt, Vec3* pVecNearestWorldPt)
+ inline void CalcNearestPoint(const Vec3& vecWorldPt, Vec3* pVecNearestWorldPt)
{
static auto func = S::CCollisionProperty_CalcNearestPoint.As();
func(this, vecWorldPt, pVecNearestWorldPt);
diff --git a/Amalgam/src/SDK/Definitions/Main/CEntitySphereQuery.h b/Amalgam/src/SDK/Definitions/Main/CEntitySphereQuery.h
index 82d80c68..fa72a509 100644
--- a/Amalgam/src/SDK/Definitions/Main/CEntitySphereQuery.h
+++ b/Amalgam/src/SDK/Definitions/Main/CEntitySphereQuery.h
@@ -19,12 +19,12 @@ public:
reinterpret_cast(dwAddress)(this, center, radius, flagMask, partitionMask);
}
- CBaseEntity* GetCurrentEntity()
+ inline CBaseEntity* GetCurrentEntity()
{
return (m_nListIndex < m_nListCount) ? m_pList[m_nListIndex] : nullptr;
}
- void NextEntity()
+ inline void NextEntity()
{
m_nListIndex++;
}
diff --git a/Amalgam/src/SDK/Definitions/Main/CTFPlayer.h b/Amalgam/src/SDK/Definitions/Main/CTFPlayer.h
index 5c2ef00d..f387a099 100644
--- a/Amalgam/src/SDK/Definitions/Main/CTFPlayer.h
+++ b/Amalgam/src/SDK/Definitions/Main/CTFPlayer.h
@@ -234,12 +234,12 @@ public:
CONDGET(IsSupernovaRune, m_nPlayerCondEx3(), TFCondEx3_SupernovaRune);
CONDGET(IsBuffedByKing, m_nPlayerCondEx3(), TFCondEx3_KingBuff);
- Vec3 GetEyeAngles()
+ inline Vec3 GetEyeAngles()
{
return { m_angEyeAnglesX(), m_angEyeAnglesY(), 0.f };
}
- Vec3 GetViewOffset() // use on nonlocal players
+ inline Vec3 GetViewOffset() // use on nonlocal players
{
auto getMainOffset = [this]() -> Vec3
{
@@ -270,12 +270,12 @@ public:
return getMainOffset() * flSize;
}
- bool IsFriend()
+ inline bool IsFriend()
{
return S::CTFPlayer_IsPlayerOnSteamFriendsList.As()(this, this);
}
- bool InCond(const ETFCond cond)
+ inline bool InCond(const ETFCond cond)
{
const int iCond = static_cast(cond);
switch (iCond / 32)
@@ -320,7 +320,7 @@ public:
return false;
}
- bool IsInvisible()
+ inline bool IsInvisible()
{
if (this->InCond(TF_COND_BURNING)
|| this->InCond(TF_COND_BURNING_PYRO)
@@ -331,7 +331,7 @@ public:
return m_flInvisibility() >= 1.f;
}
- float GetInvisPercentage()
+ inline float GetInvisPercentage()
{
static auto tf_spy_invis_time = I::CVar->FindVar("tf_spy_invis_time");
const float flInvisTime = tf_spy_invis_time ? tf_spy_invis_time->GetFloat() : 1.f;
@@ -340,12 +340,12 @@ public:
return GetInvisPercent;
}
- bool IsZoomed()
+ inline bool IsZoomed()
{
return InCond(TF_COND_ZOOMED);
}
- bool IsInvulnerable()
+ inline bool IsInvulnerable()
{
return InCond(TF_COND_INVULNERABLE)
|| InCond(TF_COND_INVULNERABLE_CARD_EFFECT)
@@ -354,7 +354,7 @@ public:
|| InCond(TF_COND_PHASE);
}
- bool IsUbered()
+ inline bool IsUbered()
{
return InCond(TF_COND_INVULNERABLE)
|| InCond(TF_COND_INVULNERABLE_CARD_EFFECT)
@@ -362,7 +362,7 @@ public:
|| InCond(TF_COND_INVULNERABLE_USER_BUFF);
}
- bool IsCritBoosted()
+ inline bool IsCritBoosted()
{
return InCond(TF_COND_CRITBOOSTED)
|| InCond(TF_COND_CRITBOOSTED_BONUS_TIME)
@@ -376,7 +376,7 @@ public:
|| InCond(TF_COND_CRITBOOSTED_USER_BUFF);
}
- bool IsMiniCritBoosted()
+ inline bool IsMiniCritBoosted()
{
return InCond(TF_COND_MINICRITBOOSTED_ON_KILL)
|| InCond(TF_COND_NOHEALINGDAMAGEBUFF)
@@ -384,14 +384,14 @@ public:
/*|| InCond(TF_COND_CRITBOOSTED_DEMO_CHARGE)*/;
}
- bool IsMarked()
+ inline bool IsMarked()
{
return InCond(TF_COND_URINE)
|| InCond(TF_COND_MARKEDFORDEATH)
|| InCond(TF_COND_MARKEDFORDEATH_SILENT);
}
- bool CanAttack()
+ inline bool CanAttack()
{
if (!IsAlive() || IsTaunting() || IsBonked() || IsAGhost() || IsInBumperKart() || m_fFlags() & FL_FROZEN)
return false;
@@ -424,34 +424,34 @@ public:
return true;
}
- CTFWeaponBase* GetWeaponFromSlot(int nSlot)
+ inline CTFWeaponBase* GetWeaponFromSlot(int nSlot)
{
static int nOffset = U::NetVars.GetNetVar("CBaseCombatCharacter", "m_hMyWeapons");
int hWeapon = *reinterpret_cast(reinterpret_cast(this) + nOffset + nSlot * 4);
return I::ClientEntityList->GetClientEntityFromHandle(hWeapon)->As();
}
- float TeamFortress_CalculateMaxSpeed(bool bIgnoreSpecialAbility = false)
+ inline float TeamFortress_CalculateMaxSpeed(bool bIgnoreSpecialAbility = false)
{
return S::TeamFortress_CalculateMaxSpeed.As()(this, bIgnoreSpecialAbility);
}
- void UpdateClientSideAnimation()
+ inline void UpdateClientSideAnimation()
{
S::CTFPlayer_UpdateClientSideAnimation.As()(this);
}
- float GetCritMult()
+ inline float GetCritMult()
{
return Math::RemapValClamped(static_cast(m_iCritMult()), 0.f, 255.f, 1.f, 4.f);
}
- void UpdateWearables()
+ inline void UpdateWearables()
{
S::CTFPlayer_UpdateWearables.As()(this);
}
- void ThirdPersonSwitch(/*bool bThirdperson*/)
+ inline void ThirdPersonSwitch(/*bool bThirdperson*/)
{
return reinterpret_cast(U::Memory.GetVFunc(this, 255))(this/*, bThirdperson*/);
};
diff --git a/Amalgam/src/SDK/Definitions/Main/CTFPlayerResource.h b/Amalgam/src/SDK/Definitions/Main/CTFPlayerResource.h
index 60696d4a..8d48e332 100644
--- a/Amalgam/src/SDK/Definitions/Main/CTFPlayerResource.h
+++ b/Amalgam/src/SDK/Definitions/Main/CTFPlayerResource.h
@@ -49,115 +49,115 @@ public:
NETVAR(m_iConnectionState, void*, "CTFPlayerResource", "m_iConnectionState");
NETVAR(m_flConnectTime, void*, "CTFPlayerResource", "m_flConnectTime");
- int GetPing(int idx)
+ inline int GetPing(int idx)
{
static int nOffset = U::NetVars.GetNetVar("CTFPlayerResource", "m_iPing");
return *reinterpret_cast(uintptr_t(this) + nOffset + idx * 4);
}
- int GetKills(int idx)
+ inline int GetKills(int idx)
{
static int nOffset = U::NetVars.GetNetVar("CTFPlayerResource", "m_iScore");
return *reinterpret_cast(uintptr_t(this) + nOffset + idx * 4);
}
- int GetDeaths(int idx)
+ inline int GetDeaths(int idx)
{
static int nOffset = U::NetVars.GetNetVar("CTFPlayerResource", "m_iDeaths");
return *reinterpret_cast(uintptr_t(this) + nOffset + idx * 4);
}
- bool GetConnected(int idx)
+ inline bool GetConnected(int idx)
{
static int nOffset = U::NetVars.GetNetVar("CTFPlayerResource", "m_bConnected");
return *reinterpret_cast(uintptr_t(this) + nOffset + idx);
}
- int GetTeam(int idx)
+ inline int GetTeam(int idx)
{
static int nOffset = U::NetVars.GetNetVar("CTFPlayerResource", "m_iTeam");
return *reinterpret_cast(uintptr_t(this) + nOffset + idx * 4);
}
- bool IsAlive(int idx)
+ inline bool IsAlive(int idx)
{
static int nOffset = U::NetVars.GetNetVar("CTFPlayerResource", "m_bAlive");
return *reinterpret_cast(uintptr_t(this) + nOffset + idx);
}
- int GetHealth(int idx)
+ inline int GetHealth(int idx)
{
static int nOffset = U::NetVars.GetNetVar("CTFPlayerResource", "m_iHealth");
return *reinterpret_cast(uintptr_t(this) + nOffset + idx * 4);
}
- unsigned GetAccountID(int idx)
+ inline unsigned GetAccountID(int idx)
{
static int nOffset = U::NetVars.GetNetVar("CTFPlayerResource", "m_iAccountID");
return *reinterpret_cast(uintptr_t(this) + nOffset + idx * 4);
}
- bool GetValid(int idx)
+ inline bool GetValid(int idx)
{
static int nOffset = U::NetVars.GetNetVar("CTFPlayerResource", "m_bValid");
return *reinterpret_cast(uintptr_t(this) + nOffset + idx);
}
- int GetUserID(int idx)
+ inline int GetUserID(int idx)
{
static int nOffset = U::NetVars.GetNetVar("CTFPlayerResource", "m_iUserID");
return *reinterpret_cast(uintptr_t(this) + nOffset + idx * 4);
}
- const char* GetPlayerName(int idx)
+ inline const char* GetPlayerName(int idx)
{
static int nOffset = U::NetVars.GetNetVar("CTFPlayerResource", "m_iPing") - 816;
return *reinterpret_cast(uintptr_t(this) + nOffset + idx * 8);
}
- int GetScore(int idx)
+ inline int GetScore(int idx)
{
static int nOffset = U::NetVars.GetNetVar("CTFPlayerResource", "m_iTotalScore");
return *reinterpret_cast(uintptr_t(this) + nOffset + idx * 4);
}
- int GetLevel(int idx)
+ inline int GetLevel(int idx)
{
static int nOffset = U::NetVars.GetNetVar("CTFPlayerResource", "m_iPlayerLevel");
return *reinterpret_cast(uintptr_t(this) + nOffset + idx * 4);
}
- int GetDamage(int idx)
+ inline int GetDamage(int idx)
{
static int nOffset = U::NetVars.GetNetVar("CTFPlayerResource", "m_iDamage");
return *reinterpret_cast(uintptr_t(this) + nOffset + idx * 4);
}
- int GetClass(int idx)
+ inline int GetClass(int idx)
{
static int nOffset = U::NetVars.GetNetVar("CTFPlayerResource", "m_iPlayerClass");
return *reinterpret_cast(uintptr_t(this) + nOffset + idx * 4);
}
- int GetMaxHealth(int idx)
+ inline int GetMaxHealth(int idx)
{
static int nOffset = U::NetVars.GetNetVar("CTFPlayerResource", "m_iMaxHealth");
return *reinterpret_cast(uintptr_t(this) + nOffset + idx * 4);
}
- int* GetStreaks(int idx)
+ inline int* GetStreaks(int idx)
{
static int nOffset = U::NetVars.GetNetVar("CTFPlayerResource", "m_iStreaks");
return reinterpret_cast(uintptr_t(this) + nOffset + idx * 4);
}
- float GetConnectionTime(int idx)
+ inline float GetConnectionTime(int idx)
{
static int nOffset = U::NetVars.GetNetVar("CTFPlayerResource", "m_flConnectTime");
return *reinterpret_cast(uintptr_t(this) + nOffset + idx * 4);
}
- float GetNextRespawnTime(int idx)
+ inline float GetNextRespawnTime(int idx)
{
static int nOffset = U::NetVars.GetNetVar("CTFPlayerResource", "m_flNextRespawnTime");
return *reinterpret_cast(uintptr_t(this) + nOffset + idx * 4);
diff --git a/Amalgam/src/SDK/Definitions/Main/CTFWeaponBase.h b/Amalgam/src/SDK/Definitions/Main/CTFWeaponBase.h
index 0af38326..e58f1e5f 100644
--- a/Amalgam/src/SDK/Definitions/Main/CTFWeaponBase.h
+++ b/Amalgam/src/SDK/Definitions/Main/CTFWeaponBase.h
@@ -204,17 +204,17 @@ public:
OFFSET(m_iWeaponMode, int, 996);
- float GetSwingRange(CBaseEntity* pLocal)
+ inline float GetSwingRange(CBaseEntity* pLocal)
{
return reinterpret_cast(U::Memory.GetVFunc(this, 455))(pLocal);
}
- float GetSwingRange()
+ inline float GetSwingRange()
{
return GetWeaponID() == TF_WEAPON_SWORD ? 72.f : 48.f;
}
- bool CanFireCriticalShot(bool bIsHeadshot = false)
+ inline bool CanFireCriticalShot(bool bIsHeadshot = false)
{
auto pOwner = m_hOwnerEntity().Get()->As();
if (!pOwner)
@@ -227,7 +227,7 @@ public:
return bReturn;
}
- bool CanPrimaryAttack()
+ inline bool CanPrimaryAttack()
{
auto pOwner = m_hOwnerEntity().Get()->As();
if (!pOwner)
@@ -237,7 +237,7 @@ public:
return m_flNextPrimaryAttack() <= flCurTime && pOwner->m_flNextAttack() <= flCurTime;
}
- bool CanSecondaryAttack()
+ inline bool CanSecondaryAttack()
{
auto pOwner = m_hOwnerEntity().Get()->As();
if (!pOwner)
@@ -247,7 +247,7 @@ public:
return m_flNextSecondaryAttack() <= flCurTime && pOwner->m_flNextAttack() <= flCurTime;
}
- bool HasPrimaryAmmoForShot()
+ inline bool HasPrimaryAmmoForShot()
{
if (IsEnergyWeapon())
return m_flEnergy() > 0.f;
@@ -266,73 +266,73 @@ public:
return nClip1 > 0;
}
- bool IsInReload()
+ inline bool IsInReload()
{
return m_bInReload() || m_iReloadMode() != 0;
}
- bool IsRapidFire()
+ inline bool IsRapidFire()
{
auto pWeaponInfo = GetWeaponInfo();
return pWeaponInfo && pWeaponInfo->GetWeaponData(0).m_bUseRapidFireCrits;
}
- bool CanHeadShot()
+ inline bool CanHeadShot()
{
return GetDamageType() & DMG_USE_HITLOCATIONS && CanFireCriticalShot(true);
}
- bool AmbassadorCanHeadshot()
+ inline bool AmbassadorCanHeadshot()
{
if ((m_iItemDefinitionIndex() == Spy_m_TheAmbassador || m_iItemDefinitionIndex() == Spy_m_FestiveAmbassador) && I::GlobalVars->curtime - m_flLastFireTime() <= 1.f)
return false;
return true;
}
- void GetProjectileFireSetup(void* pPlayer, Vector vecOffset, Vector* vecSrc, QAngle* angForward, bool bHitTeammates = true, float flEndDist = 2000.f)
+ inline void GetProjectileFireSetup(void* pPlayer, Vector vecOffset, Vector* vecSrc, QAngle* angForward, bool bHitTeammates = true, float flEndDist = 2000.f)
{
using fn = void(__fastcall*)(CTFWeaponBase*, void*, Vector, Vector*, QAngle*, bool, float);
reinterpret_cast(U::Memory.GetVFunc(this, 399))(this, pPlayer, vecOffset, vecSrc, angForward, bHitTeammates, flEndDist);
}
- void GetSpreadAngles(Vec3& out)
+ inline void GetSpreadAngles(Vec3& out)
{
S::CTFWeaponBase_GetSpreadAngles.As()(this, out);
}
- Vec3 GetSpreadAngles()
+ inline Vec3 GetSpreadAngles()
{
Vec3 vOut;
GetSpreadAngles(vOut);
return vOut;
}
- void UpdateAllViewmodelAddons()
+ inline void UpdateAllViewmodelAddons()
{
return S::CTFWeaponBase_UpdateAllViewmodelAddons.As()(this);
}
- float ApplyFireDelay(float flDelay)
+ inline float ApplyFireDelay(float flDelay)
{
return reinterpret_cast(U::Memory.GetVFunc(this, 407))(this, flDelay);
}
- bool CalcIsAttackCriticalHelperMelee()
+ inline bool CalcIsAttackCriticalHelperMelee()
{
return S::CTFWeaponBaseMelee_CalcIsAttackCriticalHelper.As()(this);
}
- bool CalcIsAttackCriticalHelper()
+ inline bool CalcIsAttackCriticalHelper()
{
return S::CTFWeaponBase_CalcIsAttackCriticalHelper.As()(this);
}
- CBaseAnimating* GetAppropriateWorldOrViewModel()
+ inline CBaseAnimating* GetAppropriateWorldOrViewModel()
{
return S::CTFWeaponBase_GetAppropriateWorldOrViewModel.As()(this);
}
- float GetWeaponSpread()
+ inline float GetWeaponSpread()
{
return S::CTFWeaponBaseGun_GetWeaponSpread.As()(this);
}
@@ -368,14 +368,14 @@ public:
NETVAR(m_hLastHealingTarget, EHANDLE, "CWeaponMedigun", "m_hLastHealingTarget");
NETVAR(m_flChargeLevel, float, "CWeaponMedigun", "m_flChargeLevel");
- int GetMedigunType()
+ inline int GetMedigunType()
{
int iMode = 0;
iMode = static_cast(SDK::AttribHookValue(static_cast(iMode), "set_weapon_mode", this));
return iMode;
}
- MedigunChargeTypes GetChargeType()
+ inline MedigunChargeTypes GetChargeType()
{
int iTmp = MEDIGUN_CHARGE_INVULN;
iTmp = static_cast(SDK::AttribHookValue(static_cast(iTmp), "set_charge_type", this));
@@ -386,7 +386,7 @@ public:
return MedigunChargeTypes(iTmp);
}
- medigun_resist_types_t GetResistType()
+ inline medigun_resist_types_t GetResistType()
{
int nCurrentActiveResist = (GetChargeType() - MEDIGUN_CHARGE_BULLET_RESIST);
nCurrentActiveResist = nCurrentActiveResist % MEDIGUN_NUM_RESISTS;
diff --git a/Amalgam/src/SDK/Definitions/Main/IClientEntity.h b/Amalgam/src/SDK/Definitions/Main/IClientEntity.h
index b2ac264e..b8e52b35 100644
--- a/Amalgam/src/SDK/Definitions/Main/IClientEntity.h
+++ b/Amalgam/src/SDK/Definitions/Main/IClientEntity.h
@@ -16,37 +16,37 @@ public:
virtual CMouthInfo* GetMouth(void) = 0;
virtual bool GetSoundSpatialization(SpatializationInfo_t& info) = 0;
- bool IsPlayer()
+ inline bool IsPlayer()
{
return GetClassID() == ETFClassID::CTFPlayer;
}
- bool IsSentrygun()
+ inline bool IsSentrygun()
{
return GetClassID() == ETFClassID::CObjectSentrygun;
}
- bool IsDispenser()
+ inline bool IsDispenser()
{
return GetClassID() == ETFClassID::CObjectDispenser;
}
- bool IsTeleporter()
+ inline bool IsTeleporter()
{
return GetClassID() == ETFClassID::CObjectTeleporter;
}
- bool IsBaseCombatWeapon()
+ inline bool IsBaseCombatWeapon()
{
return GetClassID() == ETFClassID::CBaseCombatWeapon;
}
- bool IsWearable()
+ inline bool IsWearable()
{
return GetClassID() == ETFClassID::CTFWearable;
}
- bool IsBuilding()
+ inline bool IsBuilding()
{
switch (GetClassID())
{
@@ -57,7 +57,7 @@ public:
}
}
- bool IsPickup()
+ inline bool IsPickup()
{
switch (GetClassID())
{
@@ -67,7 +67,7 @@ public:
}
}
- bool IsNPC()
+ inline bool IsNPC()
{
switch (GetClassID())
{
@@ -81,7 +81,7 @@ public:
}
}
- bool IsBomb()
+ inline bool IsBomb()
{
switch (GetClassID())
{
diff --git a/Amalgam/src/SDK/Definitions/Main/IClientNetworkable.h b/Amalgam/src/SDK/Definitions/Main/IClientNetworkable.h
index a0075d9a..525880cf 100644
--- a/Amalgam/src/SDK/Definitions/Main/IClientNetworkable.h
+++ b/Amalgam/src/SDK/Definitions/Main/IClientNetworkable.h
@@ -36,7 +36,7 @@ public:
virtual void SetDestroyedOnRecreateEntities(void) = 0;
virtual void OnDataUnchangedInPVS() = 0;
- ETFClassID GetClassID()
+ inline ETFClassID GetClassID()
{
if (auto pClientClass = GetClientClass())
return static_cast(pClientClass->m_ClassID);
diff --git a/Amalgam/src/Utils/NetVars/NetVars.h b/Amalgam/src/Utils/NetVars/NetVars.h
index d7c6175c..739abfcb 100644
--- a/Amalgam/src/Utils/NetVars/NetVars.h
+++ b/Amalgam/src/Utils/NetVars/NetVars.h
@@ -13,29 +13,29 @@ public:
ADD_FEATURE_CUSTOM(CNetVars, NetVars, U);
-#define NETVAR(_name, type, table, name) type& _name() \
+#define NETVAR(_name, type, table, name) inline type& _name() \
{ \
static int nOffset = U::NetVars.GetNetVar(table, name); \
return *reinterpret_cast(uintptr_t(this) + nOffset); \
}
-#define NETVAR_OFF(_name, type, table, name, offset) type& _name() \
+#define NETVAR_OFF(_name, type, table, name, offset) inline type& _name() \
{ \
static int nOffset = U::NetVars.GetNetVar(table, name) + offset; \
return *reinterpret_cast(uintptr_t(this) + nOffset); \
}
-#define OFFSET(name, type, offset) type& name() \
+#define OFFSET(name, type, offset) inline type& name() \
{ \
return *reinterpret_cast(uintptr_t(this) + offset); \
}
-#define VIRTUAL(name, type, fn, base, index) type name() \
+#define VIRTUAL(name, type, fn, base, index) inline type name() \
{ \
return reinterpret_cast(U::Memory.GetVFunc(base, index))(base); \
}
-#define CONDGET(name, conditions, cond) bool name() \
+#define CONDGET(name, conditions, cond) inline bool name() \
{ \
return (conditions & cond); \
}
\ No newline at end of file