For now, made unhidden npc_sniper translate idle to proper gun-holding activity

This commit is contained in:
Blixibon 2021-11-05 22:18:20 -05:00
parent 447c185079
commit a6d5c079d3

View File

@ -250,6 +250,10 @@ public:
virtual int SelectSchedule( void ); virtual int SelectSchedule( void );
virtual int TranslateSchedule( int scheduleType ); virtual int TranslateSchedule( int scheduleType );
#ifdef MAPBASE
Activity NPC_TranslateActivity( Activity eNewActivity );
#endif
bool KeyValue( const char *szKeyName, const char *szValue ); bool KeyValue( const char *szKeyName, const char *szValue );
void PrescheduleThink( void ); void PrescheduleThink( void );
@ -2036,6 +2040,23 @@ int CProtoSniper::TranslateSchedule( int scheduleType )
return BaseClass::TranslateSchedule( scheduleType ); return BaseClass::TranslateSchedule( scheduleType );
} }
#ifdef MAPBASE
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
Activity CProtoSniper::NPC_TranslateActivity( Activity eNewActivity )
{
// ACT_IDLE is now just the soldier's unarmed idle animation.
// Use a gun-holding animation like what unhidden snipers were using before.
if (!HasSpawnFlags( SF_SNIPER_HIDDEN ) && eNewActivity == ACT_IDLE)
{
eNewActivity = ACT_IDLE_SMG1;
}
return BaseClass::NPC_TranslateActivity( eNewActivity );
}
#endif
//--------------------------------------------------------- //---------------------------------------------------------
//--------------------------------------------------------- //---------------------------------------------------------
void CProtoSniper::ScopeGlint() void CProtoSniper::ScopeGlint()