Skip to content

Commit

Permalink
zNPCGoalVillager: Minor improvements (#339)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgsm authored Aug 1, 2024
1 parent dd325c2 commit 67194d3
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/SB/Game/zNPCGoalVillager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ S32 zNPCGoalBoyRide::NPCMessage(NPCMsg* mail)
return handled;
}

// Equivalent(???)
// Equivalent: fnmsubs register order
S32 zNPCGoalBoyFall::Process(en_trantype* trantype, F32 dt, void* updCtxt, xScene* scene)
{
S32 nextgoal = 0;
Expand All @@ -518,10 +518,8 @@ S32 zNPCGoalBoyFall::Process(en_trantype* trantype, F32 dt, void* updCtxt, xScen
return nextgoal;
}

F32 fVar2 = -(dt * 10.0f - npc->frame->vel.y);
npc->frame->vel.y = (fVar2 > -4.0f) ? fVar2 : -4.0f;

npc->colFreq = (npc->colFreq < 0) ? npc->colFreq : 0;
npc->frame->vel.y = MAX(npc->frame->vel.y - dt * 10.0f, -4.0f);
npc->colFreq = MIN(npc->colFreq, 0);

return xGoal::Process(trantype, dt, updCtxt, NULL);
}
Expand Down

0 comments on commit 67194d3

Please sign in to comment.