Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
190A10.c
Go to the documentation of this file.
1#include "common.h"
2
5
6s32 func_80262130(f32 inX, f32 inY, f32 inZ, f32 height, f32 radius) {
7 f32 x = inX;
8 f32 y = inY;
9 f32 z = inZ;
10 f32 hitDepth = height;
11 s32 ret = FALSE;
12 s32 combinedFlags = 0;
13
14 if (npc_raycast_down_around(0, &x, &y, &z, &hitDepth, 90.0f, radius) && hitDepth <= height) {
15 s32 colliderAheadFlags = get_collider_flags(NpcHitQueryAheadCollider & 0xFF);
16 s32 colliderBehindFlags = get_collider_flags(NpcHitQueryBehindCollider & 0xFF);
17
18 combinedFlags = colliderAheadFlags & colliderBehindFlags;
19 if (combinedFlags != (NpcHitQueryAheadCollider & 0xFF)) {
20 combinedFlags = 0;
21 }
22 }
23
24 if (combinedFlags == 1) {
25 ret = TRUE;
26 }
27
28 return ret;
29}
30
31s32 func_8026220C(f32 arg0, f32 arg1) {
32 return (arg1 > 100.0f) ? 28 : 0;
33}
s32 func_8026220C(f32 arg0, f32 arg1)
Definition 190A10.c:31
s32 NpcHitQueryAheadCollider
s32 NpcHitQueryBehindCollider
s32 func_80262130(f32 inX, f32 inY, f32 inZ, f32 height, f32 radius)
Definition 190A10.c:6
b32 npc_raycast_down_around(s32, f32 *, f32 *, f32 *, f32 *, f32, f32)
s32 get_collider_flags(s32 colliderID)
Definition collision.c:481