From c89afb8c4d2ca8e8ffba2327e535fc6c47c117ca Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Wed, 25 Dec 2019 18:15:09 +1000 Subject: [PATCH] Add unused commands and rename many of them --- src/files/setup/setupark.c | 6 +- src/files/setup/setupazt.c | 4 +- src/files/setup/setupcave.c | 2 +- src/files/setup/setupdish.c | 2 +- src/files/setup/setuplee.c | 2 +- src/files/setup/setuppam.c | 8 +- src/files/setup/setuppete.c | 2 +- src/files/setup/setuprit.c | 4 +- src/files/setup/setupsho.c | 2 +- src/game/chr/chraicommands.c | 68 ++--- src/include/commands.h | 358 ++++++++++++++++++++++++++- src/include/game/chr/chraicommands.h | 50 ++-- src/setup/ailists.c | 12 +- src/setup/setup_000000.c | 50 ++-- 14 files changed, 459 insertions(+), 111 deletions(-) diff --git a/src/files/setup/setupark.c b/src/files/setup/setupark.c index 96fbee283..f32b7e7b5 100644 --- a/src/files/setup/setupark.c +++ b/src/files/setup/setupark.c @@ -542,7 +542,7 @@ u8 func0401_drcaroll_following[] = { set_self_chrflag(CHRCFLAG_00040000) stop_chr set_target_chr(CHR_BOND) - try_run_to_target_chr_with_hand_up(/*goto*/ 0x00) + try_jog_to_target_chr(/*goto*/ 0x00) label(0x00) yield set_target_chr(CHR_BOND) @@ -620,7 +620,7 @@ u8 func0401_drcaroll_following[] = { if_chr_distance_lt(200, /*goto*/ 0x20) try_run_to_target_chr(/*goto*/ 0x05) label(0x20) - try_run_to_target_chr_with_hand_up(/*goto*/ 0x05) + try_jog_to_target_chr(/*goto*/ 0x05) beginloop(0x05) if_chr_in_room(CHR_TARGET, 0x00, 0x0094, /*goto*/ 0x00) @@ -1071,7 +1071,7 @@ u8 func0406_general_combat[] = { goto_first(0x13) label(0x29) - try_run_to_target_chr_with_hand_up(/*goto*/ 0x20) + try_jog_to_target_chr(/*goto*/ 0x20) label(0x20) dprint 'U','N',' ','E','N','T','R','Y','\n',0, set_return_function(CHR_SELF, FUNC_GENERAL_COMBAT) diff --git a/src/files/setup/setupazt.c b/src/files/setup/setupazt.c index 72a3d729e..bea0701a4 100644 --- a/src/files/setup/setupazt.c +++ b/src/files/setup/setupazt.c @@ -1307,7 +1307,7 @@ u8 func0418_robot[] = { // Distance > 1000 or not in sight label(0x15) - try_run_to_target_chr_with_hand_up(/*goto*/ 0x08) + try_jog_to_target_chr(/*goto*/ 0x08) // Distance < 300 label(0x31) @@ -1578,7 +1578,7 @@ u8 func041d_president_running[] = { restart_timer label(0x31) if_chr_distance_gt(300, /*goto*/ 0x31) - try_run_to_target_chr_with_hand_up(/*goto*/ 0xa1) + try_jog_to_target_chr(/*goto*/ 0xa1) label(0x31) try_run_to_target_chr(/*goto*/ 0xa1) diff --git a/src/files/setup/setupcave.c b/src/files/setup/setupcave.c index 1537796cb..08c836446 100644 --- a/src/files/setup/setupcave.c +++ b/src/files/setup/setupcave.c @@ -1277,7 +1277,7 @@ u8 func0407_stewardess[] = { goto_first(0x62) label(0x0f) - try_run_to_chr_with_hand_up(CHR_SEEDIE, /*goto*/ 0x49) + try_jog_to_chr(CHR_SEEDIE, /*goto*/ 0x49) dprint 'W','A','L','K','F','A','I','L','\n',0, beginloop(0x49) diff --git a/src/files/setup/setupdish.c b/src/files/setup/setupdish.c index d3a382166..76ff1f451 100644 --- a/src/files/setup/setupdish.c +++ b/src/files/setup/setupdish.c @@ -2940,7 +2940,7 @@ u8 func042c_carrington_tour[] = { label(0x2f) if_chr_sees_player(/*goto*/ 0x06) - try_run_to_target_chr_with_hand_up(/*goto*/ 0x08) + try_jog_to_target_chr(/*goto*/ 0x08) beginloop(0x08) if_chr_sees_player(/*goto*/ 0x06) diff --git a/src/files/setup/setuplee.c b/src/files/setup/setuplee.c index 6024d7698..607f4c38d 100644 --- a/src/files/setup/setuplee.c +++ b/src/files/setup/setuplee.c @@ -825,7 +825,7 @@ u8 func0409_elvis_follow[] = { set_target_chr(CHR_PRESET) restart_timer if_chr_distance_gt(500, /*goto*/ 0x06) - try_run_to_target_chr_with_hand_up(/*goto*/ 0x04) + try_jog_to_target_chr(/*goto*/ 0x04) // Distance < 200 or distance > 500 label(0x06) diff --git a/src/files/setup/setuppam.c b/src/files/setup/setuppam.c index 127ecf1c4..432547fa7 100644 --- a/src/files/setup/setuppam.c +++ b/src/files/setup/setuppam.c @@ -801,7 +801,7 @@ u8 func0402_elvis_follow_and_reactive_teleportals[] = { set_target_chr(CHR_PRESET) restart_timer if_chr_distance_gt(300, /*goto*/ 0x06) - try_run_to_target_chr_with_hand_up(/*goto*/ 0x04) + try_jog_to_target_chr(/*goto*/ 0x04) // Jo distance < 200 or distance > 300 label(0x06) @@ -974,7 +974,7 @@ u8 func0404_elvis_follow_and_do_agent_megaweapon[] = { set_target_chr(CHR_PRESET) restart_timer if_chr_distance_gt(300, /*goto*/ 0x06) - try_run_to_target_chr_with_hand_up(/*goto*/ 0x04) + try_jog_to_target_chr(/*goto*/ 0x04) label(0x06) try_run_to_target_chr(/*goto*/ 0x04) @@ -1111,7 +1111,7 @@ u8 func0405_elvis_follow_nocombat[] = { set_target_chr(CHR_PRESET) restart_timer if_chr_distance_gt(300, /*goto*/ 0x06) - try_run_to_target_chr_with_hand_up(/*goto*/ 0x04) + try_jog_to_target_chr(/*goto*/ 0x04) label(0x06) try_run_to_target_chr(/*goto*/ 0x04) @@ -1367,7 +1367,7 @@ u8 func0403_elvis_give_farsight[] = { set_target_chr(CHR_PRESET) restart_timer if_chr_distance_gt(300, /*goto*/ 0x06) - try_run_to_target_chr_with_hand_up(/*goto*/ 0x04) + try_jog_to_target_chr(/*goto*/ 0x04) label(0x06) try_run_to_target_chr(/*goto*/ 0x04) diff --git a/src/files/setup/setuppete.c b/src/files/setup/setuppete.c index a409b5834..03a81a2f6 100644 --- a/src/files/setup/setuppete.c +++ b/src/files/setup/setuppete.c @@ -1848,7 +1848,7 @@ u8 func041d_fbi[] = { label(0x04) dprint 'T','R','A','C','K',' ','P','L','A','Y','E','R','\n',0, - try_run_to_target_chr_with_hand_up(/*goto*/ 0x06) + try_jog_to_target_chr(/*goto*/ 0x06) beginloop(0x06) if_chr_distance_lt(500, /*goto*/ 0x18) diff --git a/src/files/setup/setuprit.c b/src/files/setup/setuprit.c index a5166e5b5..b193f2b1b 100644 --- a/src/files/setup/setuprit.c +++ b/src/files/setup/setuprit.c @@ -1519,7 +1519,7 @@ u8 func0404_president_running[] = { label(0x58) restart_timer label(0x2d) - try_run_to_target_chr_with_hand_up(/*goto*/ 0x59) + try_jog_to_target_chr(/*goto*/ 0x59) beginloop(0x59) // @bug: This FALSE should be TRUE instead. This causes the president @@ -2377,7 +2377,7 @@ u8 func040b_defend_president[] = { if_self_distance_to_chr_lt(200, CHR_PRESIDENT, /*goto*/ 0x06) label(0x03) - try_run_to_chr_with_hand_up(CHR_PRESIDENT, /*goto*/ 0x04) + try_jog_to_chr(CHR_PRESIDENT, /*goto*/ 0x04) beginloop(0x04) dprint 'G','O',' ','T','O',' ','P','A','D','\n',0, diff --git a/src/files/setup/setupsho.c b/src/files/setup/setupsho.c index dd84bcf2d..50d6471cf 100644 --- a/src/files/setup/setupsho.c +++ b/src/files/setup/setupsho.c @@ -1878,7 +1878,7 @@ u8 func040b_mauler_skedar[] = { label(0x2d) set_alertness(100) set_target_chr(CHR_BOND) - try_run_to_target_chr_with_hand_up(/*goto*/ 0x2d) + try_jog_to_target_chr(/*goto*/ 0x2d) label(0x2d) set_onshot_function(GFUNC_COMBAT_WITH_TARGET) set_return_function(CHR_SELF, GFUNC_COMBAT_WITH_TARGET) diff --git a/src/game/chr/chraicommands.c b/src/game/chr/chraicommands.c index 8c5020a00..c8ecf9b18 100644 --- a/src/game/chr/chraicommands.c +++ b/src/game/chr/chraicommands.c @@ -924,7 +924,7 @@ bool ai00f0(void) /** * @cmd 00f1 */ -bool ai00f1(void) +bool aiIfAttacking(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; @@ -1304,9 +1304,9 @@ bool ai002a(void) /** * @cmd 002b */ -bool ai002b(void) +bool aiTryJogToTargetChr(void) { - if (chrGoToTarget(g_Vars.chrdata, 1)) { + if (chrGoToTarget(g_Vars.chrdata, SPEED_JOG)) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[2]); } else { @@ -1319,9 +1319,9 @@ bool ai002b(void) /** * @cmd 002c */ -bool ai002c(void) +bool aiTryWalkToTargetChr(void) { - if (chrGoToTarget(g_Vars.chrdata, 0)) { + if (chrGoToTarget(g_Vars.chrdata, SPEED_WALK)) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[2]); } else { @@ -1334,9 +1334,9 @@ bool ai002c(void) /** * @cmd 002d */ -bool ai002d(void) +bool aiTryRunToTargetChr(void) { - if (chrGoToTarget(g_Vars.chrdata, 2)) { + if (chrGoToTarget(g_Vars.chrdata, SPEED_RUN)) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[2]); } else { @@ -1364,7 +1364,7 @@ bool ai002e(void) /** * @cmd 002f */ -bool aiJogToChr(void) +bool aiTryJogToChr(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; @@ -1380,7 +1380,7 @@ bool aiJogToChr(void) /** * @cmd 0030 */ -bool aiWalkToChr(void) +bool aiTryWalkToChr(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; @@ -1396,7 +1396,7 @@ bool aiWalkToChr(void) /** * @cmd 0031 */ -bool aiRunToChr(void) +bool aiTryRunToChr(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; @@ -3847,7 +3847,7 @@ bool aiIfNumCloseArghsGreaterThan(void) * @cmd 0081 */ GLOBAL_ASM( -glabel ai0081 +glabel aiIfChrHealthLessThan /* f052a88: 27bdffd8 */ addiu $sp,$sp,-40 /* f052a8c: afb00018 */ sw $s0,0x18($sp) /* f052a90: 3c10800a */ lui $s0,%hi(g_Vars) @@ -3940,7 +3940,7 @@ glabel ai0081 * @cmd 0082 */ GLOBAL_ASM( -glabel ai0082 +glabel aiIfChrHealthGreaterThan /* f052bcc: 27bdffd8 */ addiu $sp,$sp,-40 /* f052bd0: afb00018 */ sw $s0,0x18($sp) /* f052bd4: 3c10800a */ lui $s0,%hi(g_Vars) @@ -4033,7 +4033,7 @@ glabel ai0082 * @cmd 010f */ GLOBAL_ASM( -glabel ai010f +glabel aiIfChrShieldLessThan /* f052d10: 27bdffd8 */ addiu $sp,$sp,-40 /* f052d14: afb00018 */ sw $s0,0x18($sp) /* f052d18: 3c10800a */ lui $s0,%hi(g_Vars) @@ -4090,7 +4090,7 @@ glabel ai010f * @cmd 0110 */ GLOBAL_ASM( -glabel ai0110 +glabel aiIfChrShieldGreaterThan /* f052dcc: 27bdffd8 */ addiu $sp,$sp,-40 /* f052dd0: afb00018 */ sw $s0,0x18($sp) /* f052dd4: 3c10800a */ lui $s0,%hi(g_Vars) @@ -5362,7 +5362,7 @@ glabel aiPrint /** * @cmd 0091 */ -bool ai0091(void) +bool aiNoOp0091(void) { g_Vars.aioffset += 2; return false; @@ -6883,7 +6883,7 @@ glabel ai00d7 /** * @cmd 00d8 */ -bool ai00d8(void) +bool aiNoOp00d8(void) { g_Vars.aioffset += 3; return false; @@ -6892,7 +6892,7 @@ bool ai00d8(void) /** * @cmd 00d9 */ -bool ai00d9(void) +bool aiNoOp00d9(void) { g_Vars.aioffset += 3; return false; @@ -6927,7 +6927,7 @@ bool aiSetObjImage(void) /** * @cmd 00db */ -bool ai00db(void) +bool aiNoOp00db(void) { g_Vars.aioffset += 3; return false; @@ -6980,7 +6980,7 @@ bool aiWarpJoToPad(void) /** * @cmd 010d */ -bool ai010d(void) +bool aiNoOp010d(void) { g_Vars.aioffset += 2; return false; @@ -8022,7 +8022,7 @@ bool aiIfObjInRoom(void) bool ai00f2(void) { func0f1660a4(1); - g_Vars.aioffset += + 2; + g_Vars.aioffset += 2; return false; } @@ -8357,8 +8357,8 @@ bool ai00fd(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - if (chr && (chr->chrflags & 0x00200000)) { - chr->chrflags &= 0xffdfffff; + if (chr && (chr->chrflags & CHRCFLAG_00200000)) { + chr->chrflags &= ~CHRCFLAG_00200000; g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[3]); } else { g_Vars.aioffset += 4; @@ -8370,7 +8370,7 @@ bool ai00fd(void) /** * @cmd 00fe */ -bool ai00fe(void) +bool aiKillBond(void) { g_Vars.bond->isdead = true; g_Vars.aioffset += 2; @@ -8392,7 +8392,7 @@ bool ai00ff(void) /** * @cmd 0100 */ -bool ai0100(void) +bool aiNoOp0100(void) { g_Vars.aioffset += 3; return false; @@ -8401,7 +8401,7 @@ bool ai0100(void) /** * @cmd 0101 */ -bool ai0101(void) +bool aiNoOp0101(void) { g_Vars.aioffset += 3; return false; @@ -8453,7 +8453,7 @@ bool ai0103(void) * @cmd 0104 */ GLOBAL_ASM( -glabel ai0104 +glabel aiRemoveObjectAtPropPreset /* f058b08: 3c05800a */ lui $a1,%hi(g_Vars) /* f058b0c: 24a59fc0 */ addiu $a1,$a1,%lo(g_Vars) /* f058b10: 8ca30424 */ lw $v1,0x424($a1) @@ -8482,7 +8482,7 @@ glabel ai0104 ); // Mismatch due to temporary registers -//bool ai0104(void) +//bool aiRemoveObjectAtPropPreset(void) //{ // if (g_Vars.chrdata->proppreset1 >= 0) { // struct defaultobj *obj = g_Vars.positions[g_Vars.chrdata->proppreset1].obj; @@ -8575,7 +8575,7 @@ bool aiSetTarget(void) } if (prop_id != g_Vars.chrdata->target) { - g_Vars.chrdata->lastvisibletarg = 0; + g_Vars.chrdata->lastvisibletarget60 = 0; g_Vars.chrdata->lastseetarget60 = 0; g_Vars.chrdata->lastheartarget60 = 0; g_Vars.chrdata->hidden &= ~CHRHFLAG_00000002; @@ -8701,7 +8701,7 @@ bool aiChrSetTeam(void) /** * @cmd 010c */ -bool ai010c(void) +bool aiIfCompareChrPresetsTeam(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, CHR_PRESET); @@ -11652,7 +11652,7 @@ bool aiChrSetListening(void) * @cmd 0149 */ GLOBAL_ASM( -glabel ai0149 +glabel aiIfChrListening /* f05c014: 27bdffd8 */ addiu $sp,$sp,-40 /* f05c018: afb00018 */ sw $s0,0x18($sp) /* f05c01c: 3c10800a */ lui $s0,%hi(g_Vars) @@ -11709,7 +11709,7 @@ glabel ai0149 // Mismatch because chr->listening and cmd[3] registers are loaded to registers // in the wrong order. The function is functionally identical though. -//bool ai0149(void) +//bool aiIfChrListening(void) //{ // u8 *cmd = g_Vars.ailist + g_Vars.aioffset; // struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); @@ -11734,7 +11734,7 @@ glabel ai0149 /** * @cmd 014a */ -bool ai014a(void) +bool aiIfTrue(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[5]); @@ -12026,7 +12026,7 @@ bool aiIfY(void) /** * @cmd 016c */ -bool ai016c(void) +bool aiNoOp016c(void) { g_Vars.aioffset += 2; return false; @@ -13776,7 +13776,7 @@ glabel ai01b9 /** * @cmd 01bb */ -bool ai01bb(void) +bool aiNoOp01bb(void) { g_Vars.aioffset += 4; return false; diff --git a/src/include/commands.h b/src/include/commands.h index 9f117da8a..8afea6504 100644 --- a/src/include/commands.h +++ b/src/include/commands.h @@ -55,6 +55,12 @@ mkshort(0x000c), \ label, +#define cmd000d \ + mkshort(0x000d), + +#define cmd000e \ + mkshort(0x000e), + #define try_jump_sideways(label) \ mkshort(0x000f), \ label, @@ -71,6 +77,10 @@ mkshort(0x0012), \ label, +#define try_run_and_shoot(label) \ + mkshort(0x0013), \ + label, + #define try_roll_and_shoot(label) \ mkshort(0x0014), \ label, @@ -126,6 +136,12 @@ mkshort(value_2), \ label, +#define cmd001c(u1, u2, label) \ + mkshort(0x001c), \ + mkshort(u1), \ + u2, \ + label, + #define jog_to_pad(pad) \ mkshort(0x001d), \ mkshort(pad), @@ -163,13 +179,22 @@ mkshort(0x0026), \ chr, +#define cmd0027(u1, label) \ + mkshort(0x0027), \ + mkshort(u1), \ + label, + #define activate_alarm \ mkshort(0x0028), #define deactivate_alarm \ mkshort(0x0029), -#define try_run_to_target_chr_with_hand_up(label) \ +#define cmd002a(label) \ + mkshort(0x002a), \ + label, + +#define try_jog_to_target_chr(label) \ mkshort(0x002b), \ label, @@ -181,11 +206,20 @@ mkshort(0x002d), \ label, -#define try_run_to_chr_with_hand_up(chr, label) \ +#define cmd002e(label) \ + mkshort(0x002e), \ + label, + +#define try_jog_to_chr(chr, label) \ mkshort(0x002f), \ chr, \ label, +#define try_walk_to_chr(chr, label) \ + mkshort(0x0030), \ + chr, \ + label, + #define try_run_to_chr(chr, label) \ mkshort(0x0031), \ chr, \ @@ -230,6 +264,10 @@ mkshort(0x003a), \ label, +#define if_alarm_inactive(label) \ + mkshort(0x003b), \ + label, + #define if_hears_gunfire(label) \ mkshort(0x003c), \ label, @@ -274,11 +312,20 @@ mkshort(0x003f), \ label, +#define cmd0040(flags, label) \ + mkshort(0x0040), \ + mkword(flags), \ + label, + #define if_within_units_of_sight(value, label) \ mkshort(0x0041), \ mkword(value), \ label, +#define if_in_loaded_room(label) \ + mkshort(0x0042), \ + label, + /** * Go to the label if the chr saw their target within the last 10 seconds. */ @@ -306,6 +353,11 @@ mkshort(0x0047), \ label, +#define cmd0048(u1, label) \ + mkshort(0x0048), \ + u1, \ + label, + // Used by CIA guards in chicago #define cmd0049(u1, label) \ mkshort(0x0049), \ @@ -402,6 +454,11 @@ chr, \ label, +#define cmd0058(distance, label) \ + mkshort(0x0058), \ + mkshort(distance / 10), \ + label, + #define if_distance_from_target_to_pad_lt(distance, pad, label) \ mkshort(0x0059), \ mkshort(distance / 10), \ @@ -481,6 +538,10 @@ mkshort(0x0066), \ object, +#define cmd0067(object) \ + mkshort(0x0067), \ + object, + #define drop_concealed_items(chr) \ mkshort(0x0068), \ chr, @@ -513,6 +574,11 @@ doorstate, \ label, +#define if_object_is_door(object, label) \ + mkshort(0x006f), \ + object, \ + label, + #define lock_door(door, bits) \ mkshort(0x0070), \ door, \ @@ -606,6 +672,18 @@ value, \ label, +#define if_chr_health_lt(chr, health, label) \ + mkshort(0x0081), \ + chr, \ + health, \ + label, + +#define if_chr_health_gt(chr, health, label) \ + mkshort(0x0082), \ + chr, \ + health, \ + label, + // Checks chr bank 3 0x00000100. If set, unsets it and follows label. #define if_just_injured(chr, label) \ mkshort(0x0083), \ @@ -621,7 +699,7 @@ value, #define chr_add_morale(chr, value) \ - mkshort(0x0085), \ + mkshort(0x0086), \ chr, \ value, @@ -672,8 +750,8 @@ mkshort(0x0090), \ label, -#define cmd0091_noop \ - mkdir(0x0091), +#define noop0091 \ + mkshort(0x0091), // Set their hear distance to value divided by 1000. // Only ever called with distance = 10,000, so it gets set to 10. @@ -803,6 +881,12 @@ object, \ mkword(objectflag0), +#define if_object_has_flag(object, flag, label) \ + mkshort(0x00ac), \ + object, \ + mkword(flag), \ + label, + #define set_object_flag_bank1(object, objectflag1) \ mkshort(0x00ad), \ object, \ @@ -936,6 +1020,12 @@ mkword(u1), \ label, +#define cmd00c9(u1, flags, label) \ + mkshort(0x00c9), \ + mkshort(u1), \ + mkword(flags), \ + label, + #define try_spawn_clone2(chr, function, u1, label) \ mkshort(0x00ca), \ chr, \ @@ -980,10 +1070,28 @@ mkshort(pad), \ mkshort(sound), +#define cmd00d1(channel, audio_id, u1) \ + mkshort(0x00d1), \ + channel, \ + mkshort(audio_id), \ + mkshort(u1), + +#define cmd00d2(channel, audio_id, u1) \ + mkshort(0x00d2), \ + channel, \ + mkshort(audio_id), \ + mkshort(u1), + #define mute_channel(channel) \ mkshort(0x00d3), \ channel, +#define cmd00d4(u1, u2, label) \ + mkshort(0x00d4), \ + u1, \ + mkshort(u2), \ + label, + #define begin_hovercar_path(path) \ mkshort(0x00d5), \ path, @@ -999,12 +1107,24 @@ u1, \ u2, +#define noop00d8(u1) \ + mkshort(0x00d8), \ + u1, + +#define noop00d9(u1) \ + mkshort(0x00d9), \ + u1, + #define set_object_image(object, slot, image) \ mkshort(0x00da), \ object, \ slot, \ image, +#define noop00db(u1) \ + mkshort(0x00db), \ + u1, + #define end_level \ mkshort(0x00dc), @@ -1015,6 +1135,12 @@ mkshort(0x00de), \ mkshort(pad), +#define cmd00df(object, u1, u2) \ + mkshort(0x00df), \ + object, \ + mkshort(u1), \ + mkshort(u2), + #define revoke_control(chr, value) \ mkshort(0x00e0), \ chr, \ @@ -1031,10 +1157,28 @@ unknown, \ label, +#define cmd00e3(chr) \ + mkshort(0x00e3), \ + chr, + +#define cmd00e4(u1) \ + mkshort(0x00e4), \ + u1, + +#define cmd00e5(chr, label) \ + mkshort(0x00e5), \ + chr, \ + label, + #define open_door2(door) \ mkshort(0x00e8), \ door, +#define cmd00e9(chr, u1) \ + mkshort(0x00e9), \ + chr, \ + u1, + // Reads 4 global values and counts how many are nonzero. // If number of nonzeroes is less than given value, goto label. // Only ever called with value = 2 @@ -1060,16 +1204,48 @@ chr, \ weapon, +#define cmd00ee(chr, x, z) \ + mkshort(0x00ee), \ + x, \ + z, + #define if_object_in_room(object, room, label) \ mkshort(0x00ef), \ object, \ mkshort(room), \ label, +#define cmd00f0(label) \ + mkshort(0x00f0), \ + label, + +#define if_attacking(label) \ + mkshort(0x00f1), \ + label, + +#define cmd00f2 \ + mkshort(0x00f2), + #define set_invincible(chr) \ mkshort(0x00f3), \ chr, +#define cmd00f4(u1, u2, u3, u4, u5, u6) \ + mkshort(0x00f4), \ + mkshort(u1), \ + mkshort(u2), \ + mkshort(u3), \ + mkshort(u4), \ + mkshort(u5), \ + mkshort(u6), + +#define cmd00f5 \ + mkshort(0x00f5), + +#define cmd00f6(label) \ + mkshort(0x00f6), \ + label, + #define if_all_objectives_complete(label) \ mkshort(0x00f7), \ label, @@ -1098,6 +1274,25 @@ value, \ label, +#define cmd00fd(chr, label) \ + mkshort(0x00fd), \ + chr, \ + label, + +#define kill_bond \ + mkshort(0x00fe), + +#define cmd00ff \ + mkshort(0x00ff), + +#define cmd0100_noop(u1) \ + mkshort(0x0100), \ + u1, + +#define cmd0101_noop(u1) \ + mkshort(0x0101), \ + u1, + #define set_lights_state(room, operation, u1, u2, u3) \ mkshort(0x0102), \ mkshort(room), \ @@ -1109,6 +1304,18 @@ 0x00, \ 0x00, +#define cmd0103(label) \ + mkshort(0x0103), \ + label, + +#define remove_object_at_proppreset \ + mkshort(0x0104), + +#define cmd0105(u1, label) \ + mkshort(0x0105), \ + mkshort(u1), \ + label, + #define set_target_chr(chr) \ mkshort(0x0106), \ chr, \ @@ -1136,11 +1343,32 @@ mkshort(distance), \ label, \ +#define cmd010a(u1, distance, u2, label) \ + mkshort(0x010a), \ + u1, \ + mkshort(distance / 10), \ + mkshort(u2), \ + label, + #define set_chr_team(chr, team) \ mkshort(0x010b), \ chr, \ team, +/** + * Compare current chr's chrpreset's team with our own. + * + * checktype 1 = if friendly + * checktype 2 = if enemies + */ +#define if_compare_chrpresets_team(checktype, label) \ + mkshort(0x010c), \ + checktype, \ + label, + +#define noop010d \ + mkshort(0x010d), + #define set_shield(value) \ mkshort(0x010e), \ mkshort(value), @@ -1151,6 +1379,12 @@ mkshort(value), \ label, +#define if_chr_shield_gt(chr, u1, label) \ + mkshort(0x0110), \ + chr, \ + mkshort(u1), \ + label, + #define camera_movement(animation) \ mkshort(0x0111), \ mkshort(animation), @@ -1239,6 +1473,18 @@ mkshort(u1), \ label, +#define cmd0122(u1, flags, label) \ + mkshort(0x0122), \ + mkshort(u1), \ + mkword(flags), \ + label, + +#define cmd0123(u1, flags, label) \ + mkshort(0x0123), \ + mkshort(u1), \ + mkword(flags), \ + label, + #define cmd0124_run_for_cover_maybe(action) \ mkshort(0x0124), \ action, @@ -1266,6 +1512,12 @@ distance / 10, \ label, +// If risk less than? +#define cmd0129(score, label) \ + mkshort(0x0129), \ + score, \ + label, + // If value is nonzero then it's an chr ID. If zero then use current chr. // This means chr ID 0 cannot be used. In practice, this command is only // called once and it has value 0. @@ -1379,6 +1631,10 @@ mkshort(0x013b), \ id, +#define cmd013c(label) \ + mkshort(0x013c), \ + label, + // Value is only ever 3. The function checks bits 0x01 and 0x02 to decide what // to do, so in all cases it does both paths. // globals.s only @@ -1390,6 +1646,10 @@ #define run_from_grenade \ mkshort(0x013e), +#define cmd013f(label) \ + mkshort(0x013f), \ + label, + #define if_hoverbot_path_finished(u1, u2, label) \ mkshort(0x0140), \ u1, \ @@ -1425,6 +1685,11 @@ #define cmd0143 \ mkshort(0x0143), +// Sets heli field 0x90 +#define cmd0144 \ + mkshort(0x0144), \ + label, + // Rebuild an array of teams containing chr IDs in that team #define rebuild_teams \ mkshort(0x0145), @@ -1438,6 +1703,37 @@ squadron, \ label, +#define chr_set_listening(chr, value) \ + mkshort(0x0148), \ + chr, \ + value, + +/** + * checktype 0 = if chr's listening value is listenvalue + * checktype 1 = if chr's convtalk value is zero + */ +#define if_chr_listening(chr, listenvalue, checktype, label) \ + mkshort(0x0149), \ + chr, \ + listenvalue, \ + checktype, \ + label, + +/** + * Always goes to label. Other arguments are unused. Probably has a purpose in + * debug. + */ +#define if_true(u1, u2, u3, label) \ + mkshort(0x014a), \ + u1, \ + u2, \ + u3, \ + label, + +#define if_not_listening(label) \ + mkshort(0x014b), \ + label, + #define if_num_chrs_in_squadron_gt(value, squadron, label) \ mkshort(0x0152), \ value, \ @@ -1460,6 +1756,10 @@ chr, \ label, +#define if_action_eq(action, label) \ + mkshort(0x0166), \ + label, + #define hovercopter_fire_rocket(side) \ mkshort(0x0167), \ side, @@ -1662,6 +1962,17 @@ lift, \ label, +#define cmd0189(lift, u1) \ + mkshort(0x0189), \ + lift, \ + u1, + +#define cmd018a(object, u1, label) \ + mkshort(0x018a), \ + object, \ + u1, \ + label, + #define enable_rain(value) \ mkshort(0x018b), \ value, @@ -1750,6 +2061,10 @@ color, \ mkshort(text), +#define cmd01a5(label) \ + mkshort(0x01a5), \ + label, + #define if_target_y_difference_lt(distance, label) \ mkshort(0x01a6), \ distance / 10, \ @@ -1760,6 +2075,10 @@ chr, \ label, +#define cmd01aa(label) \ + mkshort(0x01aa), \ + label, + #define if_num_subdued(value, operator, label) \ mkshort(0x01ab), \ value, \ @@ -1852,6 +2171,15 @@ mkshort(u2), \ label, +#define noop01bb \ + mkshort(0x01bb), \ + mkshort(0), + +#define cmd01bc(u1, label) \ + mkshort(0x01bc), \ + u1, \ + label, + #define if_training_pc_holographed(label) \ mkshort(0x01bd), \ label, @@ -1932,6 +2260,10 @@ mkword(rgba), \ mkshort(num_frames), +#define cmd01cc(label) \ + mkshort(0x01cc), \ + label, + #define set_chr_hud_visible(chr, bool) \ mkshort(0x01cd), \ chr, \ @@ -2013,6 +2345,22 @@ operation, \ value, +/** + * Redundant command. Use if_distance_to_target_lt. + */ +#define if_distance_to_target2_lt(distance, label) \ + mkshort(0x01d7), \ + mkshort(distance / 10), \ + label, + +/** + * Redundant command. Use if_distance_to_target_gt. + */ +#define if_distance_to_target2_gt(distance, label) \ + mkshort(0x01d8), \ + mkshort(distance / 10), \ + label, + #define play_sound_from_object2(channel, object, sound, u1, u2) \ mkshort(0x01d9), \ channel, \ diff --git a/src/include/game/chr/chraicommands.h b/src/include/game/chr/chraicommands.h index f83202b5a..abe8f0a24 100644 --- a/src/include/game/chr/chraicommands.h +++ b/src/include/game/chr/chraicommands.h @@ -46,13 +46,13 @@ /*0x0028*/ bool aiActivateAlarm(void); /*0x0029*/ bool aiDeactivateAlarm(void); /*0x002a*/ bool ai002a(void); -/*0x002b*/ bool ai002b(void); -/*0x002c*/ bool ai002c(void); -/*0x002d*/ bool ai002d(void); +/*0x002b*/ bool aiTryJogToTargetChr(void); +/*0x002c*/ bool aiTryWalkToTargetChr(void); +/*0x002d*/ bool aiTryRunToTargetChr(void); /*0x002e*/ bool ai002e(void); -/*0x002f*/ bool aiJogToChr(void); -/*0x0030*/ bool aiWalkToChr(void); -/*0x0031*/ bool aiRunToChr(void); +/*0x002f*/ bool aiTryJogToChr(void); +/*0x0030*/ bool aiTryWalkToChr(void); +/*0x0031*/ bool aiTryRunToChr(void); /*0x0032*/ bool aiIfStopped(void); /*0x0033*/ bool aiIfChrDying(void); /*0x0034*/ bool aiIfChrDeathAnimationFinished(void); @@ -131,8 +131,8 @@ /*0x007e*/ bool aiIfNumArghsGreaterThan(void); /*0x007f*/ bool aiIfNumCloseArghsLessThan(void); /*0x0080*/ bool aiIfNumCloseArghsGreaterThan(void); -/*0x0081*/ bool ai0081(void); -/*0x0082*/ bool ai0082(void); +/*0x0081*/ bool aiIfChrHealthLessThan(void); +/*0x0082*/ bool aiIfChrHealthGreaterThan(void); /*0x0083*/ bool aiIfInjured(void); /*0x0084*/ bool aiSetMorale(void); /*0x0085*/ bool aiAddMorale(void); @@ -147,7 +147,7 @@ /*0x008e*/ bool aiIfAlertness(void); /*0x008f*/ bool aiIfChrAlertnessLessThan(void); /*0x0090*/ bool aiIfAlertnessLessThanRandom(void); -/*0x0091*/ bool ai0091(void); +/*0x0091*/ bool aiNoOp0091(void); /*0x0092*/ bool aiSetHearDistance(void); /*0x0093*/ bool aiSetViewDistance(void); /*0x0094*/ bool aiSetGrenadeProbability(void); @@ -218,10 +218,10 @@ /*0x00d5*/ bool ai00d5(void); /*0x00d6*/ bool ai00d6(void); /*0x00d7*/ bool ai00d7(void); -/*0x00d8*/ bool ai00d8(void); -/*0x00d9*/ bool ai00d9(void); +/*0x00d8*/ bool aiNoOp00d8(void); +/*0x00d9*/ bool aiNoOp00d9(void); /*0x00da*/ bool aiSetObjImage(void); -/*0x00db*/ bool ai00db(void); +/*0x00db*/ bool aiNoOp00db(void); /*0x00dc*/ bool aiEndLevel(void); /*0x00dd*/ bool ai00dd(void); /*0x00de*/ bool aiWarpJoToPad(void); @@ -241,7 +241,7 @@ /*0x00ee*/ bool ai00ee(void); /*0x00ef*/ bool aiIfObjInRoom(void); /*0x00f0*/ bool ai00f0(void); -/*0x00f1*/ bool ai00f1(void); +/*0x00f1*/ bool aiIfAttacking(void); /*0x00f2*/ bool ai00f2(void); /*0x00f3*/ bool aiChrSetInvincible(void); /*0x00f4*/ bool ai00f4(void); @@ -254,13 +254,13 @@ /*0x00fb*/ bool aiChrExplosions(void); /*0x00fc*/ bool aiIfKillCountGreaterThan(void); /*0x00fd*/ bool ai00fd(void); -/*0x00fe*/ bool ai00fe(void); +/*0x00fe*/ bool aiKillBond(void); /*0x00ff*/ bool ai00ff(void); -/*0x0100*/ bool ai0100(void); -/*0x0101*/ bool ai0101(void); +/*0x0100*/ bool aiNoOp0100(void); +/*0x0101*/ bool aiNoOp0101(void); /*0x0102*/ bool aiSetLights(void); /*0x0103*/ bool ai0103(void); -/*0x0104*/ bool ai0104(void); +/*0x0104*/ bool aiRemoveObjectAtPropPreset(void); /*0x0105*/ bool ai0105(void); /*0x0106*/ bool aiSetTarget(void); /*0x0107*/ bool aiIfPresetsTargetIsNotMyTarget(void); @@ -268,11 +268,11 @@ /*0x0109*/ bool ai0109(void); /*0x010a*/ bool ai010a(void); /*0x010b*/ bool aiChrSetTeam(void); -/*0x010c*/ bool ai010c(void); -/*0x010d*/ bool ai010d(void); +/*0x010c*/ bool aiIfCompareChrPresetsTeam(void); +/*0x010d*/ bool aiNoOp010d(void); /*0x010e*/ bool ai010e(void); -/*0x010f*/ bool ai010f(void); -/*0x0110*/ bool ai0110(void); +/*0x010f*/ bool aiIfChrShieldLessThan(void); +/*0x0110*/ bool aiIfChrShieldGreaterThan(void); /*0x0111*/ bool aiSetCameraAnimation(void); /*0x0112*/ bool ai0112(void); /*0x0113*/ bool aiIfInCutscene(void); @@ -327,8 +327,8 @@ /*0x0146*/ bool aiRebuildSquadrons(void); /*0x0147*/ bool ai0147(void); /*0x0148*/ bool aiChrSetListening(void); -/*0x0149*/ bool ai0149(void); -/*0x014a*/ bool ai014a(void); +/*0x0149*/ bool aiIfChrListening(void); +/*0x014a*/ bool aiIfTrue(void); /*0x014b*/ bool aiIfNotListening(void); /*0x0152*/ bool ai0152(void); /*0x0157*/ bool aiSetTintedGlassEnabled(void); @@ -341,7 +341,7 @@ /*0x0169*/ bool aiIfNaturalAnim(void); /*0x016a*/ bool aiIfY(void); /*0x016b*/ bool ai016b(void); -/*0x016c*/ bool ai016c(void); +/*0x016c*/ bool aiNoOp016c(void); /*0x016d*/ bool aiChrAdjustMotionBlur(void); /*0x016e*/ bool ai016e(void); /*0x016f*/ bool aiIfChrHasGun(void); @@ -406,7 +406,7 @@ /*0x01b8*/ bool aiSetAutogunType(void); /*0x01b9*/ bool ai01b9(void); /*0x01ba*/ bool ai01ba(void); -/*0x01bb*/ bool ai01bb(void); +/*0x01bb*/ bool aiNoOp01bb(void); /*0x01bc*/ bool ai01bc(void); /*0x01bd*/ bool ai01bd(void); /*0x01be*/ bool aiIfChrWeaponEquipped(void); diff --git a/src/setup/ailists.c b/src/setup/ailists.c index 5ee185876..e6cb356e0 100644 --- a/src/setup/ailists.c +++ b/src/setup/ailists.c @@ -533,7 +533,7 @@ u8 func0006_unalerted[] = { label(0x17) if_self_flag_bankx_eq(CHRFLAG0_CAN_EXAMINE_BODY, FALSE, BANK_0, /*goto*/ 0x7d) - try_run_to_chr_with_hand_up(CHR_SEEDIE, /*goto*/ 0x7e) + try_jog_to_chr(CHR_SEEDIE, /*goto*/ 0x7e) dprint 'W','A','L','K','F','A','I','L','\n',0, beginloop(0x7e) @@ -3402,7 +3402,7 @@ u8 func000c_combat_with_target_chr[] = { // Unreachable - no label if_rand_gt(128, /*goto*/ 0xd1) - try_run_to_target_chr_with_hand_up(/*goto*/ 0xd0) + try_jog_to_target_chr(/*goto*/ 0xd0) beginloop(0xd0) if_timer_gt(120, /*goto*/ 0xd2) @@ -4147,7 +4147,7 @@ u8 func001b_observe_camspy[] = { label(0x00) set_target_chr(CHR_PRESET) if_chr_distance_lt(300, /*goto*/ 0x13) - try_run_to_target_chr_with_hand_up(/*goto*/ 0x0c) + try_jog_to_target_chr(/*goto*/ 0x0c) restart_timer beginloop(0x0c) @@ -4285,7 +4285,7 @@ u8 func001d_search_for_player[] = { if_self_flag_bankx_eq(CHRFLAG1_10000000, TRUE, BANK_1, /*goto*/ 0x16) set_chr_roomtosearch if_chr_distance_gt(1000, /*goto*/ 0x13) - try_run_to_target_chr_with_hand_up(/*goto*/ 0x03) + try_jog_to_target_chr(/*goto*/ 0x03) label(0x13) try_run_to_target_chr(/*goto*/ 0x03) @@ -4757,7 +4757,7 @@ u8 func0014_coop_buddy[] = { set_target_chr(CHR_BOND) restart_timer if_chr_distance_gt(300, /*goto*/ 0x16) - try_run_to_target_chr_with_hand_up(/*goto*/ 0x0c) + try_jog_to_target_chr(/*goto*/ 0x0c) label(0x16) try_run_to_target_chr(/*goto*/ 0x0c) @@ -5209,7 +5209,7 @@ u8 func0027_psychosised[] = { set_target_chr(CHR_PRESET) restart_timer if_chr_distance_gt(300, /*goto*/ 0x16) - try_run_to_target_chr_with_hand_up(/*goto*/ 0x0c) + try_jog_to_target_chr(/*goto*/ 0x0c) label(0x16) if_chr_distance_lt(200, /*goto*/ 0x16) try_run_to_target_chr(/*goto*/ 0x0c) diff --git a/src/setup/setup_000000.c b/src/setup/setup_000000.c index d1734de5b..137b704be 100644 --- a/src/setup/setup_000000.c +++ b/src/setup/setup_000000.c @@ -14175,13 +14175,13 @@ bool (*g_CommandPointers[])(void) = { /*0x0028*/ aiActivateAlarm, /*0x0029*/ aiDeactivateAlarm, /*0x002a*/ ai002a, - /*0x002b*/ ai002b, - /*0x002c*/ ai002c, - /*0x002d*/ ai002d, + /*0x002b*/ aiTryJogToTargetChr, + /*0x002c*/ aiTryWalkToTargetChr, + /*0x002d*/ aiTryRunToTargetChr, /*0x002e*/ ai002e, - /*0x002f*/ aiJogToChr, - /*0x0030*/ aiWalkToChr, - /*0x0031*/ aiRunToChr, + /*0x002f*/ aiTryJogToChr, + /*0x0030*/ aiTryWalkToChr, + /*0x0031*/ aiTryRunToChr, /*0x0032*/ aiIfStopped, /*0x0033*/ aiIfChrDying, /*0x0034*/ aiIfChrDeathAnimationFinished, @@ -14261,8 +14261,8 @@ bool (*g_CommandPointers[])(void) = { /*0x007e*/ aiIfNumArghsGreaterThan, /*0x007f*/ aiIfNumCloseArghsLessThan, /*0x0080*/ aiIfNumCloseArghsGreaterThan, - /*0x0081*/ ai0081, - /*0x0082*/ ai0082, + /*0x0081*/ aiIfChrHealthLessThan, + /*0x0082*/ aiIfChrHealthGreaterThan, /*0x0083*/ aiIfInjured, /*0x0084*/ aiSetMorale, /*0x0085*/ aiAddMorale, @@ -14277,7 +14277,7 @@ bool (*g_CommandPointers[])(void) = { /*0x008e*/ aiIfAlertness, /*0x008f*/ aiIfChrAlertnessLessThan, /*0x0090*/ aiIfAlertnessLessThanRandom, - /*0x0091*/ ai0091, + /*0x0091*/ aiNoOp0091, /*0x0092*/ aiSetHearDistance, /*0x0093*/ aiSetViewDistance, /*0x0094*/ aiSetGrenadeProbability, @@ -14348,10 +14348,10 @@ bool (*g_CommandPointers[])(void) = { /*0x00d5*/ ai00d5, /*0x00d6*/ ai00d6, /*0x00d7*/ ai00d7, - /*0x00d8*/ ai00d8, - /*0x00d9*/ ai00d9, + /*0x00d8*/ aiNoOp00d8, + /*0x00d9*/ aiNoOp00d9, /*0x00da*/ aiSetObjImage, - /*0x00db*/ ai00db, + /*0x00db*/ aiNoOp00db, /*0x00dc*/ aiEndLevel, /*0x00dd*/ ai00dd, /*0x00de*/ aiWarpJoToPad, @@ -14373,7 +14373,7 @@ bool (*g_CommandPointers[])(void) = { /*0x00ee*/ ai00ee, /*0x00ef*/ aiIfObjInRoom, /*0x00f0*/ ai00f0, - /*0x00f1*/ ai00f1, + /*0x00f1*/ aiIfAttacking, /*0x00f2*/ ai00f2, /*0x00f3*/ aiChrSetInvincible, /*0x00f4*/ ai00f4, @@ -14386,13 +14386,13 @@ bool (*g_CommandPointers[])(void) = { /*0x00fb*/ aiChrExplosions, /*0x00fc*/ aiIfKillCountGreaterThan, /*0x00fd*/ ai00fd, - /*0x00fe*/ ai00fe, + /*0x00fe*/ aiKillBond, /*0x00ff*/ ai00ff, - /*0x0100*/ ai0100, - /*0x0101*/ ai0101, + /*0x0100*/ aiNoOp0100, + /*0x0101*/ aiNoOp0101, /*0x0102*/ aiSetLights, /*0x0103*/ ai0103, - /*0x0104*/ ai0104, + /*0x0104*/ aiRemoveObjectAtPropPreset, /*0x0105*/ ai0105, /*0x0106*/ aiSetTarget, /*0x0107*/ aiIfPresetsTargetIsNotMyTarget, @@ -14400,11 +14400,11 @@ bool (*g_CommandPointers[])(void) = { /*0x0109*/ ai0109, /*0x010a*/ ai010a, /*0x010b*/ aiChrSetTeam, - /*0x010c*/ ai010c, - /*0x010d*/ ai010d, + /*0x010c*/ aiIfCompareChrPresetsTeam, + /*0x010d*/ aiNoOp010d, /*0x010e*/ ai010e, - /*0x010f*/ ai010f, - /*0x0110*/ ai0110, + /*0x010f*/ aiIfChrShieldLessThan, + /*0x0110*/ aiIfChrShieldGreaterThan, /*0x0111*/ aiSetCameraAnimation, /*0x0112*/ ai0112, /*0x0113*/ aiIfInCutscene, @@ -14461,8 +14461,8 @@ bool (*g_CommandPointers[])(void) = { /*0x0146*/ aiRebuildSquadrons, /*0x0147*/ ai0147, /*0x0148*/ aiChrSetListening, - /*0x0149*/ ai0149, - /*0x014a*/ ai014a, + /*0x0149*/ aiIfChrListening, + /*0x014a*/ aiIfTrue, /*0x014b*/ aiIfNotListening, /*0x014c*/ NULL, /*0x014d*/ NULL, @@ -14496,7 +14496,7 @@ bool (*g_CommandPointers[])(void) = { /*0x0169*/ aiIfNaturalAnim, /*0x016a*/ aiIfY, /*0x016b*/ ai016b, - /*0x016c*/ ai016c, + /*0x016c*/ aiNoOp016c, /*0x016d*/ aiChrAdjustMotionBlur, /*0x016e*/ ai016e, /*0x016f*/ aiIfChrHasGun, @@ -14575,7 +14575,7 @@ bool (*g_CommandPointers[])(void) = { /*0x01b8*/ aiSetAutogunType, /*0x01b9*/ ai01b9, /*0x01ba*/ ai01ba, - /*0x01bb*/ ai01bb, + /*0x01bb*/ aiNoOp01bb, /*0x01bc*/ ai01bc, /*0x01bd*/ ai01bd, /*0x01be*/ aiIfChrWeaponEquipped,