diff --git a/src/files/setup/setupark.c b/src/files/setup/setupark.c index 0ff4ba4aa..675dd27d1 100644 --- a/src/files/setup/setupark.c +++ b/src/files/setup/setupark.c @@ -2637,7 +2637,7 @@ u8 func0413_defend_pad[] = { set_target_chr(CHR_P1P2) if_chr_sees_player(/*goto*/ 0x21) if_enemy_distance_lt_and_los(2540, /*goto*/ 0x21) - if_distance_to_pad_gt2(200, TARGET_PAD, /*goto*/ 0x22) + if_distance_from_target_to_pad_lt(200, TARGET_PAD, /*goto*/ 0x22) endloop(0x1f) label(0x21) diff --git a/src/game/chr/chraicommands.c b/src/game/chr/chraicommands.c index 709d6c3d1..3ff913d0e 100644 --- a/src/game/chr/chraicommands.c +++ b/src/game/chr/chraicommands.c @@ -2382,7 +2382,7 @@ bool ai0058(void) * @cmd 0059 */ GLOBAL_ASM( -glabel ai0059 +glabel aiIfDistanceFromTargetToPadLessThan /* f05103c: 3c03800a */ lui $v1,0x800a /* f051040: 24639fc0 */ addiu $v1,$v1,-24640 /* f051044: 8c6e0434 */ lw $t6,0x434($v1) diff --git a/src/include/commands.h b/src/include/commands.h index 2ada31818..5c30d81c3 100644 --- a/src/include/commands.h +++ b/src/include/commands.h @@ -366,7 +366,7 @@ chr, \ label, -#define if_distance_to_pad_gt2(distance, pad, label) \ +#define if_distance_from_target_to_pad_lt(distance, pad, label) \ mkshort(0x0059), \ mkshort(distance / 10), \ mkshort(pad), \ diff --git a/src/include/game/chr/chraicommands.h b/src/include/game/chr/chraicommands.h index fd564eb77..bd1c61594 100644 --- a/src/include/game/chr/chraicommands.h +++ b/src/include/game/chr/chraicommands.h @@ -92,7 +92,7 @@ /*0x0056*/ bool aiIfDistanceToChrLessThan(void); /*0x0057*/ bool aiIfDistanceToChrGreaterThan(void); /*0x0058*/ bool ai0058(void); -/*0x0059*/ bool ai0059(void); +/*0x0059*/ bool aiIfDistanceFromTargetToPadLessThan(void); /*0x005a*/ bool ai005a(void); /*0x005b*/ bool ai005b(void); /*0x005c*/ bool ai005c(void); diff --git a/src/setup/ailists.c b/src/setup/ailists.c index 37085a736..0bdb3840f 100644 --- a/src/setup/ailists.c +++ b/src/setup/ailists.c @@ -1213,7 +1213,7 @@ u8 func0007_alerted[] = { dprint 'W','A','I','T',' ','F','O','R',' ','A','M','B','\n',0, if_in_disarm_range(/*goto*/ 0xa3) dprint 'A','M','B','1','\n',0, - if_distance_to_pad_gt2(200, TARGET_PAD, /*goto*/ 0x13) + if_distance_from_target_to_pad_lt(200, TARGET_PAD, /*goto*/ 0x13) dprint 'A','M','B','2','\n',0, consider_coop_for_p1p2_chr(CHR_SELF) set_target_chr(CHR_P1P2) diff --git a/src/setup/setup_000000.c b/src/setup/setup_000000.c index c7c24ebea..42133d7c2 100644 --- a/src/setup/setup_000000.c +++ b/src/setup/setup_000000.c @@ -14042,7 +14042,7 @@ bool (*g_CommandPointers[])(void) = { /*0x0056*/ aiIfDistanceToChrLessThan, /*0x0057*/ aiIfDistanceToChrGreaterThan, /*0x0058*/ ai0058, - /*0x0059*/ ai0059, + /*0x0059*/ aiIfDistanceFromTargetToPadLessThan, /*0x005a*/ ai005a, /*0x005b*/ ai005b, /*0x005c*/ ai005c,