Fix crashes caused by new tf2 update
This commit is contained in:
parent
06b3f0a116
commit
492a9eff4a
@ -23,12 +23,12 @@ public:
|
||||
inline static int GetSlot(IClientEntity *self)
|
||||
{
|
||||
typedef int (*fn_t)(IClientEntity *);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(395, offsets::undefined, 395), 0)(self);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(397, offsets::undefined, 397), 0)(self);
|
||||
}
|
||||
inline static const char *GetPrintName(IClientEntity *self)
|
||||
{
|
||||
typedef const char *(*fn_t)(IClientEntity *);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(398, offsets::undefined, 398), 0)(self);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(400, offsets::undefined, 400), 0)(self);
|
||||
}
|
||||
};
|
||||
} // namespace re
|
||||
|
@ -40,37 +40,37 @@ public:
|
||||
inline static int GetWeaponID(IClientEntity *self)
|
||||
{
|
||||
typedef int (*fn_t)(IClientEntity *);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(445, offsets::undefined, 445), 0)(self);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(447, offsets::undefined, 447), 0)(self);
|
||||
}
|
||||
inline static bool IsViewModelFlipped(IClientEntity *self)
|
||||
{
|
||||
typedef bool (*fn_t)(IClientEntity *);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(494, offsets::undefined, 494), 0)(self);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(496, offsets::undefined, 496), 0)(self);
|
||||
}
|
||||
inline static IClientEntity *GetOwnerViaInterface(IClientEntity *self)
|
||||
{
|
||||
typedef IClientEntity *(*fn_t)(IClientEntity *);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(452, offsets::undefined, 452), 0)(self);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(454, offsets::undefined, 454), 0)(self);
|
||||
}
|
||||
inline static bool UsesPrimaryAmmo(IClientEntity *self)
|
||||
{
|
||||
typedef bool (*fn_t)(IClientEntity *);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(448, offsets::undefined, 448), 0)(self);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(450, offsets::undefined, 450), 0)(self);
|
||||
}
|
||||
inline static bool HasPrimaryAmmo(IClientEntity *self)
|
||||
{
|
||||
typedef bool (*fn_t)(IClientEntity *);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(317, offsets::undefined, 317), 0)(self);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(319, offsets::undefined, 319), 0)(self);
|
||||
}
|
||||
inline static bool AreRandomCritsEnabled(IClientEntity *self)
|
||||
{
|
||||
typedef bool (*fn_t)(IClientEntity *);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(467, offsets::undefined, 467), 0)(self);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(469, offsets::undefined, 469), 0)(self);
|
||||
}
|
||||
inline static bool CalcIsAttackCriticalHelper(IClientEntity *self)
|
||||
{
|
||||
typedef bool (*fn_t)(IClientEntity *);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(461, offsets::undefined, 461), 0)(self);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(463, offsets::undefined, 463), 0)(self);
|
||||
}
|
||||
inline static bool CalcIsAttackCriticalHelperNoCrits(IClientEntity *self)
|
||||
{
|
||||
@ -80,7 +80,7 @@ public:
|
||||
inline static bool CanFireCriticalShot(IClientEntity *self, bool unknown1, IClientEntity *unknown2)
|
||||
{
|
||||
typedef bool (*fn_t)(IClientEntity *, bool, IClientEntity *);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(490, offsets::undefined, 490), 0)(self, unknown1, unknown2);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(492, offsets::undefined, 492), 0)(self, unknown1, unknown2);
|
||||
}
|
||||
inline static float ApplyFireDelay(IClientEntity *self, float delay)
|
||||
{
|
||||
|
@ -18,22 +18,22 @@ public:
|
||||
inline static float GetProjectileSpeed(IClientEntity *self)
|
||||
{
|
||||
typedef float (*fn_t)(IClientEntity *);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(535, offsets::undefined, 535), 0)(self);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(537, offsets::undefined, 537), 0)(self);
|
||||
}
|
||||
inline static float GetWeaponSpread(IClientEntity *self)
|
||||
{
|
||||
typedef float (*fn_t)(IClientEntity *);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(533, offsets::undefined, 533), 0)(self);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(535, offsets::undefined, 535), 0)(self);
|
||||
}
|
||||
inline static float GetProjectileGravity(IClientEntity *self)
|
||||
{
|
||||
typedef float (*fn_t)(IClientEntity *);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(536, offsets::undefined, 536), 0)(self);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(538, offsets::undefined, 538), 0)(self);
|
||||
}
|
||||
inline static int LaunchGrenade(IClientEntity *self)
|
||||
{
|
||||
typedef int (*fn_t)(IClientEntity *);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(549, offsets::undefined, 549), 0)(self);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(551, offsets::undefined, 551), 0)(self);
|
||||
}
|
||||
};
|
||||
} // namespace re
|
||||
|
@ -18,7 +18,7 @@ public:
|
||||
inline static bool DoSwingTrace(IClientEntity *self, trace_t *trace)
|
||||
{
|
||||
typedef bool (*fn_t)(IClientEntity *, trace_t *);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(523, offsets::undefined, 523), 0)(self, trace);
|
||||
return vfunc<fn_t>(self, offsets::PlatformOffset(525, offsets::undefined, 525), 0)(self, trace);
|
||||
}
|
||||
inline static int GetSwingRange(IClientEntity *self)
|
||||
{
|
||||
@ -36,7 +36,7 @@ public:
|
||||
}
|
||||
}
|
||||
typedef int (*fn_t)(IClientEntity *);
|
||||
int return_value = vfunc<fn_t>(self, offsets::PlatformOffset(521, offsets::undefined, 521), 0)(self);
|
||||
int return_value = vfunc<fn_t>(self, offsets::PlatformOffset(523, offsets::undefined, 523), 0)(self);
|
||||
|
||||
if (add_charging)
|
||||
{
|
||||
|
Reference in New Issue
Block a user