2022-04-30 18:59:55 +02:00
|
|
|
//=============================================================================//
|
|
|
|
//
|
|
|
|
// Purpose:
|
|
|
|
//
|
|
|
|
// $NoKeywords: $
|
|
|
|
//=============================================================================//
|
|
|
|
#include "core/stdafx.h"
|
2022-08-09 17:18:07 +02:00
|
|
|
#include "public/studio.h"
|
2022-04-30 18:59:55 +02:00
|
|
|
#include "game/shared/animation.h"
|
|
|
|
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
int CStudioHdr::LookupSequence(CStudioHdr* pStudio, const char* pszName)
|
|
|
|
{
|
2023-02-13 23:47:12 +01:00
|
|
|
if (!pStudio->m_pMDLCache)
|
2022-04-30 18:59:55 +02:00
|
|
|
return -1; // animations are unavailable for missing dynamic props! (mdl/error.rmdl).
|
|
|
|
|
|
|
|
return v_CStudioHdr__LookupSequence(pStudio, pszName);
|
|
|
|
}
|
|
|
|
|
2023-01-25 02:26:52 +01:00
|
|
|
void VAnimation::Attach() const
|
2022-04-30 18:59:55 +02:00
|
|
|
{
|
2023-01-25 02:26:52 +01:00
|
|
|
DetourAttach(&v_CStudioHdr__LookupSequence, &CStudioHdr::LookupSequence);
|
2022-04-30 18:59:55 +02:00
|
|
|
}
|
|
|
|
|
2023-01-25 02:26:52 +01:00
|
|
|
void VAnimation::Detach() const
|
2022-04-30 18:59:55 +02:00
|
|
|
{
|
2023-01-25 02:26:52 +01:00
|
|
|
DetourDetach(&v_CStudioHdr__LookupSequence, &CStudioHdr::LookupSequence);
|
2022-04-30 18:59:55 +02:00
|
|
|
}
|