gone
-
Автор темы
- #1
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
C++:
bool RebuiltSetupBones (CCSPlayer * m_pPlayer)
{
float m_flCurtime = g_pGameGlobals-> m_flCurtime;
float m_flFrametime = g_pGameGlobals-> m_flFrametime;
float m_flAbsFrametime = g_pGameGlobals-> m_flAbsFrametime;
int m_iNextSimTick = m_pPlayer-> m_flSimulationTime () / g_pGameGlobals-> m_flIntervalPerTick + 1;
int m_nFrames = g_pGameGlobals-> m_nFrames;
int m_nTicks = g_pGameGlobals-> m_nTicks;
g_pGameGlobals-> m_flCurtime = m_pPlayer-> m_flSimulationTime ();
g_pGameGlobals-> m_flFrametime = g_pGameGlobals-> m_flIntervalPerTick;
g_pGameGlobals-> m_flAbsFrametime = g_pGameGlobals-> m_flIntervalPerTick;
g_pGameGlobals-> m_nFrames = m_iNextSimTick;
g_pGameGlobals-> m_nTicks = m_iNextSimTick;
auto m_unkBoneMask = m_pPlayer-> GetBoneMask ();
auto m_fBackupEffects = m_pPlayer-> m_fEffects ();
m_pPlayer-> m_fEffects () | = 8;
bool m_bResult = g_pViolanes-> Game-> CallFunc (_STR ("o_SetupBones"));
m_pPlayer-> m_fEffects () = m_fBackupEffects;
m_pPlayer-> GetBoneMask () = m_unkBoneMask;
g_pGameGlobals-> m_flCurtime = m_flCurtime;
g_pGameGlobals-> m_flFrametime = m_flFrametime;
g_pGameGlobals-> m_flAbsFrametime = m_flAbsFrametime;
g_pGameGlobals-> m_nFrames = m_nFrames;
g_pGameGlobals-> m_nTicks = m_nTicks;
}
void InvalidateBoneCache (CCSPlayer * m_pPlayer, int m_iBoneCounter)
{
* (size_t *) ((uintptr_t) m_pPlayer + 0x2924) = -FLT_MAX;
* (size_t *) ((uintptr_t) m_pPlayer + 0x2690) = m_iBoneCounter - 1;
}
void FixLocalBones (CCSPlayer * m_pPlayer, bool m_bSwap, float m_flPoseParam, bool * m_pbResult, bool * m_pbResult2)
{
if (! m_pPlayer-> IsAlive ())
return;
CAnimationLayers * m_pAnimLayers = m_pPlayer-> GetAnimationLayers ();
float m_flBackupCycle = m_pAnimLayers [3] .m_flCycle;
float m_flBackupWeight = m_pAnimLayers [3] .m_flWeight;
if ((m_pPlayer-> m_fFlags () & FLAGS :: PLAYER :: ON_GROUND) && m_flPoseParam <0.1f)
{
if (m_pPlayer-> GetSequenceActivity (m_pAnimLayers [3] .m_nSequence) == 979)
{
m_pAnimLayers [3] .m_flCycle = 0.f;
m_pAnimLayers [3] .m_flWeight = 0.f;
}
}
g_pViolanes-> Cheat-> Velocity-> g_bOverrideModifier = true;
m_flPoseParam = * (float *) (m_pPlayer-> m_flPoseParam () + 0x30);
if (m_bSwap)
{
m_pPlayer-> SetVecOrigin (m_pPlayer-> m_vecOrigin ());
InvalidateBoneCache (m_pPlayer, m_dwBoneCounterAddr + 10);
* m_pbResult = RebuiltSetupBones (m_pPlayer);
m_pPlayer-> SetVecOrigin (m_pPlayer-> m_vecOrigin ());
}
* (float *) (m_pPlayer-> m_flPoseParam () + 0x30) = m_flPoseParam;
InvalidateBoneCache (m_pPlayer, m_dwBoneCounterAddr + 10);
* m_pbResult2 = RebuiltSetupBones (m_pPlayer);
g_pViolanes-> Cheat-> Velocity-> g_bOverrideModifier = false;
m_pAnimLayers [3] .m_flCycle = m_flBackupCycle;
m_pAnimLayers [3] .m_flWeight = m_flBackupWeight;
}