Skip to content

Commit

Permalink
Merge branch 'bomb_arrow' into enhancement_mods
Browse files Browse the repository at this point in the history
  • Loading branch information
lilDavid committed Dec 21, 2023
2 parents 21a9f40 + ed831a8 commit 579d12f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion soh/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

#include "z_en_arrow.h"
#include "overlays/actors/ovl_en_bom/z_en_bom.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/object_gi_nuts/object_gi_nuts.h"

Expand Down
8 changes: 7 additions & 1 deletion soh/src/overlays/actors/ovl_En_Bom/z_en_bom.c
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,12 @@ void ArrowBomb_Charge(EnBom* this, PlayState* play) {
}
}

void ArrowBomb_80865ECC(Vec3f* unkPos, Vec3f* firePos, f32 scale) {
unkPos->x += ((firePos->x - unkPos->x) * scale);
unkPos->y += ((firePos->y - unkPos->y) * scale);
unkPos->z += ((firePos->z - unkPos->z) * scale);
}

void ArrowBomb_Fly(EnBom* this, PlayState* play) {
EnArrow* arrow;
f32 distanceScaled;
Expand All @@ -545,7 +551,7 @@ void ArrowBomb_Fly(EnBom* this, PlayState* play) {
if (distanceScaled < 1.0f) {
this->unk_158 = 1.0f;
}
func_80865ECC(&this->unkPos, &this->actor.world.pos, 0.05f);
ArrowBomb_80865ECC(&this->unkPos, &this->actor.world.pos, 0.05f);

if (arrow->hitFlags & 1) {
this->timer = 0;
Expand Down

0 comments on commit 579d12f

Please sign in to comment.