| 11732 | } |
| 11733 | |
| 11734 | void cFodder::Sprite_Handle_Player_Rank(sSprite* pSprite) { |
| 11735 | sSprite* Data24 = mSquad_Leader; |
| 11736 | int16 Data4, Data0; |
| 11737 | |
| 11738 | if (mSquad_Selected < 0) |
| 11739 | goto loc_1AF63; |
| 11740 | |
| 11741 | if (Data24 == INVALID_SPRITE_PTR) |
| 11742 | goto loc_1AF63; |
| 11743 | |
| 11744 | if (!mPhase_Completed_Timer) { |
| 11745 | Data4 = mSquad_Selected; |
| 11746 | |
| 11747 | if (mSquad_Walk_Target_Steps[Data4]) |
| 11748 | goto loc_1AF63; |
| 11749 | } |
| 11750 | |
| 11751 | // No rank for non human soldiers, or if they're sinking |
| 11752 | if (Data24->field_18 != eSprite_Player || Data24->field_5B) |
| 11753 | goto loc_1AE64; |
| 11754 | |
| 11755 | if (!Data24->field_38) |
| 11756 | goto loc_1AE76; |
| 11757 | |
| 11758 | if (Data24->field_38 >= eSprite_Anim_Slide1) |
| 11759 | goto loc_1AE76; |
| 11760 | |
| 11761 | loc_1AE64:; |
| 11762 | sub_305D5(Data24); |
| 11763 | goto loc_1AF63; |
| 11764 | |
| 11765 | loc_1AE76:; |
| 11766 | |
| 11767 | Data0 = Data24->field_0; |
| 11768 | if (Data0 < 0) |
| 11769 | goto loc_1AF63; |
| 11770 | |
| 11771 | Data0 += 3; |
| 11772 | Data4 = Data24->field_4; |
| 11773 | |
| 11774 | pSprite->field_0 = Data0; |
| 11775 | pSprite->field_4 = Data4; |
| 11776 | |
| 11777 | if (Data24->field_6E) |
| 11778 | goto loc_1AF63; |
| 11779 | |
| 11780 | pSprite->field_8 = 0x95; |
| 11781 | |
| 11782 | Data0 = Data24->field_46_mission_troop->mRank; |
| 11783 | |
| 11784 | pSprite->field_A = Data0; |
| 11785 | Data0 = pSprite->field_3A; |
| 11786 | Data0 += pSprite->field_10; |
| 11787 | |
| 11788 | if (!Data0) |
| 11789 | goto loc_1AF1F; |
| 11790 | |
| 11791 | if (Data0 < 6) |
nothing calls this directly
no outgoing calls
no test coverage detected