Kamay Xutax
9d17d2252c
Now we can debug properly lag compensation for animations and make it more perfect without using the CUserCmd struct For now it's used to sync better with client but in theory this can be removed soon. There's a lot of work to do in anim layers too.
64 lines
1.5 KiB
C++
64 lines
1.5 KiB
C++
//========= Copyright Valve Corporation, All rights reserved. ============//
|
|
//
|
|
// Purpose:
|
|
//
|
|
// $NoKeywords: $
|
|
//
|
|
//=============================================================================//
|
|
|
|
#ifndef C_BASEANIMATINGOVERLAY_H
|
|
#define C_BASEANIMATINGOVERLAY_H
|
|
#pragma once
|
|
|
|
#include "c_baseanimating.h"
|
|
|
|
// For shared code.
|
|
#define CBaseAnimatingOverlay C_BaseAnimatingOverlay
|
|
|
|
|
|
class C_BaseAnimatingOverlay : public C_BaseAnimating
|
|
{
|
|
public:
|
|
DECLARE_CLASS( C_BaseAnimatingOverlay, C_BaseAnimating );
|
|
DECLARE_CLIENTCLASS();
|
|
DECLARE_PREDICTABLE();
|
|
DECLARE_INTERPOLATION();
|
|
|
|
|
|
C_BaseAnimatingOverlay();
|
|
|
|
virtual CStudioHdr *OnNewModel();
|
|
|
|
C_AnimationLayer* GetAnimOverlay( int i );
|
|
void SetNumAnimOverlays( int num ); // This makes sure there is space for this # of layers.
|
|
int GetNumAnimOverlays() const;
|
|
|
|
virtual void GetRenderBounds( Vector& theMins, Vector& theMaxs );
|
|
|
|
// model specific
|
|
virtual void AccumulateLayers( IBoneSetup &boneSetup, Vector pos[], Quaternion q[], float currentTime );
|
|
virtual void DoAnimationEvents( CStudioHdr *pStudioHdr );
|
|
virtual void GetSkeleton( CStudioHdr *pStudioHdr, Vector pos[], Quaternion q[], int boneMask, float currentTime );
|
|
|
|
enum
|
|
{
|
|
MAX_OVERLAYS = 15,
|
|
};
|
|
|
|
CUtlVector < C_AnimationLayer > m_AnimOverlay;
|
|
CUtlVector < CInterpolatedVar< C_AnimationLayer > > m_iv_AnimOverlay;
|
|
float m_flOverlayPrevEventCycle[ MAX_OVERLAYS ];
|
|
|
|
private:
|
|
C_BaseAnimatingOverlay( const C_BaseAnimatingOverlay & ); // not defined, not accessible
|
|
};
|
|
|
|
|
|
EXTERN_RECV_TABLE(DT_BaseAnimatingOverlay);
|
|
|
|
|
|
#endif // C_BASEANIMATINGOVERLAY_H
|
|
|
|
|
|
|
|
|