ReGameDLL_CS/regamedll/dlls/animating.cpp
s1lentq 5bf6b21649 Added a new reverse the functions.
Implemented recovery a virtual table in GetClassPtr<BasClass> after linking of self class.
2015-08-03 00:17:07 +06:00

244 lines
6.2 KiB
C++

#include "precompiled.h"
/*
* Globals initialization
*/
#ifndef HOOK_GAMEDLL
TYPEDESCRIPTION CBaseAnimating::m_SaveData[] =
{
DEFINE_FIELD(CBaseMonster, m_flFrameRate, FIELD_FLOAT),
DEFINE_FIELD(CBaseMonster, m_flGroundSpeed, FIELD_FLOAT),
DEFINE_FIELD(CBaseMonster, m_flLastEventCheck, FIELD_TIME),
DEFINE_FIELD(CBaseMonster, m_fSequenceFinished, FIELD_BOOLEAN),
DEFINE_FIELD(CBaseMonster, m_fSequenceLoops, FIELD_BOOLEAN),
};
#else
TYPEDESCRIPTION (*CBaseAnimating::pm_SaveData)[5];
#endif // HOOK_GAMEDLL
/* <10583> ../cstrike/dlls/animating.cpp:38 */
IMPLEMENT_SAVERESTORE(CBaseAnimating, CBaseDelay);
/* <105cf> ../cstrike/dlls/animating.cpp:45 */
float CBaseAnimating::StudioFrameAdvance(float flInterval)
{
if (flInterval == 0.0f)
{
flInterval = gpGlobals->time - pev->animtime;
if (flInterval <= 0.001)
{
pev->animtime = gpGlobals->time;
return 0;
}
}
if (pev->animtime == 0.0f)
flInterval = 0;
pev->frame += flInterval * m_flFrameRate * pev->framerate;
pev->animtime = gpGlobals->time;
if (pev->frame < 0.0 || pev->frame >= 256.0)
{
if (m_fSequenceLoops)
pev->frame -= (int)(pev->frame / 256.0) * 256.0;
else
pev->frame = (pev->frame < 0) ? 0 : 255;
m_fSequenceFinished = TRUE;
}
return flInterval;
}
/* <10605> ../cstrike/dlls/animating.cpp:77 */
int CBaseAnimating::LookupActivity(int activity)
{
void *pmodel = GET_MODEL_PTR(ENT(pev));
return ::LookupActivity(pmodel, pev, activity);
}
/* <10653> ../cstrike/dlls/animating.cpp:91 */
NOBODY int CBaseAnimating::LookupActivityHeaviest(int activity)
{
// {
// void *pmodel; // 93
// }
}
/* <107b1> ../cstrike/dlls/animating.cpp:136 */
NOBODY void CBaseAnimating::DispatchAnimEvents(float flInterval)
{
// {
// MonsterEvent_t event; // 138
// void *pmodel; // 140
// float flStart; // 152
// float flEnd; // 153
// int index; // 160
// }
}
/* <106a1> ../cstrike/dlls/animating.cpp:100 */
int CBaseAnimating::LookupSequence(const char *label)
{
void *pmodel = GET_MODEL_PTR(ENT(pev));
return ::LookupSequence(pmodel, label);
}
/* <10711> ../cstrike/dlls/animating.cpp:110 */
void CBaseAnimating::ResetSequenceInfo(void)
{
void *pmodel = GET_MODEL_PTR(ENT(pev));
GetSequenceInfo(pmodel, pev, &m_flFrameRate, &m_flGroundSpeed);
m_fSequenceLoops = ((GetSequenceFlags() & STUDIO_LOOPING) != 0);
pev->animtime = gpGlobals->time;
pev->framerate = 1.0f;
m_fSequenceFinished = FALSE;
m_flLastEventCheck = gpGlobals->time;
}
/* <1077c> ../cstrike/dlls/animating.cpp:126 */
BOOL CBaseAnimating::GetSequenceFlags(void)
{
void *pmodel = GET_MODEL_PTR(ENT(pev));
return ::GetSequenceFlags(pmodel, pev);
}
/* <10837> ../cstrike/dlls/animating.cpp:171 */
float CBaseAnimating::SetBoneController(int iController, float flValue)
{
void *pmodel = GET_MODEL_PTR( ENT(pev) );
return SetController(pmodel, pev, iController, flValue);
}
/* <10893> ../cstrike/dlls/animating.cpp:180 */
void CBaseAnimating::InitBoneControllers(void)
{
void *pmodel = GET_MODEL_PTR(ENT(pev));
SetController(pmodel, pev, 0, 0);
SetController(pmodel, pev, 1, 0);
SetController(pmodel, pev, 2, 0);
SetController(pmodel, pev, 3, 0);
}
/* <108d3> ../cstrike/dlls/animating.cpp:192 */
NOBODY float CBaseAnimating::SetBlending(int iBlender, float flValue)
{
// {
// void *pmodel; // 194
// }
}
/* <1092f> ../cstrike/dlls/animating.cpp:201 */
NOBODY void CBaseAnimating::GetBonePosition(int iBone, Vector &origin, Vector &angles)
{
}
/* <10984> ../cstrike/dlls/animating.cpp:208 */
NOBODY void CBaseAnimating::GetAttachment(int iAttachment, Vector &origin, Vector &angles)
{
}
/* <109d4> ../cstrike/dlls/animating.cpp:215 */
NOBODY int CBaseAnimating::FindTransition(int iEndingSequence, int iGoalSequence, int *piDir)
{
// {
// void *pmodel; // 217
// {
// int iDir; // 221
// int sequence; // 222
// }
// }
}
/* <10a5d> ../cstrike/dlls/animating.cpp:234 */
NOXREF void CBaseAnimating::GetAutomovement(Vector &origin, Vector &angles, float flInterval)
{
}
/* <10aad> ../cstrike/dlls/animating.cpp:239 */
NOBODY void CBaseAnimating::SetBodygroup(int iGroup, int iValue)
{
}
/* <10af0> ../cstrike/dlls/animating.cpp:244 */
NOBODY int CBaseAnimating::GetBodygroup(int iGroup)
{
}
/* <10b5f> ../cstrike/dlls/animating.cpp:250 */
NOBODY int CBaseAnimating::ExtractBbox(int sequence, float *mins, float *maxs)
{
}
/* <10b99> ../cstrike/dlls/animating.cpp:258 */
NOBODY void CBaseAnimating::SetSequenceBox(void)
{
// {
// class Vector mins; // 260
// class Vector maxs; // 260
// ExtractBbox(CBaseAnimating *const this,
// int sequence,
// float *mins,
// float *maxs); // 263
// {
// float yaw; // 267
// class Vector xvector; // 269
// class Vector yvector; // 269
// class Vector bounds; // 274
// class Vector rmin; // 279
// class Vector rmax; // 280
// class Vector base; // 281
// class Vector transformed; // 281
// Vector(Vector *const this,
// float X,
// float Y,
// float Z); // 280
// Vector(Vector *const this,
// float X,
// float Y,
// float Z); // 279
// {
// int i; // 283
// {
// int j; // 286
// {
// int k; // 289
// {
// int l; // 298
// }
// }
// }
// }
// }
// }
}
#ifdef HOOK_GAMEDLL
int CBaseAnimating::Save(CSave &save)
{
return Save_(save);
}
int CBaseAnimating::Restore(CRestore &restore)
{
return Restore_(restore);
}
//void CBaseAnimating::HandleAnimEvent(MonsterEvent_t *pEvent)
//{
// HandleAnimEvent_(pEvent);
//}
#endif // HOOK_GAMEDLL