mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-01-30 23:10:14 -05:00
Enhancement: Aiming reticle for the bow/slingshot (#2715)
* Bow reticle enhancement * Menu bar checkbox * fix * simplify bow/slingshot reticle logic * Comment on RETICLE_MAX * Tooltip clarity update --------- Co-authored-by: briaguya <briaguya@alice>
This commit is contained in:
parent
c4b90d0bfe
commit
25ceca0fbf
@ -503,6 +503,8 @@ namespace GameMenuBar {
|
||||
UIWidgets::Tooltip("Explosions are now a static size, like in Majora's Mask and OoT3D. Makes bombchu hovering much easier.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Prevent Bombchus Forcing First-Person", "gDisableFirstPersonChus", true, false);
|
||||
UIWidgets::Tooltip("Prevent bombchus from forcing the camera into first-person mode when released.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Aiming reticle for the bow/slingshot", "gBowReticle", true, false);
|
||||
UIWidgets::Tooltip("Aiming with a bow or slingshot will display a reticle as with the hookshot when the projectile is ready to fire.");
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
|
@ -1391,6 +1391,11 @@ Vec3f D_801261E0[] = {
|
||||
{ 200.0f, 200.0f, 0.0f },
|
||||
};
|
||||
|
||||
// OTRTODO: Figure out why this value works/what this value should be
|
||||
// This was originally obtained by working down from FLT_MAX until the math
|
||||
// started working out properly
|
||||
#define RETICLE_MAX 3.402823466e+12f
|
||||
|
||||
void func_80090D20(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
|
||||
Player* this = (Player*)thisx;
|
||||
|
||||
@ -1555,6 +1560,24 @@ void func_80090D20(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, void
|
||||
play, this, ((this->heldItemAction == PLAYER_IA_HOOKSHOT) ? 38600.0f : 77600.0f) * CVarGetFloat("gCheatHookshotReachMultiplier", 1.0f));
|
||||
}
|
||||
}
|
||||
} else if (CVarGetInteger("gBowReticle", 0) && (
|
||||
(this->heldItemAction == PLAYER_IA_BOW_FIRE) ||
|
||||
(this->heldItemAction == PLAYER_IA_BOW_ICE) ||
|
||||
(this->heldItemAction == PLAYER_IA_BOW_LIGHT) ||
|
||||
(this->heldItemAction == PLAYER_IA_BOW) ||
|
||||
(this->heldItemAction == PLAYER_IA_SLINGSHOT))) {
|
||||
if (heldActor != NULL) {
|
||||
MtxF sp44;
|
||||
s32 pad;
|
||||
|
||||
Matrix_RotateZYX(0, -15216, -17496, MTXMODE_APPLY);
|
||||
Matrix_Get(&sp44);
|
||||
|
||||
if (func_8002DD78(this) != 0) {
|
||||
Matrix_Translate(500.0f, 300.0f, 0.0f, MTXMODE_APPLY);
|
||||
Player_DrawHookshotReticle(play, this, RETICLE_MAX);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ((this->unk_862 != 0) || ((func_8002DD6C(this) == 0) && (heldActor != NULL))) {
|
||||
|
Loading…
Reference in New Issue
Block a user