Discover and decompile aiIfChrTarget

This commit is contained in:
Ryan Dwyer
2019-11-30 16:40:02 +10:00
parent 083b8e3250
commit fdd2812178
5 changed files with 46 additions and 104 deletions
+8 -8
View File
@@ -1174,12 +1174,12 @@ u8 func0007_alerted[] = {
beginloop(0x03)
if_in_disarm_range(/*goto*/ 0x9a)
cmd0108_if_something(CHR_SELF, CHR_P1P2, FALSE, /*goto*/ 0xee)
if_chr_target_eq(CHR_SELF, CHR_P1P2, FALSE, /*goto*/ 0xee)
goto_next(0xef)
label(0xee)
consider_coop_for_p1p2_chr(CHR_SELF)
cmd0108_if_something(CHR_SELF, CHR_P1P2, FALSE, /*goto*/ 0xee)
if_chr_target_eq(CHR_SELF, CHR_P1P2, FALSE, /*goto*/ 0xee)
set_target_chr(CHR_P1P2)
if_in_disarm_range(/*goto*/ 0x9a)
label(0xee)
@@ -1343,12 +1343,12 @@ u8 func0007_alerted[] = {
label(0x13)
if_in_disarm_range(/*goto*/ 0x13)
cmd0108_if_something(CHR_SELF, CHR_P1P2, FALSE, /*goto*/ 0xee)
if_chr_target_eq(CHR_SELF, CHR_P1P2, FALSE, /*goto*/ 0xee)
goto_next(0xef)
label(0xee)
consider_coop_for_p1p2_chr(CHR_SELF)
cmd0108_if_something(CHR_SELF, CHR_P1P2, FALSE, /*goto*/ 0xee)
if_chr_target_eq(CHR_SELF, CHR_P1P2, FALSE, /*goto*/ 0xee)
set_target_chr(CHR_P1P2)
if_in_disarm_range(/*goto*/ 0x13)
label(0xee)
@@ -1881,12 +1881,12 @@ u8 func0007_alerted[] = {
beginloop(0x4b)
if_within_units_of_sight(30, /*goto*/ 0x42)
if_chr_in_view(/*goto*/ 0x42)
cmd0108_if_something(CHR_SELF, CHR_P1P2, FALSE, /*goto*/ 0xee)
if_chr_target_eq(CHR_SELF, CHR_P1P2, FALSE, /*goto*/ 0xee)
goto_next(0xef)
label(0xee)
consider_coop_for_p1p2_chr(CHR_SELF)
cmd0108_if_something(CHR_SELF, CHR_P1P2, FALSE, /*goto*/ 0xee)
if_chr_target_eq(CHR_SELF, CHR_P1P2, FALSE, /*goto*/ 0xee)
set_target_chr(CHR_P1P2)
if_within_units_of_sight(30, /*goto*/ 0x42)
if_chr_in_view(/*goto*/ 0x42)
@@ -1918,11 +1918,11 @@ u8 func0007_alerted[] = {
if_has_orders(/*goto*/ 0x84)
label(0x93)
if_within_units_of_sight(30, /*goto*/ 0x42)
cmd0108_if_something(CHR_SELF, CHR_P1P2, FALSE, /*goto*/ 0xee)
if_chr_target_eq(CHR_SELF, CHR_P1P2, FALSE, /*goto*/ 0xee)
goto_next(0xef)
label(0xee)
consider_coop_for_p1p2_chr(CHR_SELF)
cmd0108_if_something(CHR_SELF, CHR_P1P2, FALSE, /*goto*/ 0xee)
if_chr_target_eq(CHR_SELF, CHR_P1P2, FALSE, /*goto*/ 0xee)
set_target_chr(CHR_P1P2)
if_within_units_of_sight(30, /*goto*/ 0x42)
label(0xee)
+1 -1
View File
@@ -14396,7 +14396,7 @@ bool (*g_CommandPointers[])(void) = {
/*0x0105*/ ai0105,
/*0x0106*/ aiSetTarget,
/*0x0107*/ aiIfPresetsTargetIsNotMyTarget,
/*0x0108*/ ai0108,
/*0x0108*/ aiIfChrTarget,
/*0x0109*/ ai0109,
/*0x010a*/ ai010a,
/*0x010b*/ aiChrSetTeam,