mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-19 20:16:10 +08:00
Added original SDK code for Alien Swarm.
This commit is contained in:
31
game/server/actanimating.cpp
Normal file
31
game/server/actanimating.cpp
Normal file
@ -0,0 +1,31 @@
|
||||
//========= Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//
|
||||
//=============================================================================//
|
||||
#include "cbase.h"
|
||||
#include "actanimating.h"
|
||||
#include "animation.h"
|
||||
#include "activitylist.h"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
BEGIN_DATADESC( CActAnimating )
|
||||
DEFINE_CUSTOM_FIELD( m_Activity, ActivityDataOps() ),
|
||||
END_DATADESC()
|
||||
|
||||
|
||||
void CActAnimating::SetActivity( Activity act )
|
||||
{
|
||||
int sequence = SelectWeightedSequence( act );
|
||||
if ( sequence != ACTIVITY_NOT_AVAILABLE )
|
||||
{
|
||||
ResetSequence( sequence );
|
||||
m_Activity = act;
|
||||
SetCycle( 0 );
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user