Skip to content

Commit

Permalink
Fix vanilla bug in Actor_GetProjectileActor that is breaking Dark Link
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettjoecox committed Dec 2, 2024
1 parent 9b74a09 commit bb589f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion soh/src/code/z_actor.c
Original file line number Diff line number Diff line change
Expand Up @@ -3854,8 +3854,9 @@ Actor* Actor_GetProjectileActor(PlayState* play, Actor* refActor, f32 radius) {
// it can also be an arrow.
// Luckily, the field at the same offset in the arrow actor is the x component of a vector
// which will rarely ever be 0. So it's very unlikely for this bug to cause an issue.
// SoH: We're opting to fix this, whatever this value lines up with now often 0
if ((Math_Vec3f_DistXYZ(&refActor->world.pos, &actor->world.pos) > radius) ||
(((ArmsHook*)actor)->timer == 0)) {
(actor->id == ACTOR_ARMS_HOOK && ((ArmsHook*)actor)->timer == 0)) {
actor = actor->next;
} else {
deltaX = Math_SinS(actor->world.rot.y) * (actor->speedXZ * 10.0f);
Expand Down

0 comments on commit bb589f2

Please sign in to comment.