1#ifndef _AI_PROJECTILE_HITBOX_INC_
2#define _AI_PROJECTILE_HITBOX_INC_ 0
9 Enemy* enemy = script->owner1.enemy;
39 for (i = 0; i < enemy->AI_PROJECTILE_AMMO_COUNT; i++) {
40 s32 projectileNpcID = enemy->
npcID + i + 1;
45 if (projectileEnemy->VAR_PROJECTILE_HITBOX_STATE == 0) {
46 return projectileNpcID;
54 Enemy* enemy = script->owner1.enemy;
63 script->functionTemp[0] = 33;
70 script->functionTemp[0] = 30;
76 Enemy* enemy = script->owner1.enemy;
93 hitboxEnemy->varTable[4] = enemy->
npcID;
94 hitboxEnemy->varTable[0] = 1;
102 Enemy* enemy = script->owner1.enemy;
109 Enemy* enemy = script->owner1.enemy;
115 if (enemy2->varTable[0] == 0) {
132API_CALLABLE(N(ProjectileAI_Main)) {
133 Enemy* enemy = script->owner1.enemy;
134 Bytecode* args = script->ptrReadPos;
144 if (enemy->varTable[0] != 5) {
148 if (enemy->varTable[1] & 2) {
153 script->functionTemp[0] = 0;
157 npc->
flags &= ~NPC_FLAG_JUMPING;
158 enemy->varTable[0] = 0;
163 enemy->
aiFlags &= ~AI_FLAG_SUSPEND;
167 switch (script->functionTemp[0]) {
173 enemy->varTable[0] = 0;
174 script->functionTemp[0] = 1;
177 vt0 = enemy->varTable[0];
179 if (enemy->varTable[0] == 1) {
180 enemy->varTable[0] = 2;
185 npc->
pos.
y = npc2->
pos.
y + enemy->varTable[2];
198 npc->
flags &= ~NPC_FLAG_INVISIBLE;
204 script->functionTemp[0] = 2;
234 if (hitDepth < 1.0) {
243 if (enemy->varTable[1] & 1) {
250 fx_walking_dust(2, npc->
pos.
x, npc->
pos.
y, npc->
pos.
z, 0, 0);
251 enemy->varTable[0] = 0;
258 npc->
flags &= ~NPC_FLAG_JUMPING;
261 script->functionTemp[0] = 0;
268API_CALLABLE(N(ProjectileAI_Reflect)) {
269 Enemy* enemy = script->owner1.enemy;
282 script->functionTemp[0] = 0;
289 if (enemy->varTable[0] == 5) {
299 switch (script->functionTemp[0]) {
301 fx_walking_dust(2, npc->
pos.
x, npc->
pos.
y, npc->
pos.
z, 0.0f, 0.0f);
309 npc->
yaw = temp_f20_3;
315 script->functionTemp[0] = 1;
332 y = npc->
pos.
y + 13.0;
355 fx_walking_dust(2, npc->
pos.
x, npc->
pos.
y, npc->
pos.
z, 0, 0);
356 enemy->varTable[0] = 0;
362 npc->
flags &= ~NPC_FLAG_JUMPING;
365 script->functionTemp[0] = 0;
369 if (enemy->varTable[1] & 1) {
void N ProjectileHitbox_31(Evt *script)
s32 N ProjectileHitbox_GetUsableProjectileID(Evt *script)
void N ProjectileHitbox_33(Evt *script)
void N ProjectileHitbox_30(Evt *script)
void N UnkNpcAIFunc48(Evt *script, f32 arg1, f32 arg2, EnemyDetectVolume *territory)
void N ProjectileHitbox_32(Evt *script)
#define npc_raycast_down_sides
@ ENEMY_ANIM_INDEX_MELEE_PRE
@ ENEMY_ANIM_INDEX_MELEE_HIT
@ AI_STATE_PROJECTILE_HITBOX_33
@ ENEMY_FLAG_IGNORE_HAMMER
@ ENEMY_FLAG_IGNORE_PARTNER
@ ENEMY_FLAG_IGNORE_TOUCH
@ ENEMY_FLAG_CANT_INTERACT
@ ENEMY_FLAG_ACTIVE_WHILE_OFFSCREEN
@ NPC_FLAG_IGNORE_PLAYER_COLLISION
@ NPC_FLAG_IGNORE_CAMERA_FOR_YAW
s32 evt_get_variable(Evt *script, Bytecode var)
s32 evt_set_variable(Evt *script, Bytecode var, s32 value)
b32 npc_test_move_simple_with_slipping(s32, f32 *, f32 *, f32 *, f32, f32, f32, f32)
b32 npc_test_move_taller_with_slipping(s32, f32 *, f32 *, f32 *, f32, f32, f32, f32)
s32 ai_check_player_dist(Enemy *enemy, s32 arg1, f32 arg2, f32 arg3)
void add_vec2D_polar(f32 *x, f32 *y, f32 r, f32 theta)
f32 get_clamped_angle_diff(f32, f32)
s32 basic_ai_check_player_dist(EnemyDetectVolume *arg0, Enemy *arg1, f32 arg2, f32 arg3, b8 arg4)
Enemy * get_enemy_safe(s32 npcID)
Same as get_enemy(), with the exception of always returning a value if an enemy is not found.
Enemy * get_enemy(s32 npcID)
Looks for an enemy matching the specified npcID.
void enable_npc_shadow(Npc *npc)
void disable_npc_shadow(Npc *npc)
Npc * get_npc_unsafe(s32 npcID)
void npc_move_heading(Npc *npc, f32 speed, f32 yaw)
#define NPC_DISPOSE_POS_Z
#define NPC_DISPOSE_POS_X
#define NPC_DISPOSE_POS_Y
s16 turnAroundYawAdjustment
PlayerStatus * gPlayerStatusPtr
PartnerStatus gPartnerStatus