Skip to content

Commit

Permalink
zNPCGoalVillager: Match zNPCGoalBoyWeep::NPCMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
tgsm committed Sep 17, 2024
1 parent c611890 commit 4332449
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/SB/Game/zNPCGoalVillager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,15 +531,19 @@ S32 zNPCGoalBoyWeep::Enter(F32 dt, void* updCtxt)
return zNPCGoalCommon::Enter(dt, updCtxt);
}

// Equivalent: branching weirdness
S32 zNPCGoalBoyWeep::NPCMessage(NPCMsg* mail)
{
if (mail->msgid == NPC_MID_DAMAGE && mail->infotype == NPC_MDAT_DAMAGE &&
mail->dmgdata.dmg_type == DMGTYP_SIDE)
switch (mail->msgid)
{
ang_spinrate += 16.0f;
zNPCBalloonBoy* npc = (zNPCBalloonBoy*)psyche->clt_owner;
npc->SndPlayRandom(NPC_STYP_EXCLAIM);
case NPC_MID_DAMAGE:
if (mail->infotype == NPC_MDAT_DAMAGE && mail->dmgdata.dmg_type == DMGTYP_SIDE)
{
ang_spinrate += 16.0f;
zNPCBalloonBoy* npc = (zNPCBalloonBoy*)psyche->clt_owner;
npc->SndPlayRandom(NPC_STYP_EXCLAIM);
}
break;
}

return 0;
}

0 comments on commit 4332449

Please sign in to comment.