//----------------------------------------------------------------------------- // Purpose: // Input: // Output: //----------------------------------------------------------------------------- void CASW_Ranger::BuildScheduleTestBits() { // Ignore damage if we were recently damaged or we're attacking. if ( GetActivity() == ACT_MELEE_ATTACK1 ) { ClearCustomInterruptCondition( COND_LIGHT_DAMAGE ); ClearCustomInterruptCondition( COND_HEAVY_DAMAGE ); } BaseClass::BuildScheduleTestBits(); }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CNPC_Monk::BuildScheduleTestBits( void ) { // FIXME: we need a way to make scenes non-interruptible if ( IsCurSchedule( SCHED_RANGE_ATTACK1 ) || IsCurSchedule( SCHED_SCENE_SEQUENCE ) || IsCurSchedule( SCHED_SCENE_WALK ) ) { ClearCustomInterruptCondition( COND_LIGHT_DAMAGE ); ClearCustomInterruptCondition( COND_HEAVY_DAMAGE ); ClearCustomInterruptCondition( COND_NEW_ENEMY ); ClearCustomInterruptCondition( COND_HEAR_DANGER ); } }
//----------------------------------------------------------------------------- // Purpose: Allows for modification of the interrupt mask for the current schedule. // In the most cases the base implementation should be called first. //----------------------------------------------------------------------------- void CNPC_PoisonZombie::BuildScheduleTestBits( void ) { BaseClass::BuildScheduleTestBits(); if ( IsCurSchedule( SCHED_CHASE_ENEMY ) ) { SetCustomInterruptCondition( COND_LIGHT_DAMAGE ); SetCustomInterruptCondition( COND_HEAVY_DAMAGE ); } else if ( IsCurSchedule( SCHED_RANGE_ATTACK1 ) || IsCurSchedule( SCHED_RANGE_ATTACK2 ) ) { ClearCustomInterruptCondition( COND_LIGHT_DAMAGE ); ClearCustomInterruptCondition( COND_HEAVY_DAMAGE ); } }
//----------------------------------------------------------------------------- // TASK_RANGE_ATTACK1 //----------------------------------------------------------------------------- void CAI_BaseHumanoid::BuildScheduleTestBits( ) { BaseClass::BuildScheduleTestBits(); if ( CapabilitiesGet() & bits_CAP_USE_SHOT_REGULATOR ) { if ( GetShotRegulator()->IsInRestInterval() ) { ClearCustomInterruptCondition( COND_CAN_RANGE_ATTACK1 ); } } }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CFastZombie::BuildScheduleTestBits( void ) { // Any schedule that makes us climb should break if we touch player if ( GetActivity() == ACT_CLIMB_UP || GetActivity() == ACT_CLIMB_DOWN ) { SetCustomInterruptCondition( COND_FASTZOMBIE_CLIMB_TOUCH ); } else { ClearCustomInterruptCondition( COND_FASTZOMBIE_CLIMB_TOUCH ); } }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CNPC_Monk::BuildScheduleTestBits( void ) { // FIXME: we need a way to make scenes non-interruptible #if 0 if ( IsCurSchedule( SCHED_RANGE_ATTACK1 ) || IsCurSchedule( SCHED_SCENE_GENERIC ) ) { ClearCustomInterruptCondition( COND_LIGHT_DAMAGE ); ClearCustomInterruptCondition( COND_HEAVY_DAMAGE ); ClearCustomInterruptCondition( COND_NEW_ENEMY ); ClearCustomInterruptCondition( COND_HEAR_DANGER ); } #endif // Don't interrupt while shooting the gun const Task_t* pTask = GetTask(); if ( pTask && (pTask->iTask == TASK_RANGE_ATTACK1) ) { ClearCustomInterruptCondition( COND_HEAVY_DAMAGE ); ClearCustomInterruptCondition( COND_ENEMY_OCCLUDED ); ClearCustomInterruptCondition( COND_HEAR_DANGER ); ClearCustomInterruptCondition( COND_WEAPON_BLOCKED_BY_FRIEND ); ClearCustomInterruptCondition( COND_WEAPON_SIGHT_OCCLUDED ); } }