Skip to content

Commit

Permalink
NPCR logic fix
Browse files Browse the repository at this point in the history
Found a problem with shamblers swatting props then refusing to move. Tracked it here.

May help #316
  • Loading branch information
TotallyMehis committed Jul 6, 2020
1 parent 11b11e5 commit 7e49e97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mp/src/game/server/npcr/npcr_schedule.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ namespace NPCR
ScheduleState_t Intercept( CSchedule<NPCRChar>* sched, const char* szReason = "" )
{
// Bad practice if we attempt this more than once... or a bug.
if ( IsIntercepted() )
if ( !IsRunning() )
{
AssertMsg( 0, szReason );
return SCHED_INTERCEPTED;
return m_State;
}

Assert( sched != nullptr );
Expand Down Expand Up @@ -177,7 +177,7 @@ namespace NPCR
void End( const char* szReason = "" )
{
// Bad practice if we attempt this more than once... or a bug.
if ( IsDone() )
if ( !IsRunning() )
{
AssertMsg( 0, szReason );
return;
Expand Down

0 comments on commit 7e49e97

Please sign in to comment.