From f5cbbc3268d96af455e2ccfe46bbcc145452eb8d Mon Sep 17 00:00:00 2001 From: Maide <34639600+Kelebek1@users.noreply.github.com> Date: Sun, 8 Aug 2021 20:28:45 +0100 Subject: Daiku2 (#228) * Daiku2 * PR * Macros * NBS * PR * Format --- src/code/z_actor.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/code') diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 778f8ad18..fd6580f51 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -845,7 +845,24 @@ void Actor_FreeOverlay(ActorOverlay* entry) { #pragma GLOBAL_ASM("asm/non_matchings/code/z_actor/func_800BE03C.s") -#pragma GLOBAL_ASM("asm/non_matchings/code/z_actor/func_800BE0B8.s") +Actor* func_800BE0B8(GlobalContext* globalCtx, Actor* inActor, s16 arg2, u8 arg3, f32 arg4) { + Actor* actor = globalCtx->actorCtx.actorList[arg3].first; + + while (actor != NULL) { + if (actor == inActor || ((arg2 != -1) && (arg2 != actor->id))) { + actor = actor->next; + continue; + } + + if (Actor_DistanceBetweenActors(inActor, actor) <= arg4) { + return actor; + } + + actor = actor->next; + } + + return NULL; +} #pragma GLOBAL_ASM("asm/non_matchings/code/z_actor/func_800BE184.s") -- cgit v1.2.3