local ffi = require "ffi";
ffi.cdef [[
typedef struct {
char pad_0000[20];
int m_nOrder;
int m_nSequence;
float m_flPrevCycle;
float m_flWeight;
float m_flWeightDeltaRate;
float m_flPlaybackRate;
float m_flCycle;
void *m_pOwner;
char pad_0038[4];
} CAnimationLayer_t;
]]
events.post_update_clientside_animation:set(function ()
local me = entity.get_local_player();
if not me or not me:is_alive() then
return
end
local layers = ffi.cast("CAnimationLayer_t**", ffi.cast("uintptr_t", me[0]) + 0x2990)[0];
-- add in air check
layers[6].m_flWeight = 5;
end)