mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-21 13:53:49 -07:00
Option for projectile ammo to match item instead of age (#2453)
* Projectile ammo matches ItemAction instead of age extracted logic from months-old PR * Added cvar under "Enhancements -> Gameplay -> Items" for bow/slingshot ammo * Update GameMenuBar.cpp
This commit is contained in:
parent
462ab00c7e
commit
218971c4a9
2 changed files with 13 additions and 2 deletions
|
@ -2182,7 +2182,11 @@ void func_80834298(Player* this, PlayState* play) {
|
|||
|
||||
// Determine projectile type for bow or slingshot
|
||||
s32 func_80834380(PlayState* play, Player* this, s32* itemPtr, s32* typePtr) {
|
||||
if (LINK_IS_ADULT) {
|
||||
bool useBow = LINK_IS_ADULT;
|
||||
if(CVarGetInteger("gBowSlingShotAmmoFix", 0)){
|
||||
useBow = this->heldItemAction != PLAYER_IA_SLINGSHOT;
|
||||
}
|
||||
if (useBow) {
|
||||
*itemPtr = ITEM_BOW;
|
||||
if (this->stateFlags1 & PLAYER_STATE1_23) {
|
||||
*typePtr = ARROW_NORMAL_HORSE;
|
||||
|
@ -11450,7 +11454,12 @@ s32 func_8084B3CC(PlayState* play, Player* this) {
|
|||
func_80835C58(play, this, func_8084FA54, 0);
|
||||
|
||||
if (!func_8002DD6C(this) || Player_HoldsHookshot(this)) {
|
||||
func_80835F44(play, this, 3);
|
||||
s32 projectileItemToUse = ITEM_BOW;
|
||||
if(CVarGetInteger("gBowSlingShotAmmoFix", 0)){
|
||||
projectileItemToUse = LINK_IS_ADULT ? ITEM_BOW : ITEM_SLINGSHOT;
|
||||
}
|
||||
|
||||
func_80835F44(play, this, projectileItemToUse);
|
||||
}
|
||||
|
||||
this->stateFlags1 |= PLAYER_STATE1_20;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue