Skip to content

Commit c991544

Browse files
committed
fix: Added default breaks in cases for model hooks
1 parent 873658a commit c991544

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

sdk.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ const char* __cdecl GetBallBotModel_hook(const bool bLowRes)
3232
{
3333
case (PORTAL_STORIES_MEL):
3434
return "models/portal_stories/player/mel.mdl";
35+
default:
36+
break;
3537
}
3638

3739
return GetBallBotModel_orig(bLowRes);
@@ -44,6 +46,8 @@ const char* __cdecl GetEggBotModel_hook(const bool bLowRes)
4446
{
4547
case (PORTAL_STORIES_MEL):
4648
return "models/player/chell/player.mdl";
49+
default:
50+
break;
4751
}
4852

4953
return GetEggBotModel_orig(bLowRes);
@@ -57,8 +61,9 @@ const char* __fastcall CPortal_Player__GetPlayerModelName_hook(CPortal_Player* t
5761
case (PORTAL_STORIES_MEL):
5862
if (CBaseEntity__GetTeamNumber(reinterpret_cast<CBasePlayer*>(thisptr)) == TEAM_BLUE)
5963
return "models/portal_stories/player/mel.mdl";
60-
else
61-
return "models/player/chell/player.mdl";
64+
return "models/player/chell/player.mdl";
65+
default:
66+
break;
6267
}
6368
return CPortal_Player__GetPlayerModelName_orig(thisptr);
6469
}

0 commit comments

Comments
 (0)