26 Enemy* enemy = script->owner1.enemy;
31 s32 seesPlayer = FALSE;
57 Enemy* enemy = script->owner1.enemy;
63 script->functionTemp[1] = 0;
70 Enemy* enemy = script->owner1.enemy;
74 if (script->functionTemp[1] <= 0) {
75 script->functionTemp[1] = aiSettings->playerSearchInterval;
85 script->functionTemp[1]--;
89 Enemy* enemy = script->owner1.enemy;
115 Enemy* enemy = script->owner1.enemy;
120 script->functionTemp[1] =
rand_int(1000) % 2 + 2;
125 Enemy* enemy = script->owner1.enemy;
135 script->functionTemp[1]--;
136 if (script->functionTemp[1] > 0) {
138 npc->
duration = aiSettings->waitTime / 2 +
rand_int(aiSettings->waitTime / 2 + 1);
149 Enemy* enemy = script->owner1.enemy;
152 npc->
duration = enemy->varTable[10];
158 Enemy* enemy = script->owner1.enemy;
163 fx_walking_dust(2, npc->
pos.
x, npc->
pos.
y, npc->
pos.
z + 2.0f, 0, 0);
183 Enemy* enemy = script->owner1.enemy;
185 f32 posX, posY, posZ;
218 Enemy* enemy = script->owner1.enemy;
234 Enemy* enemy = script->owner1.enemy;
250 Enemy* enemy = script->owner1.enemy;
265 Enemy* enemy = script->owner1.enemy;
277 Enemy* enemy = script->owner1.enemy;
286API_CALLABLE(N(CleftAI_Main)) {
287 Enemy* enemy = script->owner1.enemy;
289 Bytecode* args = script->ptrReadPos;
309 npc->
flags &= ~NPC_FLAG_JUMPING;
312 npc->
flags &= ~NPC_FLAG_FLYING;
314 npc->
flags &= ~NPC_FLAG_GRAVITY;
323 enemy->
aiFlags &= ~AI_FLAG_SUSPEND;
330 script->AI_TEMP_STATE = 20;
333 switch (script->AI_TEMP_STATE) {
void N CleftAI_DisguiseInit(Evt *script, MobileAISettings *aiSettings, EnemyDetectVolume *volume)
void N CleftAI_Ambush(Evt *script, MobileAISettings *aiSettings, EnemyDetectVolume *volume)
void N CleftAI_FindPlayerInit(Evt *script, MobileAISettings *aiSettings, EnemyDetectVolume *volume)
void N CleftAI_LosePlayer(Evt *script, MobileAISettings *aiSettings, EnemyDetectVolume *volume)
void N CleftAI_Tackle(Evt *script, MobileAISettings *aiSettings, EnemyDetectVolume *volume)
void N CleftAI_FindPlayer(Evt *script, MobileAISettings *aiSettings, EnemyDetectVolume *volume)
void N CleftAI_PreAmbush(Evt *script, MobileAISettings *aiSettings, EnemyDetectVolume *volume)
void N CleftAI_RevUpInit(Evt *script, MobileAISettings *aiSettings, EnemyDetectVolume *volume)
s32 N CleftAI_CanSeePlayer(Evt *script, MobileAISettings *aiSettings, EnemyDetectVolume *volume)
void N CleftAI_RevUp(Evt *script, MobileAISettings *aiSettings, EnemyDetectVolume *volume)
@ AI_STATE_CLEFT_FIND_PLAYER_INIT
@ AI_STATE_CLEFT_DISGUISE_INIT
@ AI_STATE_CLEFT_HIDING_INIT
@ AI_STATE_CLEFT_REV_UP_INIT
@ AI_STATE_CLEFT_DISGUISE
@ AI_STATE_CLEFT_CHASE_COOLDOWN
@ AI_STATE_CLEFT_PRE_AMBUSH
@ AI_STATE_CLEFT_CHASE_INIT
@ AI_STATE_CLEFT_FIND_PLAYER
@ AI_STATE_CLEFT_POST_DISGUISE
@ AI_STATE_CLEFT_LOSE_PLAYER
void N CleftAI_PostDisguise(Evt *script, MobileAISettings *aiSettings, EnemyDetectVolume *volume)
void N CleftAI_Hiding(Evt *script, MobileAISettings *aiSettings, EnemyDetectVolume *volume)
void N CleftAI_Disguise(Evt *script, MobileAISettings *aiSettings, EnemyDetectVolume *volume)
void N CleftAI_ReturnHome(Evt *script, MobileAISettings *aiSettings, EnemyDetectVolume *volume)
void N CleftAI_HidingInit(Evt *script, MobileAISettings *aiSettings, EnemyDetectVolume *volume)
s32 evt_get_variable(Evt *script, Bytecode var)
b32 is_point_outside_territory(s32 shape, f32 centerX, f32 centerZ, f32 pointX, f32 pointZ, f32 sizeX, f32 sizeZ)
void basic_ai_chase_init(Evt *script, MobileAISettings *npcAISettings, EnemyDetectVolume *territory)
void ai_enemy_play_sound(Npc *npc, s32 arg1, s32 arg2)
f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by)
b32 npc_test_move_simple_with_slipping(s32, f32 *, f32 *, f32 *, f32, f32, f32, f32)
void basic_ai_chase(Evt *script, MobileAISettings *npcAISettings, EnemyDetectVolume *territory)
s32 ai_check_player_dist(Enemy *enemy, s32 arg1, f32 arg2, f32 arg3)
f32 get_clamped_angle_diff(f32, f32)
enum TerritoryShape shape
enum TerritoryShape detectShape
s32 basic_ai_check_player_dist(EnemyDetectVolume *arg0, Enemy *arg1, f32 arg2, f32 arg3, b8 arg4)
void npc_surface_spawn_fx(Npc *npc, SurfaceInteractMode mode)
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)
s32 skipPlayerDetectChance
EnemyTerritoryWander wander
EnemyTerritory * territory
s16 turnAroundYawAdjustment
PlayerStatus * gPlayerStatusPtr
PartnerStatus gPartnerStatus