Skip to content

Commit

Permalink
Fix unannotated fallthrough warnings
Browse files Browse the repository at this point in the history
#91
  • Loading branch information
SamVanheer committed Nov 28, 2021
1 parent c9f8080 commit bed2ed9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dlls/gargantua.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,7 @@ void CGargantua::StartTask(Task_t* pTask)
case TASK_DIE:
m_flWaitFinished = gpGlobals->time + 1.6;
DeathEffect();
// FALL THROUGH
[[fallthrough]];
default:
CBaseMonster::StartTask(pTask);
break;
Expand Down
1 change: 1 addition & 0 deletions dlls/hgrunt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,7 @@ void CHGrunt ::HandleAnimEvent(MonsterEvent_t* pEvent)
JustSpoke();
}
}
break;

default:
CSquadMonster::HandleAnimEvent(pEvent);
Expand Down
2 changes: 1 addition & 1 deletion dlls/monsters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2653,7 +2653,7 @@ void CBaseMonster ::HandleAnimEvent(MonsterEvent_t* pEvent)
case SCRIPT_EVENT_SENTENCE_RND1: // Play a named sentence group 33% of the time
if (RANDOM_LONG(0, 2) == 0)
break;
// fall through...
[[fallthrough]];
case SCRIPT_EVENT_SENTENCE: // Play a named sentence group
SENTENCEG_PlayRndSz(edict(), pEvent->options, 1.0, ATTN_IDLE, 0, 100);
break;
Expand Down
2 changes: 1 addition & 1 deletion dlls/talkmonster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ void CTalkMonster ::HandleAnimEvent(MonsterEvent_t* pEvent)
case SCRIPT_EVENT_SENTENCE_RND1: // Play a named sentence group 25% of the time
if (RANDOM_LONG(0, 99) < 75)
break;
// fall through...
[[fallthrough]];
case SCRIPT_EVENT_SENTENCE: // Play a named sentence group
ShutUpFriends();
PlaySentence(pEvent->options, RANDOM_FLOAT(2.8, 3.4), VOL_NORM, ATTN_IDLE);
Expand Down

0 comments on commit bed2ed9

Please sign in to comment.