Skip to content

Commit 92cfc6b

Browse files
committed
bodyprog: fixup charaId switch
switch condition was `- 1` because the switch cases began at 1/Chara_Harry instead of 0, so guess compiler offsets condition to let case 1 act as case 0
1 parent e24b141 commit 92cfc6b

1 file changed

Lines changed: 12 additions & 13 deletions

File tree

src/bodyprog/bodyprog_80055028.c

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2896,20 +2896,19 @@ s32 func_80069BA8(s_800C4590* arg0, VECTOR3* pos, s_SubCharacter* chara, s32 arg
28962896
}
28972897
}
28982898

2899-
temp_v0 = chara->model_0.charaId_0 - 1; // TODO: Why `- 1`??
2900-
switch (temp_v0)
2899+
switch (chara->model_0.charaId_0)
29012900
{
2902-
case 0:
2903-
case 3:
2904-
case 4:
2905-
case 5:
2906-
case 6:
2907-
case 7:
2908-
case 8:
2909-
case 10:
2910-
case 11:
2911-
case 15:
2912-
case 17:
2901+
case Chara_Harry:
2902+
case Chara_Groaner:
2903+
case Chara_Wormhead:
2904+
case Chara_LarvalStalker:
2905+
case Chara_Stalker:
2906+
case Chara_GreyChild:
2907+
case Chara_Mumbler:
2908+
case Chara_Creaper:
2909+
case Chara_Romper:
2910+
case Chara_PuppetNurse:
2911+
case Chara_PuppetDoctor:
29132912
wallBound = chara->position_18.vy - WALL_HEIGHT;
29142913

29152914
switch (arg0->field_14)

0 commit comments

Comments
 (0)