| 1740 | } |
| 1741 | |
| 1742 | static U32 BbowlCB(xAnimTransition* tran, xAnimSingle* anim, void* param_3) |
| 1743 | { |
| 1744 | zEntPlayer_SNDPlay(ePlayerSnd_BowlWindup, 0.0f); |
| 1745 | zEntPlayer_SNDStop(ePlayerSnd_SlipLoop); |
| 1746 | |
| 1747 | xEntFrame* frame = globals.player.ent.frame; |
| 1748 | F32 x = (frame->mat.pos.x - frame->oldmat.pos.x) * last_update_dt; |
| 1749 | F32 z = (frame->mat.pos.z - frame->oldmat.pos.z) * last_update_dt; |
| 1750 | F32 speed2 = x * x + z * z; |
| 1751 | |
| 1752 | if (speed2 < globals.player.g.BubbleBowlMinSpeed * globals.player.g.BubbleBowlMinSpeed) |
| 1753 | { |
| 1754 | globals.player.bbowlInitVel = globals.player.g.BubbleBowlMinSpeed; |
| 1755 | } |
| 1756 | else |
| 1757 | { |
| 1758 | globals.player.bbowlInitVel = xsqrt(speed2); |
| 1759 | } |
| 1760 | |
| 1761 | frame->vel.x = globals.player.bbowlInitVel * globals.player.ent.model->Mat->at.x; |
| 1762 | frame->vel.z = globals.player.bbowlInitVel * globals.player.ent.model->Mat->at.z; |
| 1763 | |
| 1764 | sShouldBubbleBowl = 0; |
| 1765 | globals.player.IsBubbleBowling = 1; |
| 1766 | sBubbleBowlTimer = 0.0f; |
| 1767 | sBubbleBowlLastWindupTime = -1.0f; |
| 1768 | |
| 1769 | return 0; |
| 1770 | } |
| 1771 | |
| 1772 | static U32 BbowlWindupEndCheck(xAnimTransition* tran, xAnimSingle* anim, void* param_3) |
| 1773 | { |
nothing calls this directly
no test coverage detected