1#ifndef _AI_MELEE_HITBOX_INC_
2#define _AI_MELEE_HITBOX_INC_ 0
8 Enemy* enemy = script->owner1.enemy;
15 npc->
duration = enemy->AI_VAR_MELEE_PRE_TIME;
22 Enemy* enemy = script->owner1.enemy;
28 npc->
duration = enemy->AI_VAR_MELEE_HIT_TIME;
35 Enemy* enemy = script->owner1.enemy;
43 npc->
duration = enemy->AI_VAR_MELEE_MISS_TIME;
44 if (enemy->AI_VAR_MELEE_MISS_TIME >= 8) {
52 Enemy* enemy = script->owner1.enemy;
63 Enemy* enemy = script->owner1.enemy;
100API_CALLABLE(N(MeleeHitbox_Main)) {
101 Enemy* hitboxEnemy = script->owner1.enemy;
108 script->functionTemp[0] = 0;
116 hitboxEnemy->
aiFlags &= ~AI_FLAG_SUSPEND;
120 switch (script->AI_TEMP_STATE) {
126 if (hitboxEnemy->AI_VAR_HITNPC_SOUND != 0) {
129 posX = baseNpc->
pos.
x;
130 posZ = baseNpc->
pos.
z;
133 hitboxNpc->
pos.
x = posX;
136 hitboxNpc->
pos.
y = baseNpc->
pos.
y + hitboxEnemy->AI_VAR_HITNPC_YOFFSET;
139 hitboxNpc->
pos.
z = posZ;
145 script->functionTemp[0] = 1;
152 if (hitboxNpc->
duration >= hitboxEnemy->AI_VAR_HITNPC_4) {
161 script->functionTemp[0] = 0;
void N MeleeHitbox_31(Evt *script)
void N MeleeHitbox_32(Evt *script)
s32 N MeleeHitbox_CanSeePlayer(Evt *script)
void N MeleeHitbox_33(Evt *script)
void N MeleeHitbox_30(Evt *script)
@ ENEMY_ANIM_INDEX_MELEE_PRE
@ ENEMY_ANIM_INDEX_MELEE_HIT
@ AI_STATE_MELEE_HITBOX_ACTIVE
@ AI_STATE_MELEE_HITBOX_MISS
@ AI_STATE_MELEE_HITBOX_PRE
@ ENEMY_FLAG_IGNORE_HAMMER
@ ENEMY_FLAG_IGNORE_PARTNER
@ ENEMY_FLAG_IGNORE_TOUCH
@ ENEMY_FLAG_CANT_INTERACT
@ ENEMY_FLAG_ACTIVE_WHILE_OFFSCREEN
@ MELEE_HITBOX_STATE_INIT
@ MELEE_HITBOX_STATE_ACTIVE
@ MELEE_HITBOX_STATE_NONE
@ MELEE_HITBOX_STATE_POST
@ NPC_FLAG_IGNORE_PLAYER_COLLISION
void ai_enemy_play_sound(Npc *npc, s32 arg1, s32 arg2)
f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by)
void add_vec2D_polar(f32 *x, f32 *y, f32 r, f32 theta)
f32 get_clamped_angle_diff(f32, f32)
Enemy * get_enemy(s32 npcID)
Looks for an enemy matching the specified npcID.
Npc * get_npc_unsafe(s32 npcID)
#define NPC_DISPOSE_POS_Z
#define NPC_DISPOSE_POS_X
#define NPC_DISPOSE_POS_Y
s16 turnAroundYawAdjustment
PlayerStatus * gPlayerStatusPtr
PartnerStatus gPartnerStatus