Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
190A10.c File Reference

Go to the source code of this file.

Functions

s32 func_80262130 (f32 inX, f32 inY, f32 inZ, f32 height, f32 radius)
 
s32 func_8026220C (f32 arg0, f32 arg1)
 

Variables

s32 NpcHitQueryBehindCollider
 
s32 NpcHitQueryAheadCollider
 

Function Documentation

◆ func_80262130()

s32 func_80262130 ( f32 inX,
f32 inY,
f32 inZ,
f32 height,
f32 radius )

Definition at line 6 of file 190A10.c.

6 {
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}
s32 NpcHitQueryAheadCollider
s32 NpcHitQueryBehindCollider
b32 npc_raycast_down_around(s32, f32 *, f32 *, f32 *, f32 *, f32, f32)
s32 get_collider_flags(s32 colliderID)
Definition collision.c:481

◆ func_8026220C()

s32 func_8026220C ( f32 arg0,
f32 arg1 )

Definition at line 31 of file 190A10.c.

31 {
32 return (arg1 > 100.0f) ? 28 : 0;
33}

Variable Documentation

◆ NpcHitQueryBehindCollider

s32 NpcHitQueryBehindCollider
extern

Definition at line 4 of file npc_collision.c.

Referenced by func_80262130(), npc_raycast_down_around(), and npc_raycast_down_sides().

◆ NpcHitQueryAheadCollider

s32 NpcHitQueryAheadCollider
extern

Definition at line 5 of file npc_collision.c.

Referenced by func_80262130(), npc_raycast_down_around(), and npc_raycast_down_sides().