diff options
| author | Maide <34639600+Kelebek1@users.noreply.github.com> | 2021-08-08 20:28:45 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-08 15:28:45 -0400 |
| commit | f5cbbc3268d96af455e2ccfe46bbcc145452eb8d (patch) | |
| tree | 3817f433624cac69e2d9bc1281091a1d41fef108 /src/code | |
| parent | a35f091505b1d744d3e397b46839f5b408795cd9 (diff) | |
Daiku2 (#228)
* Daiku2
* PR
* Macros
* NBS
* PR
* Format
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/z_actor.c | 19 |
1 files changed, 18 insertions, 1 deletions
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") |
