Added various misc. stubs and utility code from the Alien Swarm SDK

This commit is contained in:
Blixibon
2021-05-11 10:45:48 -05:00
parent 051a217670
commit 6392d9ab7c
5 changed files with 24 additions and 2 deletions
+2 -1
View File
@@ -667,6 +667,7 @@ public:
virtual bool ShouldAlwaysThink();
void ForceGatherConditions() { m_bForceConditionsGather = true; SetEfficiency( AIE_NORMAL ); } // Force an NPC out of PVS to call GatherConditions on next think
bool IsForceGatherConditionsSet() { return m_bForceConditionsGather; }
virtual float LineOfSightDist( const Vector &vecDir = vec3_invalid, float zEye = FLT_MAX );
@@ -960,7 +961,7 @@ public:
void RemoveSleepFlags( int flags ) { m_SleepFlags &= ~flags; }
bool HasSleepFlags( int flags ) { return (m_SleepFlags & flags) == flags; }
void UpdateSleepState( bool bInPVS );
virtual void UpdateSleepState( bool bInPVS );
virtual void Wake( bool bFireOutput = true );
#ifdef MAPBASE
// A version of Wake() that takes an activator
+5
View File
@@ -506,6 +506,11 @@ void CBaseAnimating::StudioFrameAdvanceInternal( CStudioHdr *pStudioHdr, float f
float flNewCycle = GetCycle() + flCycleDelta;
if (flNewCycle < 0.0 || flNewCycle >= 1.0)
{
if (flNewCycle >= 1.0f)
{
ReachedEndOfSequence();
}
if (m_bSequenceLoops)
{
flNewCycle -= (int)(flNewCycle);
+1
View File
@@ -84,6 +84,7 @@ public:
virtual void StudioFrameAdvance(); // advance animation frame to some time in the future
void StudioFrameAdvanceManual( float flInterval );
bool IsValidSequence( int iSequence );
virtual void ReachedEndOfSequence() { return; }
inline float GetPlaybackRate();
inline void SetPlaybackRate( float rate );