diff --git a/src/game/chrai.c b/src/game/chrai.c index 32105c4dd..e527b8b7c 100644 --- a/src/game/chrai.c +++ b/src/game/chrai.c @@ -439,8 +439,17 @@ static u8 *aiIfStopped(u8 *cmd) static u8 *aiIfChrDead(u8 *cmd) { struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); + bool dead = false; - if ((!chr || !chr->prop || chr->prop->type != PROPTYPE_PLAYER) && (!chr || !chr->model || chrIsDead(chr))) { + if (!chr) { + dead = true; + } else if (chr->prop && chr->prop->type == PROPTYPE_PLAYER) { + dead = false; + } else if (!chr->model || chr->actiontype == ACT_DEAD || chr->actiontype == ACT_DIE) { + dead = true; + } + + if (dead) { cmd = AILABEL(g_Vars.ailist, cmd[3], cmd[4]); } else { cmd += 5; @@ -494,6 +503,36 @@ static u8 *aiIfChrKnockedOut(u8 *cmd) return cmd; } +static u8 *aiIfChrDeadish(u8 *cmd) +{ + struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); + bool dead = false; + + if (!chr || !chr->prop) { + dead = true; + } else if (chr->prop->type == PROPTYPE_PLAYER) { + u32 playernum = playermgrGetPlayerNumByProp(chr->prop); + dead = g_Vars.players[playernum]->isdead; + } else { + if (!chr->model + || chr->actiontype == ACT_DEAD + || chr->actiontype == ACT_DIE + || chr->actiontype == ACT_DRUGGEDKO + || chr->actiontype == ACT_DRUGGEDDROP + || chr->actiontype == ACT_DRUGGEDCOMINGUP) { + dead = true; + } + } + + if (dead) { + cmd = AILABEL(g_Vars.ailist, cmd[3], cmd[4]); + } else { + cmd += 5; + } + + return cmd; +} + /** * @cmd 0035 */ @@ -8283,6 +8322,7 @@ void chraiExecute(void *entity, s32 proptype) case 0xfa: cmd = aiFadeScreen(cmd); break; case 0xfb: cmd = aiChrEmitSparks(cmd); break; case 0xfc: cmd = aiChrKill(cmd); break; + case 0xfd: cmd = aiIfChrDeadish(cmd); break; case 0xff: cmd = aiSubCommand(cmd); break; default: while (1); diff --git a/src/game/gailists.c b/src/game/gailists.c index 650bc0284..a85721389 100644 --- a/src/game/gailists.c +++ b/src/game/gailists.c @@ -93,9 +93,7 @@ u8 func0006_unalerted[] = { label(0x16) set_target_chr(CHR_P1P2) set_shotlist(GAILIST_UNALERTED) - if_chr_dead(CHR_SELF, /*goto*/ 0x15) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x15) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x15) + if_chr_deadish(CHR_SELF, /*goto*/ 0x15) if_just_injured(CHR_SELF, /*goto*/ 0x16) if_has_gun(CHR_SELF, /*goto*/ 0x13) goto_next(0x16) @@ -826,9 +824,7 @@ u8 func0008_wakeup[] = { // About to stand up label(0x05) yield - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x13) - if_chr_dead(CHR_SELF, /*goto*/ 0x13) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x13) + if_chr_deadish(CHR_SELF, /*goto*/ 0x13) goto_next(0x15) // Dead @@ -917,9 +913,7 @@ u8 func0007_alerted[] = { set_aishootingatmelist(GAILIST_DODGE) set_darkroomlist(GAILIST_SEARCH_FOR_PLAYER) - if_chr_dead(CHR_SELF, /*goto*/ 0x16) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x16) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x16) + if_chr_deadish(CHR_SELF, /*goto*/ 0x16) goto_next(0x13) // Dying @@ -2784,9 +2778,7 @@ u8 func0007_alerted[] = { label(LABEL_TARGETGONE) set_chr_hiddenflag(CHR_SELF, CHRHFLAG_00002000) stop_chr - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x16) - if_chr_dead(CHR_SELF, /*goto*/ 0x16) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x16) + if_chr_deadish(CHR_SELF, /*goto*/ 0x16) if_can_see_target(/*goto*/ 0x13) set_alertness(0) set_self_flag_bankx(CHRFLAG1_SEARCHSAMEROOM, BANK_1) @@ -3099,9 +3091,7 @@ u8 func000c_combat_with_target_chr[] = { // Or follow through if chr still has target label(0x16) set_self_chrflag(CHRCFLAG_00000040) - if_chr_dead(CHR_SELF, /*goto*/ 0x16) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x16) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x16) + if_chr_deadish(CHR_SELF, /*goto*/ 0x16) goto_next(0x13) // Dying @@ -3249,9 +3239,7 @@ u8 func000c_combat_with_target_chr[] = { label(0x16) restart_timer - if_chr_dead(CHR_TARGET, /*goto*/ 0xba) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xba) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0xba) + if_chr_deadish(CHR_TARGET, /*goto*/ 0xba) if_chrpresets_target_is_different(/*goto*/ 0x13) goto_next(0x16) @@ -3278,9 +3266,7 @@ u8 func000c_combat_with_target_chr[] = { if_timer_gt(20, /*goto*/ 0x09) label(0x13) - if_chr_dead(CHR_TARGET, /*goto*/ 0xba) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xba) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0xba) + if_chr_deadish(CHR_TARGET, /*goto*/ 0xba) if_chrpresets_target_is_different(/*goto*/ 0x13) goto_next(0xba) @@ -3312,9 +3298,7 @@ u8 func000c_combat_with_target_chr[] = { label(0xb7) label(0xb9) if_can_see_attack_target(/*goto*/ 0xb6) - if_chr_dead(CHR_TARGET, /*goto*/ 0xba) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xba) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0xba) + if_chr_deadish(CHR_TARGET, /*goto*/ 0xba) if_chrpresets_target_is_different(/*goto*/ 0x13) goto_next(0xba) @@ -3327,9 +3311,7 @@ u8 func000c_combat_with_target_chr[] = { try_run_to_target(/*goto*/ 0xbc) beginloop(0xbc) - if_chr_dead(CHR_TARGET, /*goto*/ 0xc0) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xc0) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0xc0) + if_chr_deadish(CHR_TARGET, /*goto*/ 0xc0) if_chrpresets_target_is_different(/*goto*/ 0x13) goto_next(0xc0) @@ -3354,9 +3336,7 @@ u8 func000c_combat_with_target_chr[] = { label(0xb6) set_grenade_probability_out_of_255(255) set_self_chrflag(CHRCFLAG_00000040) - if_chr_dead(CHR_TARGET, /*goto*/ 0xc1) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xc1) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0xc1) + if_chr_deadish(CHR_TARGET, /*goto*/ 0xc1) if_chrpresets_target_is_different(/*goto*/ 0x13) goto_next(0xc1) @@ -3460,9 +3440,7 @@ u8 func000c_combat_with_target_chr[] = { #if VERSION >= VERSION_NTSC_1_0 beginloop(0xe2) - if_chr_dead(CHR_TARGET, /*goto*/ 0xc1) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xc1) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0xc1) + if_chr_deadish(CHR_TARGET, /*goto*/ 0xc1) if_chrpresets_target_is_different(/*goto*/ 0x16) goto_next(0xc1) @@ -3470,9 +3448,7 @@ u8 func000c_combat_with_target_chr[] = { if_chr_stopped(/*goto*/ 0xc1) endloop(0xe2) #else - if_chr_dead(CHR_TARGET, /*goto*/ 0xc1) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xc1) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0xc1) + if_chr_deadish(CHR_TARGET, /*goto*/ 0xc1) if_chrpresets_target_is_different(/*goto*/ 0xe2) goto_next(0xc1) @@ -3510,9 +3486,7 @@ u8 func000c_combat_with_target_chr[] = { unset_self_flag_bankx(CHRFLAG1_PUNCHAIEXTRADAMAGE, BANK_1) label(0x13) - if_chr_dead(CHR_TARGET, /*goto*/ 0xc5) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xc5) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0xc5) + if_chr_deadish(CHR_TARGET, /*goto*/ 0xc5) if_chrpresets_target_is_different(/*goto*/ 0x13) goto_next(0xc5) @@ -3543,9 +3517,7 @@ u8 func000c_combat_with_target_chr[] = { restart_timer beginloop(0xc7) - if_chr_dead(CHR_TARGET, /*goto*/ 0xc5) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xc5) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0xc5) + if_chr_deadish(CHR_TARGET, /*goto*/ 0xc5) if_enemy_distance_lt_and_los(400, /*goto*/ 0x13) if_chr_stopped(/*goto*/ 0x16) if_timer_gt(360, /*goto*/ 0x16) @@ -3561,15 +3533,7 @@ u8 func000c_combat_with_target_chr[] = { try_attack_kneel(ATTACKFLAG_AIMATTARGET | ATTACKFLAG_AIMONLY, 0, /*goto*/ 0xc9) beginloop(0xc9) -#if VERSION >= VERSION_NTSC_1_0 - if_chr_dead(CHR_TARGET, /*goto*/ 0xc5) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xc5) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0xc5) -#else - if_chr_dead(CHR_TARGET, /*goto*/ 0xa3) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xa3) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0xa3) -#endif + if_chr_deadish(CHR_TARGET, /*goto*/ 0xc5) if_chrpresets_target_is_different(/*goto*/ 0x13) goto_next(0xc5) @@ -3623,11 +3587,8 @@ u8 func000c_combat_with_target_chr[] = { say_quip(CHR_BOND, QUIP_ATTACK3, 0x19, 0x02, 0xff, BANK_0, 0x00, 0x00) say_quip(CHR_BOND, QUIP_ATTACK4, 0x19, 0x02, 0x01, BANK_0, 0x00, 0x00) -#if VERSION >= VERSION_NTSC_1_0 beginloop(0xcc) - if_chr_dead(CHR_TARGET, /*goto*/ 0xc5) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xc5) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0xc5) + if_chr_deadish(CHR_TARGET, /*goto*/ 0xc5) if_chrpresets_target_is_different(/*goto*/ 0x13) goto_next(0xc5) @@ -3635,17 +3596,6 @@ u8 func000c_combat_with_target_chr[] = { if_timer_gt(300, /*goto*/ 0x16) if_chr_stopped(/*goto*/ 0x16) endloop(0xcc) -#else - if_chr_dead(CHR_TARGET, /*goto*/ 0xa3) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xa3) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0xa3) - if_chrpresets_target_is_different(/*goto*/ 0xcc) - goto_next(0xc5) - - beginloop(0xcc) - if_chr_stopped(/*goto*/ 0x16) - endloop(0xcc) -#endif label(0x54) goto_first(0xb3) @@ -4079,9 +4029,7 @@ u8 func001a_patroller_dis_talking[] = { */ u8 func000f_hand_combat[] = { #if VERSION >= VERSION_NTSC_1_0 - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x13) - if_chr_dead(CHR_SELF, /*goto*/ 0x13) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x13) + if_chr_deadish(CHR_SELF, /*goto*/ 0x13) goto_next(0x16) // Dying @@ -4104,9 +4052,7 @@ u8 func000f_hand_combat[] = { // Begin loop beginloop(0x0c) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xfa) - if_chr_dead(CHR_TARGET, /*goto*/ 0xfa) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0xfa) + if_chr_deadish(CHR_TARGET, /*goto*/ 0xfa) // This if-statement is effectively a no op if_chrpresets_target_is_different(/*goto*/ 0x13) @@ -4145,9 +4091,7 @@ u8 func000f_hand_combat[] = { try_run_to_target(/*goto*/ 0x03) beginloop(0x03) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xfa) - if_chr_dead(CHR_TARGET, /*goto*/ 0xfa) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0xfa) + if_chr_deadish(CHR_TARGET, /*goto*/ 0xfa) label(0x13) if_timer_gt(90, /*goto*/ 0x0b) @@ -4205,9 +4149,7 @@ u8 func000f_hand_combat[] = { try_face_entity(ATTACKFLAG_AIMATTARGET, 1, /*goto*/ 0x04) beginloop(0x04) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0xfa) - if_chr_dead(CHR_TARGET, /*goto*/ 0xfa) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0xfa) + if_chr_deadish(CHR_TARGET, /*goto*/ 0xfa) label(0x13) if_distance_to_target_gt(400, /*goto*/ 0x0b) @@ -4560,9 +4502,7 @@ u8 func001b_observe_camspy[] = { endloop(0xc3) label(0x16) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x13) - if_chr_dead(CHR_TARGET, /*goto*/ 0x13) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0x13) + if_chr_deadish(CHR_TARGET, /*goto*/ 0x13) // Camspy still alive if_can_see_target(/*goto*/ 0x16) @@ -4587,9 +4527,7 @@ u8 func001b_observe_camspy[] = { * @ailist GAILIST_SEARCH_FOR_PLAYER */ u8 func001d_search_for_player[] = { - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x13) - if_chr_dead(CHR_SELF, /*goto*/ 0x13) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x13) + if_chr_deadish(CHR_SELF, /*goto*/ 0x13) goto_next(0x16) // Dying @@ -4782,9 +4720,7 @@ u8 func001d_search_for_player[] = { * @ailist GAILIST_RELATED_TO_SPAWNING */ u8 func001f_related_to_spawning[] = { - if_chr_dead(CHR_SELF, /*goto*/ 0x13) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x13) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x13) + if_chr_deadish(CHR_SELF, /*goto*/ 0x13) goto_next(0x16) // Dying @@ -5044,9 +4980,7 @@ u8 func0014_buddy_main[] = { set_morale(0) set_shotlist(GAILIST_BUDDY_MAIN) set_target_chr(CHR_BOND) - if_chr_dead(CHR_SELF, /*goto*/ 0x13) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x13) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x13) + if_chr_deadish(CHR_SELF, /*goto*/ 0x13) goto_next(0x16) // Dying @@ -5276,9 +5210,7 @@ u8 func0022_comment_on_player_dead[] = { * Do a sideways dodge, then assign GAILIST_ALERTED. */ u8 func0023_dodge[] = { - if_chr_dead(CHR_SELF, /*goto*/ 0x16) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x16) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x16) + if_chr_deadish(CHR_SELF, /*goto*/ 0x16) goto_next(0x13) // Dying @@ -5535,9 +5467,7 @@ u8 func0027_psychosised[] = { set_morale(0) set_shotlist(GAILIST_PSYCHOSISED) set_target_chr(CHR_PRESET) - if_chr_dead(CHR_SELF, /*goto*/ 0x13) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x13) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x13) + if_chr_deadish(CHR_SELF, /*goto*/ 0x13) goto_next(0x16) // Dying diff --git a/src/include/commands.h b/src/include/commands.h index 98b91f5ee..c71e63e85 100644 --- a/src/include/commands.h +++ b/src/include/commands.h @@ -427,6 +427,11 @@ chr, \ label, +#define if_chr_deadish(chr, label) \ + mkshort(0xfd00), \ + chr, \ + label, + /** * Checks if the chr has line of sight to their target. The target can be a chr, * object or the player. diff --git a/src/lib/ailist.c b/src/lib/ailist.c index ca9661464..2611323e3 100644 --- a/src/lib/ailist.c +++ b/src/lib/ailist.c @@ -312,6 +312,7 @@ u8 g_TopLengths[] = { /* 0xfa */ 8, /* 0xfb */ 3, /* 0xfc */ 3, + /* 0xfd */ 4, }; u8 g_SubLengths[] = { @@ -408,7 +409,7 @@ bool ailistIsGoto(u8 major, u8 minor) if (major == 0xff) { return minor <= 0x06; } else { - return major <= 0x93; + return major <= 0x93 || major == 0xfd; } } diff --git a/src/setups/setupame.c b/src/setups/setupame.c index 115df7459..56be7cb22 100644 --- a/src/setups/setupame.c +++ b/src/setups/setupame.c @@ -1564,9 +1564,7 @@ u8 func0414_programmer[] = { set_reaction_speed(100) set_shotlist(AILIST_PROGRAMMER) set_chr_chrflag(CHR_PROGRAMMER, CHRCFLAG_CANFACEWALL) - if_chr_dead(CHR_SELF, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) + if_chr_deadish(CHR_SELF, /*goto*/ 0x06) goto_next(0x2c) label(0x06) @@ -2161,15 +2159,11 @@ u8 func1004_check_lab_lift_located[] = { endloop(0x52) label(0x2c) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2c) - if_chr_dead(CHR_BOND, /*goto*/ 0x2c) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x2c) + if_chr_deadish(CHR_BOND, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2c) - if_chr_dead(CHR_COOP, /*goto*/ 0x2c) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x2c) + if_chr_deadish(CHR_COOP, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) diff --git a/src/setups/setupark.c b/src/setups/setupark.c index 49e69d5d5..9f69b2afd 100644 --- a/src/setups/setupark.c +++ b/src/setups/setupark.c @@ -590,9 +590,7 @@ u8 func0401_drcaroll_following[] = { label(0x00) yield set_target_chr(CHR_BOND) - if_chr_dead(CHR_SELF, /*goto*/ 0x00) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x00) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x00) + if_chr_deadish(CHR_SELF, /*goto*/ 0x00) goto_next(0x20) label(0x00) @@ -699,9 +697,7 @@ u8 func0401_drcaroll_following[] = { // Unreachable // Attempts to teleport Dr Caroll up the elevator shaft from foyer label(0x5c) - if_chr_death_animation_finished(CHR_DRCAROLL, /*goto*/ 0x20) - if_chr_dead(CHR_DRCAROLL, /*goto*/ 0x20) - if_chr_knockedout(CHR_DRCAROLL, /*goto*/ 0x20) + if_chr_deadish(CHR_DRCAROLL, /*goto*/ 0x20) chr_move_to_pad(CHR_DRCAROLL, PAD_ARK_0079, 0x00, /*goto*/ 0x00) label(0x00) goto_first(0x02) @@ -715,9 +711,7 @@ u8 func0401_drcaroll_following[] = { * Waiting at the door to the top room while you clear it out. */ u8 func0405_drcaroll_waiting[] = { - if_chr_dead(CHR_DRCAROLL, /*goto*/ 0x20) - if_chr_death_animation_finished(CHR_DRCAROLL, /*goto*/ 0x20) - if_chr_knockedout(CHR_DRCAROLL, /*goto*/ 0x20) + if_chr_deadish(CHR_DRCAROLL, /*goto*/ 0x20) goto_next(0x00) label(0x20) @@ -888,9 +882,7 @@ u8 func040f_top_guard[] = { }; u8 func0411_top_guard_blinded[] = { - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x20) - if_chr_dead(CHR_SELF, /*goto*/ 0x20) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x20) + if_chr_deadish(CHR_SELF, /*goto*/ 0x20) goto_next(0x00) label(0x20) @@ -920,9 +912,7 @@ u8 func0406_general_combat[] = { // Has gun label(0x20) - if_chr_dead(CHR_SELF, /*goto*/ 0x00) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x00) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x00) + if_chr_deadish(CHR_SELF, /*goto*/ 0x00) goto_next(0x20) // Dying - wait a few frames then say quip @@ -1375,15 +1365,11 @@ u8 func1003_check_end_level[] = { endloop(0x21) label(0x20) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x20) - if_chr_dead(CHR_BOND, /*goto*/ 0x20) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x20) + if_chr_deadish(CHR_BOND, /*goto*/ 0x20) goto_next(0x00) label(0x20) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x20) - if_chr_dead(CHR_COOP, /*goto*/ 0x20) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x20) + if_chr_deadish(CHR_COOP, /*goto*/ 0x20) goto_next(0x00) label(0x20) @@ -1469,9 +1455,7 @@ u8 func1004_elevator_unlocking[] = { u8 func1005_check_bodyguards_dead[] = { #define if_alive_goto_00(chr, goto) \ - if_chr_death_animation_finished(chr, goto) \ - if_chr_dead(chr, goto) \ - if_chr_knockedout(chr, goto) \ + if_chr_deadish(chr, goto) \ goto_next(0x00) \ label(goto) @@ -1493,9 +1477,7 @@ u8 func1005_check_bodyguards_dead[] = { if_alive_goto_00(0x19, 0x20) if_alive_goto_00(0x1a, 0x20) - if_chr_death_animation_finished(0x1b, /*goto*/ 0x20) - if_chr_dead(0x1b, /*goto*/ 0x20) - if_chr_knockedout(0x1b, /*goto*/ 0x20) + if_chr_deadish(0x1b, /*goto*/ 0x20) goto_next(0x00) label(0x00) @@ -1527,9 +1509,7 @@ u8 func1006_check_hovercopter_destroyed[] = { u8 func100e_drcaroll_warnings[] = { beginloop(0x1f) - if_chr_death_animation_finished(CHR_DRCAROLL, /*goto*/ 0x21) - if_chr_dead(CHR_DRCAROLL, /*goto*/ 0x21) - if_chr_knockedout(CHR_DRCAROLL, /*goto*/ 0x21) + if_chr_deadish(CHR_DRCAROLL, /*goto*/ 0x21) if_stage_flag_eq(STAGEFLAG_DRCAROLL_ATTACKED, TRUE, /*goto*/ 0x00) if_chr_shield_lt(CHR_DRCAROLL, 100, /*goto*/ 0x30) @@ -1539,9 +1519,7 @@ u8 func100e_drcaroll_warnings[] = { if_just_injured(CHR_DRCAROLL, /*goto*/ 0x31) label(0x00) - if_chr_death_animation_finished(CHR_DRCAROLL, /*goto*/ 0x00) - if_chr_dead(CHR_DRCAROLL, /*goto*/ 0x00) - if_chr_knockedout(CHR_DRCAROLL, /*goto*/ 0x00) + if_chr_deadish(CHR_DRCAROLL, /*goto*/ 0x00) reloop(0x1f) // Dead @@ -1984,9 +1962,7 @@ u8 func040d_cass[] = { // 2 players, or force walk failed label(0x20) - if_chr_death_animation_finished(CHR_DRCAROLL, /*goto*/ 0x20) - if_chr_dead(CHR_DRCAROLL, /*goto*/ 0x20) - if_chr_knockedout(CHR_DRCAROLL, /*goto*/ 0x20) + if_chr_deadish(CHR_DRCAROLL, /*goto*/ 0x20) set_ailist(CHR_DRCAROLL, 0x0405) label(0x20) goto_next(0x00) @@ -2784,9 +2760,7 @@ u8 func1014_msg_cantleaveany[] = { endloop(0x1f) label(0x20) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x26) - if_chr_dead(CHR_BOND, /*goto*/ 0x26) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x26) + if_chr_deadish(CHR_BOND, /*goto*/ 0x26) restart_timer beginloop(0x21) @@ -2794,20 +2768,14 @@ u8 func1014_msg_cantleaveany[] = { endloop(0x21) label(0x20) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x26) - if_chr_dead(CHR_BOND, /*goto*/ 0x26) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x26) + if_chr_deadish(CHR_BOND, /*goto*/ 0x26) speak(CHR_BOND, L_ARK_053, MP3_03AA, CHANNEL_6, COLOR_09_BLUE) // "I can't leave any bodyguards standing." label(0x26) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x27) - if_chr_dead(CHR_BOND, /*goto*/ 0x27) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x27) + if_chr_deadish(CHR_BOND, /*goto*/ 0x27) beginloop(0x5f) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x27) - if_chr_dead(CHR_BOND, /*goto*/ 0x27) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x27) + if_chr_deadish(CHR_BOND, /*goto*/ 0x27) if_sound_finished(CHANNEL_6, /*goto*/ 0x20) endloop(0x5f) @@ -2844,9 +2812,7 @@ u8 func1016_msg_make_foyer_guards_alerted[] = { endloop(0x1f) #define if_alive_set_alerted(chr) \ - if_chr_death_animation_finished(chr, /*goto*/ 0x20) \ - if_chr_dead(chr, /*goto*/ 0x20) \ - if_chr_knockedout(chr, /*goto*/ 0x20) \ + if_chr_deadish(chr, /*goto*/ 0x20) \ set_ailist(chr, GAILIST_ALERTED) \ increase_chr_alertness(100, chr) \ label(0x20) @@ -2872,63 +2838,43 @@ u8 func1017_remove_special_shock[] = { if_stage_flag_eq(STAGEFLAG_DRCAROLL_ATTACKED, TRUE, /*goto*/ 0x00) if_stage_flag_eq(STAGEFLAG_FOYER_LIGHTS_RESTORED, TRUE, /*goto*/ 0x00) - if_chr_death_animation_finished(0x01, /*goto*/ 0x20) - if_chr_dead(0x01, /*goto*/ 0x20) - if_chr_knockedout(0x01, /*goto*/ 0x20) + if_chr_deadish(0x01, /*goto*/ 0x20) reloop(0x1f) label(0x20) - if_chr_death_animation_finished(0x02, /*goto*/ 0x20) - if_chr_dead(0x02, /*goto*/ 0x20) - if_chr_knockedout(0x02, /*goto*/ 0x20) + if_chr_deadish(0x02, /*goto*/ 0x20) reloop(0x1f) label(0x20) - if_chr_death_animation_finished(0x03, /*goto*/ 0x20) - if_chr_dead(0x03, /*goto*/ 0x20) - if_chr_knockedout(0x03, /*goto*/ 0x20) + if_chr_deadish(0x03, /*goto*/ 0x20) reloop(0x1f) label(0x20) - if_chr_death_animation_finished(0x04, /*goto*/ 0x20) - if_chr_dead(0x04, /*goto*/ 0x20) - if_chr_knockedout(0x04, /*goto*/ 0x20) + if_chr_deadish(0x04, /*goto*/ 0x20) reloop(0x1f) label(0x20) - if_chr_death_animation_finished(0x05, /*goto*/ 0x20) - if_chr_dead(0x05, /*goto*/ 0x20) - if_chr_knockedout(0x05, /*goto*/ 0x20) + if_chr_deadish(0x05, /*goto*/ 0x20) reloop(0x1f) label(0x20) - if_chr_death_animation_finished(0x06, /*goto*/ 0x20) - if_chr_dead(0x06, /*goto*/ 0x20) - if_chr_knockedout(0x06, /*goto*/ 0x20) + if_chr_deadish(0x06, /*goto*/ 0x20) reloop(0x1f) label(0x20) - if_chr_death_animation_finished(0x07, /*goto*/ 0x20) - if_chr_dead(0x07, /*goto*/ 0x20) - if_chr_knockedout(0x07, /*goto*/ 0x20) + if_chr_deadish(0x07, /*goto*/ 0x20) reloop(0x1f) label(0x20) - if_chr_death_animation_finished(0x08, /*goto*/ 0x20) - if_chr_dead(0x08, /*goto*/ 0x20) - if_chr_knockedout(0x08, /*goto*/ 0x20) + if_chr_deadish(0x08, /*goto*/ 0x20) reloop(0x1f) label(0x20) - if_chr_death_animation_finished(0x09, /*goto*/ 0x20) - if_chr_dead(0x09, /*goto*/ 0x20) - if_chr_knockedout(0x09, /*goto*/ 0x20) + if_chr_deadish(0x09, /*goto*/ 0x20) reloop(0x1f) label(0x20) - if_chr_death_animation_finished(0x0a, /*goto*/ 0x20) - if_chr_dead(0x0a, /*goto*/ 0x20) - if_chr_knockedout(0x0a, /*goto*/ 0x20) + if_chr_deadish(0x0a, /*goto*/ 0x20) endloop(0x1f) label(0x20) diff --git a/src/setups/setupate.c b/src/setups/setupate.c index e38bf29ab..7803d9f56 100644 --- a/src/setups/setupate.c +++ b/src/setups/setupate.c @@ -289,9 +289,7 @@ u8 func1004_revoke_control[] = { u8 func1005_main[] = { // Wait until guard dead beginloop(0x04) - if_chr_death_animation_finished(CHR_GUARD, /*goto*/ 0x2d) - if_chr_dead(CHR_GUARD, /*goto*/ 0x2d) - if_chr_knockedout(CHR_GUARD, /*goto*/ 0x2d) + if_chr_deadish(CHR_GUARD, /*goto*/ 0x2d) endloop(0x04) label(0x2d) @@ -316,9 +314,7 @@ u8 func1005_main[] = { // Wait until Jonathan dead beginloop(0x09) - if_chr_death_animation_finished(CHR_JONATHAN, /*goto*/ 0x2d) - if_chr_dead(CHR_JONATHAN, /*goto*/ 0x2d) - if_chr_knockedout(CHR_JONATHAN, /*goto*/ 0x2d) + if_chr_deadish(CHR_JONATHAN, /*goto*/ 0x2d) endloop(0x09) label(0x2d) @@ -343,9 +339,7 @@ u8 func1005_main[] = { // Wait until Trent dead beginloop(0x0c) - if_chr_death_animation_finished(CHR_TRENT, /*goto*/ 0x2d) - if_chr_dead(CHR_TRENT, /*goto*/ 0x2d) - if_chr_knockedout(CHR_TRENT, /*goto*/ 0x2d) + if_chr_deadish(CHR_TRENT, /*goto*/ 0x2d) endloop(0x0c) label(0x2d) diff --git a/src/setups/setupazt.c b/src/setups/setupazt.c index df77e7a9a..bdf8bd9c7 100644 --- a/src/setups/setupazt.c +++ b/src/setups/setupazt.c @@ -1175,9 +1175,7 @@ u8 func1009_check_shuttle_destroyed[] = { u8 func100a_check_president_dead[] = { beginloop(0x06) - if_chr_death_animation_finished(CHR_PRESIDENT, /*goto*/ 0x31) - if_chr_dead(CHR_PRESIDENT, /*goto*/ 0x31) - if_chr_knockedout(CHR_PRESIDENT, /*goto*/ 0x31) + if_chr_deadish(CHR_PRESIDENT, /*goto*/ 0x31) endloop(0x06) label(0x31) @@ -1189,9 +1187,7 @@ u8 func100a_check_president_dead[] = { u8 func100b_check_clone_dead[] = { beginloop(0x06) - if_chr_death_animation_finished(CHR_PRES_CLONE, /*goto*/ 0x31) - if_chr_dead(CHR_PRES_CLONE, /*goto*/ 0x31) - if_chr_knockedout(CHR_PRES_CLONE, /*goto*/ 0x31) + if_chr_deadish(CHR_PRES_CLONE, /*goto*/ 0x31) endloop(0x06) label(0x31) @@ -1526,9 +1522,7 @@ u8 func041b_init_president[] = { u8 func041c_president_waiting[] = { set_shotlist(AILIST_PRESIDENT_WAITING) - if_chr_dead(CHR_SELF, /*goto*/ 0x08) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x08) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x08) + if_chr_deadish(CHR_SELF, /*goto*/ 0x08) goto_next(0x31) // Dying @@ -1562,9 +1556,7 @@ u8 func041d_president_running[] = { set_alertness(100) set_shotlist(AILIST_PRESIDENT_RUNNING) yield - if_chr_dead(CHR_SELF, /*goto*/ 0x08) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x08) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x08) + if_chr_deadish(CHR_SELF, /*goto*/ 0x08) goto_next(0x31) // Dying @@ -1708,9 +1700,7 @@ u8 func041d_president_running[] = { u8 func100e_check_robots_left[] = { beginloop(0x06) - if_chr_death_animation_finished(CHR_ROBOT1, /*goto*/ 0x31) - if_chr_dead(CHR_ROBOT1, /*goto*/ 0x31) - if_chr_knockedout(CHR_ROBOT1, /*goto*/ 0x31) + if_chr_deadish(CHR_ROBOT1, /*goto*/ 0x31) if_chr_in_room(CHR_ROBOT1, 0x00, ROOM_AZT_004A, /*goto*/ 0x08) if_chr_in_room(CHR_ROBOT1, 0x00, ROOM_AZT_004B, /*goto*/ 0x08) if_chr_in_room(CHR_ROBOT1, 0x00, ROOM_AZT_004C, /*goto*/ 0x08) @@ -1720,9 +1710,7 @@ u8 func100e_check_robots_left[] = { reloop(0x06) label(0x31) - if_chr_death_animation_finished(CHR_ROBOT2, /*goto*/ 0x31) - if_chr_dead(CHR_ROBOT2, /*goto*/ 0x31) - if_chr_knockedout(CHR_ROBOT2, /*goto*/ 0x31) + if_chr_deadish(CHR_ROBOT2, /*goto*/ 0x31) if_chr_in_room(CHR_ROBOT2, 0x00, ROOM_AZT_004A, /*goto*/ 0x08) if_chr_in_room(CHR_ROBOT2, 0x00, ROOM_AZT_004B, /*goto*/ 0x08) if_chr_in_room(CHR_ROBOT2, 0x00, ROOM_AZT_004C, /*goto*/ 0x08) @@ -1732,9 +1720,7 @@ u8 func100e_check_robots_left[] = { reloop(0x06) label(0x31) - if_chr_death_animation_finished(CHR_ROBOT3, /*goto*/ 0x31) - if_chr_dead(CHR_ROBOT3, /*goto*/ 0x31) - if_chr_knockedout(CHR_ROBOT3, /*goto*/ 0x31) + if_chr_deadish(CHR_ROBOT3, /*goto*/ 0x31) if_chr_in_room(CHR_ROBOT3, 0x00, ROOM_AZT_004A, /*goto*/ 0x08) if_chr_in_room(CHR_ROBOT3, 0x00, ROOM_AZT_004B, /*goto*/ 0x08) if_chr_in_room(CHR_ROBOT3, 0x00, ROOM_AZT_004C, /*goto*/ 0x08) @@ -1744,9 +1730,7 @@ u8 func100e_check_robots_left[] = { reloop(0x06) label(0x31) - if_chr_death_animation_finished(CHR_ROBOT4, /*goto*/ 0x31) - if_chr_dead(CHR_ROBOT4, /*goto*/ 0x31) - if_chr_knockedout(CHR_ROBOT4, /*goto*/ 0x31) + if_chr_deadish(CHR_ROBOT4, /*goto*/ 0x31) if_chr_in_room(CHR_ROBOT4, 0x00, ROOM_AZT_004A, /*goto*/ 0x08) if_chr_in_room(CHR_ROBOT4, 0x00, ROOM_AZT_004B, /*goto*/ 0x08) if_chr_in_room(CHR_ROBOT4, 0x00, ROOM_AZT_004C, /*goto*/ 0x08) @@ -1891,33 +1875,23 @@ u8 func100f_check_end_level[] = { endloop(0x0b) label(0x31) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x31) - if_chr_dead(CHR_BOND, /*goto*/ 0x31) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x31) + if_chr_deadish(CHR_BOND, /*goto*/ 0x31) goto_next(0x08) label(0x31) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x31) - if_chr_dead(CHR_COOP, /*goto*/ 0x31) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x31) + if_chr_deadish(CHR_COOP, /*goto*/ 0x31) // Jo or Velvet alive label(0x08) - if_chr_death_animation_finished(CHR_PRESIDENT, /*goto*/ 0x32) - if_chr_dead(CHR_PRESIDENT, /*goto*/ 0x32) - if_chr_knockedout(CHR_PRESIDENT, /*goto*/ 0x32) + if_chr_deadish(CHR_PRESIDENT, /*goto*/ 0x32) set_ailist(CHR_PRESIDENT, GAILIST_STOP_AND_IDLE) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x31) - if_chr_dead(CHR_BOND, /*goto*/ 0x31) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x31) + if_chr_deadish(CHR_BOND, /*goto*/ 0x31) goto_next(0x08) // Both players dead label(0x31) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x31) - if_chr_dead(CHR_COOP, /*goto*/ 0x31) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x31) + if_chr_deadish(CHR_COOP, /*goto*/ 0x31) goto_next(0x08) label(0x31) diff --git a/src/setups/setupcave.c b/src/setups/setupcave.c index c7b191dc6..1fcddaad7 100644 --- a/src/setups/setupcave.c +++ b/src/setups/setupcave.c @@ -1143,7 +1143,6 @@ u8 func040b_unused[] = { u8 func0407_stewardess[] = { set_shotlist(AILIST_STEWARDESS) if_chr_dead(CHR_SELF, /*goto*/ 0x02) - if_chr_dead(CHR_SELF, /*goto*/ 0x02) if_chr_knockedout(CHR_SELF, /*goto*/ 0x02) goto_next(0x31) @@ -1352,9 +1351,7 @@ u8 func0406_become_unalerted[] = { label(0x02) if_target_is_player(/*goto*/ 0x02) - if_chr_dead(CHR_TARGET, /*goto*/ 0x02) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x02) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0x02) + if_chr_deadish(CHR_TARGET, /*goto*/ 0x02) set_shotlist(AILIST_BECOME_UNALERTED) set_returnlist(CHR_SELF, AILIST_BECOME_UNALERTED) set_ailist(CHR_SELF, GAILIST_COMBAT_WITH_TARGET) @@ -1496,9 +1493,7 @@ u8 func040c_init_secretary[] = { u8 func0408_secretary[] = { set_shotlist(AILIST_SECRETARY) set_morale(0) - if_chr_dead(CHR_SELF, /*goto*/ 0x02) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x02) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x02) + if_chr_deadish(CHR_SELF, /*goto*/ 0x02) goto_next(0x00) label(0x02) @@ -2050,9 +2045,7 @@ u8 func0409_office1[] = { set_self_chrflag(CHRCFLAG_00040000) set_morale(0) set_shotlist(AILIST_OFFICE1) - if_chr_dead(CHR_SELF, /*goto*/ 0x02) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x02) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x02) + if_chr_deadish(CHR_SELF, /*goto*/ 0x02) goto_next(0x42) label(0x02) @@ -2187,9 +2180,7 @@ u8 func040a_office2[] = { set_self_chrflag(CHRCFLAG_00040000) set_morale(0) set_shotlist(AILIST_OFFICE2) - if_chr_dead(CHR_SELF, /*goto*/ 0x02) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x02) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x02) + if_chr_deadish(CHR_SELF, /*goto*/ 0x02) goto_next(0x42) label(0x02) @@ -2245,9 +2236,7 @@ u8 func040a_office2[] = { endloop(0x05) label(0x02) - if_chr_dead(CHR_OFFICE1, /*goto*/ 0x02) - if_chr_death_animation_finished(CHR_OFFICE1, /*goto*/ 0x02) - if_chr_knockedout(CHR_OFFICE1, /*goto*/ 0x02) + if_chr_deadish(CHR_OFFICE1, /*goto*/ 0x02) speak(CHR_TARGET, L_CAVE_043, MP3_02E9, CHANNEL_4, COLOR_09_BLUE) // "You get security - I'll deal with her..." increase_squadron_alertness(100) restart_timer @@ -2296,15 +2285,11 @@ u8 func100c_check_end_level[] = { label(0x04) set_stage_flag(STAGEFLAG_BOARDED_PLANE) unset_savefile_flag(GAMEFILEFLAG_AF1_ENTRY) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x31) - if_chr_dead(CHR_BOND, /*goto*/ 0x31) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x31) + if_chr_deadish(CHR_BOND, /*goto*/ 0x31) goto_next(0x02) label(0x31) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x31) - if_chr_dead(CHR_COOP, /*goto*/ 0x31) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x31) + if_chr_deadish(CHR_COOP, /*goto*/ 0x31) goto_next(0x02) // Both players dead @@ -2321,15 +2306,11 @@ u8 func100c_check_end_level[] = { label(0x05) set_stage_flag(STAGEFLAG_BOARDED_PLANE) set_savefile_flag(GAMEFILEFLAG_AF1_ENTRY) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x31) - if_chr_dead(CHR_BOND, /*goto*/ 0x31) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x31) + if_chr_deadish(CHR_BOND, /*goto*/ 0x31) goto_next(0x02) label(0x31) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x31) - if_chr_dead(CHR_COOP, /*goto*/ 0x31) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x31) + if_chr_deadish(CHR_COOP, /*goto*/ 0x31) goto_next(0x02) // Both players dead @@ -2417,9 +2398,7 @@ u8 func0410_unused[] = { u8 func040f_nsa[] = { set_shotlist(AILIST_NSA) - if_chr_dead(CHR_SELF, /*goto*/ 0x02) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x02) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x02) + if_chr_deadish(CHR_SELF, /*goto*/ 0x02) goto_next(0x44) label(0x02) @@ -2599,9 +2578,7 @@ u8 func0412_init_takeover_lackey[] = { u8 func0411_takeover_lackey[] = { set_shotlist(GAILIST_ALERTED) - if_chr_dead(CHR_SELF, /*goto*/ 0x02) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x02) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x02) + if_chr_deadish(CHR_SELF, /*goto*/ 0x02) goto_next(0x00) label(0x02) @@ -2610,9 +2587,7 @@ u8 func0411_takeover_lackey[] = { beginloop(0x00) chr_toggle_p1p2(CHR_SELF) set_target_chr(CHR_P1P2) - if_chr_dead(0x0c, /*goto*/ 0x7b) - if_chr_death_animation_finished(0x0c, /*goto*/ 0x7b) - if_chr_knockedout(0x0c, /*goto*/ 0x7b) + if_chr_deadish(0x0c, /*goto*/ 0x7b) if_target_in_sight(/*goto*/ 0x31) goto_next(0x02) @@ -2628,9 +2603,7 @@ u8 func0411_takeover_lackey[] = { label(0x7b) label(0x02) set_chr_team(CHR_SELF, TEAM_04) - if_chr_dead(0x0c, /*goto*/ 0x02) - if_chr_death_animation_finished(0x0c, /*goto*/ 0x02) - if_chr_knockedout(0x0c, /*goto*/ 0x02) + if_chr_deadish(0x0c, /*goto*/ 0x02) set_target_chr(0x0c) try_attack_kneel(ATTACKFLAG_AIMATTARGET | ATTACKFLAG_AIMONLY, 0, /*goto*/ 0x31) label(0x31) @@ -2668,9 +2641,7 @@ u8 unregistered_function3[] = { u8 func0414_officeworker[] = { set_morale(0) - if_chr_dead(CHR_SELF, /*goto*/ 0x02) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x02) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x02) + if_chr_deadish(CHR_SELF, /*goto*/ 0x02) goto_next(0x00) label(0x02) @@ -3261,9 +3232,7 @@ u8 func0419_ba8c[] = { set_alertness(255) set_returnlist(CHR_SELF, 0x0419) set_shotlist(0x0419) - if_chr_dead(CHR_SELF, /*goto*/ 0x02) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x02) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x02) + if_chr_deadish(CHR_SELF, /*goto*/ 0x02) goto_next(0x31) label(0x02) @@ -3916,9 +3885,7 @@ u8 func101f_msg_smallerthanithought[] = { u8 func1022_check_office1_dead[] = { beginloop(0x00) - if_chr_dead(CHR_OFFICE1, /*goto*/ 0x31) - if_chr_death_animation_finished(CHR_OFFICE1, /*goto*/ 0x31) - if_chr_knockedout(CHR_OFFICE1, /*goto*/ 0x31) + if_chr_deadish(CHR_OFFICE1, /*goto*/ 0x31) endloop(0x00) label(0x31) @@ -3929,9 +3896,7 @@ u8 func1022_check_office1_dead[] = { u8 func1023_check_office2_dead[] = { beginloop(0x00) - if_chr_dead(CHR_OFFICE2, /*goto*/ 0x31) - if_chr_death_animation_finished(CHR_OFFICE2, /*goto*/ 0x31) - if_chr_knockedout(CHR_OFFICE2, /*goto*/ 0x31) + if_chr_deadish(CHR_OFFICE2, /*goto*/ 0x31) endloop(0x00) label(0x31) @@ -4171,9 +4136,7 @@ u8 func1029_lift_doors[] = { u8 func102b_check_secretary_dead[] = { beginloop(0x00) if_stage_flag_eq(STAGEFLAG_SECURITY_SHUT_DOWN, TRUE, /*goto*/ 0x09) - if_chr_death_animation_finished(CHR_SECRETARY, /*goto*/ 0x31) - if_chr_dead(CHR_SECRETARY, /*goto*/ 0x31) - if_chr_knockedout(CHR_SECRETARY, /*goto*/ 0x31) + if_chr_deadish(CHR_SECRETARY, /*goto*/ 0x31) endloop(0x00) label(0x31) diff --git a/src/setups/setupdam.c b/src/setups/setupdam.c index 24aa9912e..f23b9337e 100644 --- a/src/setups/setupdam.c +++ b/src/setups/setupdam.c @@ -1212,32 +1212,22 @@ u8 func100c_check_end_level[] = { endloop(0x0b) label(0x07) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x07) - if_chr_dead(CHR_BOND, /*goto*/ 0x07) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x07) + if_chr_deadish(CHR_BOND, /*goto*/ 0x07) goto_next(0x08) label(0x07) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x07) - if_chr_dead(CHR_COOP, /*goto*/ 0x07) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x07) + if_chr_deadish(CHR_COOP, /*goto*/ 0x07) // Jo or Velvet alive label(0x08) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x08) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x08) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x08) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x08) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x07) - if_chr_dead(CHR_BOND, /*goto*/ 0x07) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x07) + if_chr_deadish(CHR_BOND, /*goto*/ 0x07) goto_next(0x04) // Both players dead - this check is redundant label(0x07) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x07) - if_chr_dead(CHR_COOP, /*goto*/ 0x07) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x07) + if_chr_deadish(CHR_COOP, /*goto*/ 0x07) goto_next(0x04) // Both players dead @@ -1347,9 +1337,7 @@ u8 func040e_init_labtech1[] = { u8 func040b_labtech1[] = { set_shotlist(AILIST_LABTECH1) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07) - if_chr_dead(CHR_SELF, /*goto*/ 0x07) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x07) + if_chr_deadish(CHR_SELF, /*goto*/ 0x07) goto_next(0x04) // Dying @@ -1422,9 +1410,7 @@ u8 func040f_init_labtech2[] = { u8 func040c_labtech2[] = { set_shotlist(AILIST_LABTECH2) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07) - if_chr_dead(CHR_SELF, /*goto*/ 0x07) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x07) + if_chr_deadish(CHR_SELF, /*goto*/ 0x07) goto_next(0x04) // Dying @@ -1501,9 +1487,7 @@ u8 func040d_labtech3[] = { // max health and shoot him with a weak weapon then he will start running to // lab tech 1's pads. set_shotlist(AILIST_LABTECH1) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07) - if_chr_dead(CHR_SELF, /*goto*/ 0x07) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x07) + if_chr_deadish(CHR_SELF, /*goto*/ 0x07) goto_next(0x04) // Dying @@ -1878,9 +1862,7 @@ u8 func0401_pilot_dying[] = { u8 func0401_pilot[] = { set_shotlist(AILIST_PILOT) - if_chr_dead(CHR_SELF, /*goto*/ 0x07) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x07) + if_chr_deadish(CHR_SELF, /*goto*/ 0x07) goto_next(0x00) // Dying @@ -1926,9 +1908,7 @@ u8 func0401_pilot[] = { goto_next(0x04) label(0x08) - if_chr_death_animation_finished(CHR_ANGRY_PILOT, /*goto*/ 0x09) - if_chr_dead(CHR_ANGRY_PILOT, /*goto*/ 0x09) - if_chr_knockedout(CHR_ANGRY_PILOT, /*goto*/ 0x09) + if_chr_deadish(CHR_ANGRY_PILOT, /*goto*/ 0x09) goto_first(0x0b) // Angry pilot dead or hasn't been chosen yet @@ -2038,21 +2018,15 @@ u8 func0401_pilot[] = { u8 func1011_check_pilots_dead[] = { beginloop(0x00) if_stage_flag_eq(STAGEFLAG_00080000, TRUE, /*goto*/ 0x08) - if_chr_dead(CHR_PILOT1, /*goto*/ 0x07) - if_chr_death_animation_finished(CHR_PILOT1, /*goto*/ 0x07) - if_chr_knockedout(CHR_PILOT1, /*goto*/ 0x07) + if_chr_deadish(CHR_PILOT1, /*goto*/ 0x07) reloop(0x00) label(0x07) - if_chr_dead(CHR_PILOT2, /*goto*/ 0x07) - if_chr_death_animation_finished(CHR_PILOT2, /*goto*/ 0x07) - if_chr_knockedout(CHR_PILOT2, /*goto*/ 0x07) + if_chr_deadish(CHR_PILOT2, /*goto*/ 0x07) reloop(0x00) label(0x07) - if_chr_dead(CHR_PILOT3, /*goto*/ 0x07) - if_chr_death_animation_finished(CHR_PILOT3, /*goto*/ 0x07) - if_chr_knockedout(CHR_PILOT3, /*goto*/ 0x07) + if_chr_deadish(CHR_PILOT3, /*goto*/ 0x07) endloop(0x00) // All pilots dead @@ -2093,25 +2067,19 @@ u8 func1012_choose_angry_pilot[] = { beginloop(0x03) if_kill_count_gt(0, /*goto*/ 0x08) - if_chr_dead(CHR_PILOT1, /*goto*/ 0x3b) - if_chr_death_animation_finished(CHR_PILOT1, /*goto*/ 0x3b) - if_chr_knockedout(CHR_PILOT1, /*goto*/ 0x3b) + if_chr_deadish(CHR_PILOT1, /*goto*/ 0x3b) if_chr_has_flag_bankx(CHR_PILOT1, CHRFLAG0_COVER_TYPE2, BANK_0, /*goto*/ 0x3b) set_ailist(CHR_PILOT1, AILIST_ANGRY_PILOT) set_ailist(CHR_SELF, GAILIST_IDLE) label(0x3b) - if_chr_dead(CHR_PILOT2, /*goto*/ 0x3c) - if_chr_death_animation_finished(CHR_PILOT2, /*goto*/ 0x3c) - if_chr_knockedout(CHR_PILOT2, /*goto*/ 0x3c) + if_chr_deadish(CHR_PILOT2, /*goto*/ 0x3c) if_chr_has_flag_bankx(CHR_PILOT2, CHRFLAG0_COVER_TYPE2, BANK_0, /*goto*/ 0x3c) set_ailist(CHR_PILOT2, AILIST_ANGRY_PILOT) set_ailist(CHR_SELF, GAILIST_IDLE) label(0x3c) - if_chr_dead(CHR_PILOT3, /*goto*/ 0x04) - if_chr_death_animation_finished(CHR_PILOT3, /*goto*/ 0x04) - if_chr_knockedout(CHR_PILOT3, /*goto*/ 0x04) + if_chr_deadish(CHR_PILOT3, /*goto*/ 0x04) if_chr_has_flag_bankx(CHR_PILOT3, CHRFLAG0_COVER_TYPE2, BANK_0, /*goto*/ 0x04) set_ailist(CHR_PILOT3, AILIST_ANGRY_PILOT) set_ailist(CHR_SELF, GAILIST_IDLE) @@ -2137,9 +2105,7 @@ u8 func0404_angry_pilot[] = { unset_self_flag_bankx(CHRFLAG0_ALERT_ON_HEARSPAWN, BANK_0) set_self_chrflag(CHRCFLAG_00000040) set_shotlist(AILIST_ANGRY_PILOT) - if_chr_dead(CHR_SELF, /*goto*/ 0x07) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x07) + if_chr_deadish(CHR_SELF, /*goto*/ 0x07) goto_next(0x04) // Dying @@ -2168,25 +2134,19 @@ u8 func0404_angry_pilot[] = { // Select another pilot as target label(0x04) - if_chr_dead(CHR_PILOT1, /*goto*/ 0x3b) - if_chr_death_animation_finished(CHR_PILOT1, /*goto*/ 0x3b) - if_chr_knockedout(CHR_PILOT1, /*goto*/ 0x3b) + if_chr_deadish(CHR_PILOT1, /*goto*/ 0x3b) if_chr_has_flag_bankx(CHR_PILOT1, CHRFLAG0_GP1, BANK_0, /*goto*/ 0x3b) set_target_chr(CHR_PILOT1) goto_next(0x00) label(0x3b) - if_chr_dead(CHR_PILOT2, /*goto*/ 0x3c) - if_chr_death_animation_finished(CHR_PILOT2, /*goto*/ 0x3c) - if_chr_knockedout(CHR_PILOT2, /*goto*/ 0x3c) + if_chr_deadish(CHR_PILOT2, /*goto*/ 0x3c) if_chr_has_flag_bankx(CHR_PILOT2, CHRFLAG0_GP1, BANK_0, /*goto*/ 0x3c) set_target_chr(CHR_PILOT2) goto_next(0x00) label(0x3c) - if_chr_dead(CHR_PILOT3, /*goto*/ 0x04) - if_chr_death_animation_finished(CHR_PILOT3, /*goto*/ 0x04) - if_chr_knockedout(CHR_PILOT3, /*goto*/ 0x04) + if_chr_deadish(CHR_PILOT3, /*goto*/ 0x04) if_chr_has_flag_bankx(CHR_PILOT3, CHRFLAG0_GP1, BANK_0, /*goto*/ 0x04) set_target_chr(CHR_PILOT3) goto_next(0x00) @@ -2448,9 +2408,7 @@ u8 func101b_reactor_hum[] = { u8 func0415_elvis_at_start[] = { set_shotlist(AILIST_ELVIS_AT_START) - if_chr_dead(CHR_SELF, /*goto*/ 0x07) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x07) + if_chr_deadish(CHR_SELF, /*goto*/ 0x07) goto_next(0x04) // Dying @@ -2592,9 +2550,7 @@ u8 func0415_elvis_at_start[] = { */ u8 func0416_elvis_leading[] = { set_shotlist(AILIST_ELVIS_LEADING) - if_chr_dead(CHR_SELF, /*goto*/ 0x07) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x07) + if_chr_deadish(CHR_SELF, /*goto*/ 0x07) goto_next(0x04) // Dying @@ -2667,9 +2623,7 @@ u8 func0416_elvis_leading[] = { u8 func101c_check_elvis_dead[] = { beginloop(0x00) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x07) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x07) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x07) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x07) endloop(0x00) label(0x07) @@ -2693,9 +2647,7 @@ u8 func0418_elvis_at_moonpool[] = { endloop(0x00) label(0x07) - if_chr_dead(CHR_SELF, /*goto*/ 0x07) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x07) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x07) + if_chr_deadish(CHR_SELF, /*goto*/ 0x07) do_preset_animation(PRESETANIM_TALKRANDOM) set_stage_flag(STAGEFLAG_MET_ELVIS) speak(CHR_P1P2, L_DAM_034, SFX_81A4, CHANNEL_6, COLOR_06_WHITE) // "Joanna... What took you so long? Follow me - let's..." diff --git a/src/setups/setupdepo.c b/src/setups/setupdepo.c index 2d08e50d0..1e5e634e0 100644 --- a/src/setups/setupdepo.c +++ b/src/setups/setupdepo.c @@ -1162,9 +1162,7 @@ u8 func100a_give_keycards[] = { endloop(0x04) label(0x2c) - if_chr_dead(CHR_CLOAK_1A, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_CLOAK_1A, /*goto*/ 0x06) - if_chr_knockedout(CHR_CLOAK_1A, /*goto*/ 0x06) + if_chr_deadish(CHR_CLOAK_1A, /*goto*/ 0x06) // First cloacked guard is alive give_object_to_chr(OBJ_KEYCARD1, CHR_CLOAK_1A) @@ -1202,9 +1200,7 @@ u8 func100a_give_keycards[] = { // Second room label(0x2c) - if_chr_dead(CHR_CLOAK_2A, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_CLOAK_2A, /*goto*/ 0x06) - if_chr_knockedout(CHR_CLOAK_2A, /*goto*/ 0x06) + if_chr_deadish(CHR_CLOAK_2A, /*goto*/ 0x06) // 2A alive give_object_to_chr(OBJ_KEYCARD2, CHR_CLOAK_2A) @@ -1212,17 +1208,13 @@ u8 func100a_give_keycards[] = { // 2A dead label(0x06) - if_chr_dead(CHR_CLOAK_2B, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_CLOAK_2B, /*goto*/ 0x06) - if_chr_knockedout(CHR_CLOAK_2B, /*goto*/ 0x06) + if_chr_deadish(CHR_CLOAK_2B, /*goto*/ 0x06) give_object_to_chr(OBJ_KEYCARD2, CHR_CLOAK_2B) goto_next(0x2c) // 2B dead label(0x06) - if_chr_dead(CHR_CLOAK_2C, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_CLOAK_2C, /*goto*/ 0x06) - if_chr_knockedout(CHR_CLOAK_2C, /*goto*/ 0x06) + if_chr_deadish(CHR_CLOAK_2C, /*goto*/ 0x06) give_object_to_chr(OBJ_KEYCARD2, CHR_CLOAK_2C) goto_next(0x2c) @@ -1418,9 +1410,7 @@ u8 func1012_check_for_end[] = { reloop(0x08) label(0x06) - if_chr_death_animation_finished(CHR_P1P2, /*goto*/ 0x2c) - if_chr_dead(CHR_P1P2, /*goto*/ 0x2c) - if_chr_knockedout(CHR_P1P2, /*goto*/ 0x2c) + if_chr_deadish(CHR_P1P2, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) endloop(0x08) @@ -1448,15 +1438,11 @@ u8 func1012_check_for_end[] = { // Objectives complete label(0x53) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2c) - if_chr_dead(CHR_BOND, /*goto*/ 0x2c) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x2c) + if_chr_deadish(CHR_BOND, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2c) - if_chr_dead(CHR_COOP, /*goto*/ 0x2c) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x2c) + if_chr_deadish(CHR_COOP, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) @@ -2268,9 +2254,7 @@ u8 func0412_cloak_guard[] = { set_morale(0) set_shotlist(AILIST_CLOAK_GUARD) set_chr_cloaked(CHR_SELF, TRUE, FALSE) - if_chr_dead(CHR_SELF, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) + if_chr_deadish(CHR_SELF, /*goto*/ 0x06) goto_next(0x03) // Dead @@ -2979,12 +2963,8 @@ u8 func0411_hide[] = { u8 func1027_cloak1_check_one_remaining[] = { // Wait until either cloak guard dying (in first room) beginloop(0x04) - if_chr_dead(CHR_CLOAK_1A, /*goto*/ 0x2c) - if_chr_death_animation_finished(CHR_CLOAK_1A, /*goto*/ 0x2c) - if_chr_knockedout(CHR_CLOAK_1A, /*goto*/ 0x2c) - if_chr_dead(CHR_CLOAK_1B, /*goto*/ 0x2c) - if_chr_death_animation_finished(CHR_CLOAK_1B, /*goto*/ 0x2c) - if_chr_knockedout(CHR_CLOAK_1B, /*goto*/ 0x2c) + if_chr_deadish(CHR_CLOAK_1A, /*goto*/ 0x2c) + if_chr_deadish(CHR_CLOAK_1B, /*goto*/ 0x2c) endloop(0x04) label(0x2c) @@ -2997,33 +2977,25 @@ u8 func1028_cloak2_check_one_remaining[] = { // Count number of dead cloak guards in second room beginloop(0x04) set_morale(0) - if_chr_dead(CHR_CLOAK_2A, /*goto*/ 0x2c) - if_chr_death_animation_finished(CHR_CLOAK_2A, /*goto*/ 0x2c) - if_chr_knockedout(CHR_CLOAK_2A, /*goto*/ 0x2c) + if_chr_deadish(CHR_CLOAK_2A, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) add_morale(1) label(0x06) - if_chr_dead(CHR_CLOAK_2B, /*goto*/ 0x2c) - if_chr_death_animation_finished(CHR_CLOAK_2B, /*goto*/ 0x2c) - if_chr_knockedout(CHR_CLOAK_2B, /*goto*/ 0x2c) + if_chr_deadish(CHR_CLOAK_2B, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) add_morale(1) label(0x06) - if_chr_dead(CHR_CLOAK_2C, /*goto*/ 0x2c) - if_chr_death_animation_finished(CHR_CLOAK_2C, /*goto*/ 0x2c) - if_chr_knockedout(CHR_CLOAK_2C, /*goto*/ 0x2c) + if_chr_deadish(CHR_CLOAK_2C, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) add_morale(1) label(0x06) - if_chr_dead(CHR_CLOAK_2D, /*goto*/ 0x2c) - if_chr_death_animation_finished(CHR_CLOAK_2D, /*goto*/ 0x2c) - if_chr_knockedout(CHR_CLOAK_2D, /*goto*/ 0x2c) + if_chr_deadish(CHR_CLOAK_2D, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) diff --git a/src/setups/setupdish.c b/src/setups/setupdish.c index 320f76754..42079f3d0 100644 --- a/src/setups/setupdish.c +++ b/src/setups/setupdish.c @@ -4551,9 +4551,7 @@ u8 func0403_holo4_guard1[] = { set_shotlist(AILIST_HOLO4_GUARD1) beginloop(0x04) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2f) - if_chr_dead(CHR_SELF, /*goto*/ 0x2f) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2f) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2f) endloop(0x04) label(0x2f) @@ -4572,9 +4570,7 @@ u8 func0404_holo4_guard2[] = { set_shotlist(AILIST_HOLO4_GUARD2) label(0x04) yield - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2f) - if_chr_dead(CHR_SELF, /*goto*/ 0x2f) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2f) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2f) goto_next(0x06) label(0x2f) @@ -4629,9 +4625,7 @@ u8 func1033_holo4_part1[] = { beginloop(0x04) if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x57) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x57) - if_chr_death_animation_finished(0x0d, /*goto*/ 0x2f) - if_chr_dead(0x0d, /*goto*/ 0x2f) - if_chr_knockedout(0x0d, /*goto*/ 0x2f) + if_chr_deadish(0x0d, /*goto*/ 0x2f) endloop(0x04) label(0x2f) @@ -4642,9 +4636,7 @@ u8 func1033_holo4_part1[] = { yield if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x57) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x57) - if_chr_death_animation_finished(0x0e, /*goto*/ 0x2f) - if_chr_dead(0x0e, /*goto*/ 0x2f) - if_chr_knockedout(0x0e, /*goto*/ 0x2f) + if_chr_deadish(0x0e, /*goto*/ 0x2f) goto_first(0x04) label(0x2f) @@ -4655,9 +4647,7 @@ u8 func1033_holo4_part1[] = { yield if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x57) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x57) - if_chr_death_animation_finished(0x0f, /*goto*/ 0x2f) - if_chr_dead(0x0f, /*goto*/ 0x2f) - if_chr_knockedout(0x0f, /*goto*/ 0x2f) + if_chr_deadish(0x0f, /*goto*/ 0x2f) goto_first(0x04) label(0x2f) @@ -4805,9 +4795,7 @@ u8 func0407_holo5_guard1[] = { label(0x04) yield label(0x2f) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x30) - if_chr_dead(CHR_SELF, /*goto*/ 0x30) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x30) + if_chr_deadish(CHR_SELF, /*goto*/ 0x30) if_has_gun(CHR_SELF, /*goto*/ 0x06) label(0x2f) #if VERSION >= VERSION_NTSC_1_0 @@ -4890,17 +4878,13 @@ u8 func0409_holo5_guard2[] = { set_shotlist(AILIST_HOLO5_GUARD2) label(0x04) yield - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2f) - if_chr_dead(CHR_SELF, /*goto*/ 0x2f) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2f) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2f) restart_timer assign_path(0) start_patrol label(0x08) yield - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2f) - if_chr_dead(CHR_SELF, /*goto*/ 0x2f) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2f) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2f) if_target_in_sight(/*goto*/ 0x09) unset_self_chrflag(CHRCFLAG_INVINCIBLE) set_alertness(0) @@ -4956,9 +4940,7 @@ u8 func040b_holo5_guard3[] = { set_ailist(CHR_SELF, AILIST_HOLO_GUARD_ARMED_UNALERT) beginloop(0x04) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2f) - if_chr_dead(CHR_SELF, /*goto*/ 0x2f) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2f) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2f) endloop(0x04) label(0x2f) @@ -5005,9 +4987,7 @@ u8 func1034_holo5_part1[] = { yield if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x0d) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x0d) - if_chr_death_animation_finished(0x11, /*goto*/ 0x2f) - if_chr_dead(0x11, /*goto*/ 0x2f) - if_chr_knockedout(0x11, /*goto*/ 0x2f) + if_chr_deadish(0x11, /*goto*/ 0x2f) goto_first(0x04) label(0x2f) @@ -5017,9 +4997,7 @@ u8 func1034_holo5_part1[] = { yield if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x0d) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x0d) - if_chr_death_animation_finished(0x12, /*goto*/ 0x2f) - if_chr_dead(0x12, /*goto*/ 0x2f) - if_chr_knockedout(0x12, /*goto*/ 0x2f) + if_chr_deadish(0x12, /*goto*/ 0x2f) goto_first(0x04) label(0x2f) @@ -5384,9 +5362,7 @@ u8 func102f_holo1_part1[] = { yield if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x0d) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x0d) - if_chr_dead(0x13, /*goto*/ 0x2f) - if_chr_death_animation_finished(0x13, /*goto*/ 0x2f) - if_chr_knockedout(0x13, /*goto*/ 0x2f) + if_chr_deadish(0x13, /*goto*/ 0x2f) endloop(0x04) label(0x2f) @@ -5396,9 +5372,7 @@ u8 func102f_holo1_part1[] = { yield if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x0d) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x0d) - if_chr_dead(0x14, /*goto*/ 0x2f) - if_chr_death_animation_finished(0x14, /*goto*/ 0x2f) - if_chr_knockedout(0x14, /*goto*/ 0x2f) + if_chr_deadish(0x14, /*goto*/ 0x2f) goto_first(0x04) label(0x2f) @@ -5408,9 +5382,7 @@ u8 func102f_holo1_part1[] = { yield if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x0d) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x0d) - if_chr_dead(0x15, /*goto*/ 0x2f) - if_chr_death_animation_finished(0x15, /*goto*/ 0x2f) - if_chr_knockedout(0x15, /*goto*/ 0x2f) + if_chr_deadish(0x15, /*goto*/ 0x2f) goto_first(0x04) label(0x2f) @@ -5420,9 +5392,7 @@ u8 func102f_holo1_part1[] = { yield if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x0d) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x0d) - if_chr_dead(0x16, /*goto*/ 0x2f) - if_chr_death_animation_finished(0x16, /*goto*/ 0x2f) - if_chr_knockedout(0x16, /*goto*/ 0x2f) + if_chr_deadish(0x16, /*goto*/ 0x2f) goto_first(0x04) label(0x2f) @@ -5690,9 +5660,7 @@ u8 func1031_holo7_part1[] = { yield if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x0d) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x0d) - if_chr_dead(0x19, /*goto*/ 0x2f) - if_chr_death_animation_finished(0x19, /*goto*/ 0x2f) - if_chr_knockedout(0x19, /*goto*/ 0x2f) + if_chr_deadish(0x19, /*goto*/ 0x2f) endloop(0x04) label(0x2f) @@ -5703,9 +5671,7 @@ u8 func1031_holo7_part1[] = { yield if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x0d) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x0d) - if_chr_dead(0x1a, /*goto*/ 0x2f) - if_chr_death_animation_finished(0x1a, /*goto*/ 0x2f) - if_chr_knockedout(0x1a, /*goto*/ 0x2f) + if_chr_deadish(0x1a, /*goto*/ 0x2f) goto_first(0x04) label(0x2f) @@ -5716,9 +5682,7 @@ u8 func1031_holo7_part1[] = { yield if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x0d) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x0d) - if_chr_dead(0x1b, /*goto*/ 0x2f) - if_chr_death_animation_finished(0x1b, /*goto*/ 0x2f) - if_chr_knockedout(0x1b, /*goto*/ 0x2f) + if_chr_deadish(0x1b, /*goto*/ 0x2f) goto_first(0x04) label(0x2f) @@ -5729,9 +5693,7 @@ u8 func1031_holo7_part1[] = { yield if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x0d) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x0d) - if_chr_dead(0x17, /*goto*/ 0x2f) - if_chr_death_animation_finished(0x17, /*goto*/ 0x2f) - if_chr_knockedout(0x17, /*goto*/ 0x2f) + if_chr_deadish(0x17, /*goto*/ 0x2f) goto_first(0x04) label(0x2f) @@ -5742,9 +5704,7 @@ u8 func1031_holo7_part1[] = { yield if_stage_flag_eq(STAGEFLAG_HOLO_ABORTING, TRUE, /*goto*/ 0x0d) if_stage_flag_eq(STAGEFLAG_GENERAL_PURPOSE, TRUE, /*goto*/ 0x0d) - if_chr_dead(0x18, /*goto*/ 0x2f) - if_chr_death_animation_finished(0x18, /*goto*/ 0x2f) - if_chr_knockedout(0x18, /*goto*/ 0x2f) + if_chr_deadish(0x18, /*goto*/ 0x2f) goto_first(0x04) label(0x2f) diff --git a/src/setups/setupear.c b/src/setups/setupear.c index 68301f711..8c32e3316 100644 --- a/src/setups/setupear.c +++ b/src/setups/setupear.c @@ -933,9 +933,7 @@ u8 func0405_init_scientist[] = { u8 func0404_scientist[] = { set_shotlist(AILIST_SCIENTIST) - if_chr_dead(CHR_SELF, /*goto*/ 0x2f) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2f) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2f) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2f) goto_next(0x06) label(0x2f) @@ -990,16 +988,12 @@ u8 func0404_scientist[] = { chr_do_animation(ANIM_COWER_0229, -1, -1, CHRANIMFLAG_SLOWUPDATE, 10, CHR_SELF, 2) beginloop(0x6b) - if_chr_dead(0x2b, /*goto*/ 0x2f) - if_chr_death_animation_finished(0x2b, /*goto*/ 0x2f) - if_chr_knockedout(0x2b, /*goto*/ 0x2f) + if_chr_deadish(0x2b, /*goto*/ 0x2f) if_chr_stopped(/*goto*/ 0x6c) reloop(0x6b) label(0x2f) - if_chr_dead(0x2c, /*goto*/ 0x06) - if_chr_death_animation_finished(0x2c, /*goto*/ 0x06) - if_chr_knockedout(0x2c, /*goto*/ 0x06) + if_chr_deadish(0x2c, /*goto*/ 0x06) if_chr_stopped(/*goto*/ 0x6c) endloop(0x6b) @@ -1010,16 +1004,12 @@ u8 func0404_scientist[] = { chr_do_animation(ANIM_COWER_0229, -1, -1, CHRANIMFLAG_SLOWUPDATE, 10, CHR_SELF, 2) beginloop(0x6e) - if_chr_dead(0x2d, /*goto*/ 0x2f) - if_chr_death_animation_finished(0x2d, /*goto*/ 0x2f) - if_chr_knockedout(0x2d, /*goto*/ 0x2f) + if_chr_deadish(0x2d, /*goto*/ 0x2f) if_chr_stopped(/*goto*/ 0x6f) reloop(0x6e) label(0x2f) - if_chr_dead(0x2e, /*goto*/ 0x06) - if_chr_death_animation_finished(0x2e, /*goto*/ 0x06) - if_chr_knockedout(0x2e, /*goto*/ 0x06) + if_chr_deadish(0x2e, /*goto*/ 0x06) if_chr_stopped(/*goto*/ 0x6f) endloop(0x6e) @@ -1169,9 +1159,7 @@ u8 func0407_init_nasty_scientist[] = { u8 func0406_nasty_scientist[] = { set_shotlist(AILIST_NASTY_SCIENTIST) - if_chr_dead(CHR_SELF, /*goto*/ 0x2f) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2f) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2f) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2f) goto_next(0x06) label(0x2f) @@ -2621,15 +2609,11 @@ u8 func100f_check_for_end_level[] = { endloop(0x04) label(0x2f) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2f) - if_chr_dead(CHR_BOND, /*goto*/ 0x2f) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x2f) + if_chr_deadish(CHR_BOND, /*goto*/ 0x2f) goto_next(0x06) label(0x2f) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2f) - if_chr_dead(CHR_COOP, /*goto*/ 0x2f) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x2f) + if_chr_deadish(CHR_COOP, /*goto*/ 0x2f) goto_next(0x06) label(0x2f) diff --git a/src/setups/setupeld.c b/src/setups/setupeld.c index d9d94a8fd..a9c200d00 100644 --- a/src/setups/setupeld.c +++ b/src/setups/setupeld.c @@ -1644,15 +1644,11 @@ u8 func0402_taker[] = { u8 func100f_check_takers_dead[] = { beginloop(0x04) - if_chr_dead(CHR_TAKER1, /*goto*/ 0x2d) - if_chr_death_animation_finished(CHR_TAKER1, /*goto*/ 0x2d) - if_chr_knockedout(CHR_TAKER1, /*goto*/ 0x2d) + if_chr_deadish(CHR_TAKER1, /*goto*/ 0x2d) reloop(0x04) label(0x2d) - if_chr_dead(CHR_TAKER2, /*goto*/ 0x2d) - if_chr_death_animation_finished(CHR_TAKER2, /*goto*/ 0x2d) - if_chr_knockedout(CHR_TAKER2, /*goto*/ 0x2d) + if_chr_deadish(CHR_TAKER2, /*goto*/ 0x2d) endloop(0x04) label(0x2d) @@ -2252,21 +2248,15 @@ u8 func100c_check_hackers_dead[] = { yield yield yield - if_chr_dead(CHR_HACKER1, /*goto*/ 0x2d) - if_chr_death_animation_finished(CHR_HACKER1, /*goto*/ 0x2d) - if_chr_knockedout(CHR_HACKER1, /*goto*/ 0x2d) + if_chr_deadish(CHR_HACKER1, /*goto*/ 0x2d) reloop(0x04) label(0x2d) - if_chr_dead(CHR_HACKER2, /*goto*/ 0x2d) - if_chr_death_animation_finished(CHR_HACKER2, /*goto*/ 0x2d) - if_chr_knockedout(CHR_HACKER2, /*goto*/ 0x2d) + if_chr_deadish(CHR_HACKER2, /*goto*/ 0x2d) reloop(0x04) label(0x2d) - if_chr_dead(CHR_HACKER3, /*goto*/ 0x2d) - if_chr_death_animation_finished(CHR_HACKER3, /*goto*/ 0x2d) - if_chr_knockedout(CHR_HACKER3, /*goto*/ 0x2d) + if_chr_deadish(CHR_HACKER3, /*goto*/ 0x2d) endloop(0x04) label(0x2d) @@ -2321,14 +2311,10 @@ u8 func100e_check_objectives_complete[] = { set_ailist(CHR_SELF, GAILIST_IDLE) label(0x2d) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2d) - if_chr_dead(CHR_BOND, /*goto*/ 0x2d) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x2d) + if_chr_deadish(CHR_BOND, /*goto*/ 0x2d) goto_next(0x06) label(0x2d) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2d) - if_chr_dead(CHR_COOP, /*goto*/ 0x2d) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x2d) + if_chr_deadish(CHR_COOP, /*goto*/ 0x2d) goto_next(0x06) // Mission failed - players dead @@ -2337,9 +2323,7 @@ u8 func100e_check_objectives_complete[] = { set_ailist(CHR_SELF, GAILIST_IDLE) label(0x06) - if_chr_dead(CHR_CARRINGTON, /*goto*/ 0x2d) - if_chr_death_animation_finished(CHR_CARRINGTON, /*goto*/ 0x2d) - if_chr_knockedout(CHR_CARRINGTON, /*goto*/ 0x2d) + if_chr_deadish(CHR_CARRINGTON, /*goto*/ 0x2d) // Mission complete set_ailist(CHR_SELF, AILIST_OUTRO) @@ -2435,9 +2419,7 @@ u8 func1014_give_keycard[] = { label(0x06) #define give_keycard_if_alive(chr) \ - if_chr_death_animation_finished(chr, /*goto*/ 0x2d) \ - if_chr_dead(chr, /*goto*/ 0x2d) \ - if_chr_knockedout(chr, /*goto*/ 0x2d) \ + if_chr_deadish(chr, /*goto*/ 0x2d) \ give_object_to_chr(OBJ_KEYCARD, chr) \ goto_next(0x09) \ label(0x2d) @@ -2976,9 +2958,7 @@ u8 func101e_unlock_doors[] = { u8 func101f_check_one_basement_guard_remaining[] = { #define inc_var_if_chr_dead(chr) \ - if_chr_dead(chr, /*goto*/ 0x2d) \ - if_chr_death_animation_finished(chr, /*goto*/ 0x2d) \ - if_chr_knockedout(chr, /*goto*/ 0x2d) \ + if_chr_deadish(chr, /*goto*/ 0x2d) \ goto_next(0x06) \ label(0x2d) \ add_morale(1) \ diff --git a/src/setups/setupimp.c b/src/setups/setupimp.c index b20f27e9d..5e9ba610a 100644 --- a/src/setups/setupimp.c +++ b/src/setups/setupimp.c @@ -1594,9 +1594,7 @@ u8 func0416_init_hostage_fr2[] = { u8 func0414_firingrange_hostage[] = { set_shotlist(AILIST_FIRINGRANGE_HOSTAGE) - if_chr_dead(CHR_SELF, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2e) goto_next(0x04) label(0x2e) @@ -1720,9 +1718,7 @@ u8 func041a_hostage_holo[] = { set_self_chrflag(CHRCFLAG_CLONEABLE) set_self_chrflag(CHRCFLAG_00040000) set_shotlist(AILIST_HOSTAGE_HOLO) - if_chr_dead(CHR_SELF, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2e) goto_next(0x04) // Dying @@ -1950,9 +1946,7 @@ u8 func0423_init_shock[] = { u8 func0426_init_saved_hostage[] = { set_shotlist(AILIST_HOSTAGE_THANK_AND_RUN) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_dead(CHR_SELF, /*goto*/ 0x2e) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2e) set_chr_team(CHR_SELF, TEAM_NONCOMBAT) add_health_or_armor(80) set_chr_maxdamage(CHR_SELF, 1) @@ -1968,9 +1962,7 @@ u8 func0426_init_saved_hostage[] = { u8 func0425_hostage_thank_and_run[] = { set_shotlist(AILIST_HOSTAGE_THANK_AND_RUN) - if_chr_dead(CHR_SELF, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2e) goto_next(0x03) label(0x2e) @@ -2060,9 +2052,7 @@ u8 func0427_drop_devastator[] = { set_ailist(CHR_SELF, AILIST_HOSTAGE_THANK_AND_RUN) label(0x08) - if_chr_dead(CHR_SELF, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2e) goto_next(0x03) label(0x2e) @@ -2123,21 +2113,15 @@ u8 func0427_drop_devastator[] = { u8 func100f_check_holo_takers_dead[] = { beginloop(0x03) - if_chr_dead(CHR_TAKER_HOLO1, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_TAKER_HOLO1, /*goto*/ 0x2e) - if_chr_knockedout(CHR_TAKER_HOLO1, /*goto*/ 0x2e) + if_chr_deadish(CHR_TAKER_HOLO1, /*goto*/ 0x2e) reloop(0x03) label(0x2e) - if_chr_dead(CHR_TAKER_HOLO2, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_TAKER_HOLO2, /*goto*/ 0x2e) - if_chr_knockedout(CHR_TAKER_HOLO2, /*goto*/ 0x2e) + if_chr_deadish(CHR_TAKER_HOLO2, /*goto*/ 0x2e) reloop(0x03) label(0x2e) - if_chr_dead(CHR_TAKER_HOLO3, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_TAKER_HOLO3, /*goto*/ 0x2e) - if_chr_knockedout(CHR_TAKER_HOLO3, /*goto*/ 0x2e) + if_chr_deadish(CHR_TAKER_HOLO3, /*goto*/ 0x2e) endloop(0x03) label(0x2e) @@ -2148,15 +2132,11 @@ u8 func100f_check_holo_takers_dead[] = { u8 func1010_check_device_takers_dead[] = { beginloop(0x03) - if_chr_dead(CHR_TAKER_DEVICE_M, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_TAKER_DEVICE_M, /*goto*/ 0x2e) - if_chr_knockedout(CHR_TAKER_DEVICE_M, /*goto*/ 0x2e) + if_chr_deadish(CHR_TAKER_DEVICE_M, /*goto*/ 0x2e) reloop(0x03) label(0x2e) - if_chr_dead(CHR_TAKER_DEVICE_F, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_TAKER_DEVICE_F, /*goto*/ 0x2e) - if_chr_knockedout(CHR_TAKER_DEVICE_F, /*goto*/ 0x2e) + if_chr_deadish(CHR_TAKER_DEVICE_F, /*goto*/ 0x2e) endloop(0x03) label(0x2e) @@ -2167,15 +2147,11 @@ u8 func1010_check_device_takers_dead[] = { u8 func1011_check_info_takers_dead[] = { beginloop(0x03) - if_chr_dead(CHR_TAKER_INFO_F, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_TAKER_INFO_F, /*goto*/ 0x2e) - if_chr_knockedout(CHR_TAKER_INFO_F, /*goto*/ 0x2e) + if_chr_deadish(CHR_TAKER_INFO_F, /*goto*/ 0x2e) reloop(0x03) label(0x2e) - if_chr_dead(CHR_TAKER_INFO_M, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_TAKER_INFO_M, /*goto*/ 0x2e) - if_chr_knockedout(CHR_TAKER_INFO_M, /*goto*/ 0x2e) + if_chr_deadish(CHR_TAKER_INFO_M, /*goto*/ 0x2e) endloop(0x03) label(0x2e) @@ -2200,9 +2176,7 @@ u8 func042d_init_hostage_device_m[] = { u8 func042b_deviceroom_hostage[] = { set_shotlist(AILIST_DEVICEROOM_HOSTAGE) - if_chr_dead(CHR_SELF, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2e) goto_next(0x12) label(0x2e) @@ -2345,9 +2319,7 @@ u8 func0430_taker_device_f[] = { u8 func0432_taker_attack[] = { #if VERSION >= VERSION_NTSC_1_0 set_shotlist(AILIST_TAKER_ATTACK) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_dead(CHR_SELF, /*goto*/ 0x2e) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2e) goto_next(0x08) // Dying @@ -2412,9 +2384,7 @@ u8 func0435_init_hostage_info_f[] = { u8 func0433_inforoom_hostage[] = { set_shotlist(AILIST_INFOROOM_HOSTAGE) - if_chr_dead(CHR_SELF, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2e) goto_next(0x04) label(0x2e) @@ -2517,9 +2487,7 @@ u8 func0437_init_taker_info_m[] = { u8 func0436_taker_info_m[] = { set_shotlist(AILIST_TAKER_INFO_M) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_dead(CHR_SELF, /*goto*/ 0x2e) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2e) goto_next(0x08) // Dying @@ -2550,9 +2518,7 @@ u8 func0439_init_taker_info_f[] = { u8 func0438_taker_info_f[] = { set_shotlist(AILIST_TAKER_INFO_F) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_dead(CHR_SELF, /*goto*/ 0x2e) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2e) goto_next(0x08) // Dying @@ -2580,29 +2546,21 @@ u8 func1013_check_hostages_saved[] = { yield beginloop(0x0a) - if_chr_dead(CHR_HOSTAGE_FR1, /*goto*/ 0x2f) - if_chr_death_animation_finished(CHR_HOSTAGE_FR1, /*goto*/ 0x2f) - if_chr_knockedout(CHR_HOSTAGE_FR1, /*goto*/ 0x2f) + if_chr_deadish(CHR_HOSTAGE_FR1, /*goto*/ 0x2f) goto_next(0x2e) // FR1 hostage dead label(0x2f) - if_chr_dead(CHR_HOSTAGE_FR2, /*goto*/ 0x2f) - if_chr_death_animation_finished(CHR_HOSTAGE_FR2, /*goto*/ 0x2f) - if_chr_knockedout(CHR_HOSTAGE_FR2, /*goto*/ 0x2f) + if_chr_deadish(CHR_HOSTAGE_FR2, /*goto*/ 0x2f) // FR1 hostage alive label(0x2e) - if_chr_dead(CHR_TAKER_FR1, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_TAKER_FR1, /*goto*/ 0x2e) - if_chr_knockedout(CHR_TAKER_FR1, /*goto*/ 0x2e) + if_chr_deadish(CHR_TAKER_FR1, /*goto*/ 0x2e) endloop(0x0a) // FR1 hostage alive and FR1 taker dead label(0x2e) - if_chr_dead(CHR_TAKER_FR2, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_TAKER_FR2, /*goto*/ 0x2e) - if_chr_knockedout(CHR_TAKER_FR2, /*goto*/ 0x2e) + if_chr_deadish(CHR_TAKER_FR2, /*goto*/ 0x2e) goto_first(0x0a) // Both FR hostages dead @@ -2611,37 +2569,27 @@ u8 func1013_check_hostages_saved[] = { // Both FR takers dead label(0x2e) if_stage_flag_eq(STAGEFLAG_DEVICE_TAKERS_DEAD, TRUE, /*goto*/ 0x2e) - if_chr_dead(CHR_HOSTAGE_DEVICE_F, /*goto*/ 0x2f) - if_chr_death_animation_finished(CHR_HOSTAGE_DEVICE_F, /*goto*/ 0x2f) - if_chr_knockedout(CHR_HOSTAGE_DEVICE_F, /*goto*/ 0x2f) + if_chr_deadish(CHR_HOSTAGE_DEVICE_F, /*goto*/ 0x2f) goto_first(0x0a) label(0x2f) - if_chr_dead(CHR_HOSTAGE_DEVICE_M, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_HOSTAGE_DEVICE_M, /*goto*/ 0x2e) - if_chr_knockedout(CHR_HOSTAGE_DEVICE_M, /*goto*/ 0x2e) + if_chr_deadish(CHR_HOSTAGE_DEVICE_M, /*goto*/ 0x2e) goto_first(0x0a) // FR and device room done label(0x2e) if_stage_flag_eq(STAGEFLAG_INFO_TAKERS_DEAD, TRUE, /*goto*/ 0x2e) - if_chr_dead(CHR_HOSTAGE_INFO_M, /*goto*/ 0x2f) - if_chr_death_animation_finished(CHR_HOSTAGE_INFO_M, /*goto*/ 0x2f) - if_chr_knockedout(CHR_HOSTAGE_INFO_M, /*goto*/ 0x2f) + if_chr_deadish(CHR_HOSTAGE_INFO_M, /*goto*/ 0x2f) goto_first(0x0a) label(0x2f) - if_chr_dead(CHR_HOSTAGE_INFO_F, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_HOSTAGE_INFO_F, /*goto*/ 0x2e) - if_chr_knockedout(CHR_HOSTAGE_INFO_F, /*goto*/ 0x2e) + if_chr_deadish(CHR_HOSTAGE_INFO_F, /*goto*/ 0x2e) goto_first(0x0a) // FR, device and info rooms done label(0x2e) if_stage_flag_eq(STAGEFLAG_HOLO_TAKERS_DEAD, TRUE, /*goto*/ 0x2e) - if_chr_dead(CHR_HOSTAGE_HOLO, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_HOSTAGE_HOLO, /*goto*/ 0x2e) - if_chr_knockedout(CHR_HOSTAGE_HOLO, /*goto*/ 0x2e) + if_chr_deadish(CHR_HOSTAGE_HOLO, /*goto*/ 0x2e) goto_first(0x0a) // All rooms done @@ -2930,15 +2878,11 @@ u8 func1014_carrington_messages[] = { endloop(0xcb) label(0x2e) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2e) - if_chr_dead(CHR_BOND, /*goto*/ 0x2e) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x2e) + if_chr_deadish(CHR_BOND, /*goto*/ 0x2e) goto_next(0x08) label(0x2e) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2e) - if_chr_dead(CHR_COOP, /*goto*/ 0x2e) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x2e) + if_chr_deadish(CHR_COOP, /*goto*/ 0x2e) goto_next(0x08) label(0x2e) @@ -4009,9 +3953,7 @@ u8 unregistered_function3[] = { #if VERSION >= VERSION_NTSC_1_0 u8 func102d_firingrange_taker_invincibility[] = { beginloop(0x03) - if_chr_death_animation_finished(CHR_TAKER_FR1, /*goto*/ 0x2e) - if_chr_dead(CHR_TAKER_FR1, /*goto*/ 0x2e) - if_chr_knockedout(CHR_TAKER_FR1, /*goto*/ 0x2e) + if_chr_deadish(CHR_TAKER_FR1, /*goto*/ 0x2e) if_chr_in_room(CHR_TAKER_FR1, 0x00, 0x0007, /*goto*/ 0x2e) if_chr_in_room(CHR_TAKER_FR1, 0x00, 0x0008, /*goto*/ 0x2e) if_chr_in_room(CHR_TAKER_FR1, 0x00, 0x0009, /*goto*/ 0x2e) @@ -4019,9 +3961,7 @@ u8 func102d_firingrange_taker_invincibility[] = { unset_chr_chrflag(CHR_TAKER_FR1, CHRCFLAG_INVINCIBLE) label(0x2e) - if_chr_death_animation_finished(CHR_TAKER_FR2, /*goto*/ 0x2e) - if_chr_dead(CHR_TAKER_FR2, /*goto*/ 0x2e) - if_chr_knockedout(CHR_TAKER_FR2, /*goto*/ 0x2e) + if_chr_deadish(CHR_TAKER_FR2, /*goto*/ 0x2e) if_chr_in_room(CHR_TAKER_FR2, 0x00, 0x0007, /*goto*/ 0x2e) if_chr_in_room(CHR_TAKER_FR2, 0x00, 0x0008, /*goto*/ 0x2e) if_chr_in_room(CHR_TAKER_FR2, 0x00, 0x0009, /*goto*/ 0x2e) diff --git a/src/setups/setuplee.c b/src/setups/setuplee.c index 349490dd5..963fa4815 100644 --- a/src/setups/setuplee.c +++ b/src/setups/setuplee.c @@ -831,9 +831,7 @@ u8 func040d_elvis_wait_for_hangar_entry[] = { u8 func040e_elvis_give_ar34[] = { set_shotlist(AILIST_ELVIS_GIVE_AR34) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) - if_chr_dead(CHR_SELF, /*goto*/ 0x2c) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) @@ -925,9 +923,7 @@ u8 func0409_elvis_follow[] = { #endif set_shotlist(AILIST_ELVIS_FOLLOW) set_returnlist(CHR_SELF, AILIST_ELVIS_FOLLOW) - if_chr_dead(CHR_SELF, /*goto*/ 0x2c) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2c) goto_next(0x06) // Dying @@ -1015,9 +1011,7 @@ u8 func0409_elvis_follow[] = { // Enemy detected label(0x08) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x2c) - if_chr_dead(CHR_TARGET, /*goto*/ 0x2c) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0x2c) + if_chr_deadish(CHR_TARGET, /*goto*/ 0x2c) if_chrpresets_target_is_different(/*goto*/ 0x06) label(0x2c) goto_first(0x03) @@ -1084,9 +1078,7 @@ u8 func041d_init_elvis_outside_prebridgelift[] = { u8 func041c_elvis_outside_prebridgelift[] = { set_shotlist(AILIST_ELVIS_OUTSIDE_PREBRIDGELIFT) - if_chr_dead(CHR_SELF, /*goto*/ 0x2c) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2c) goto_next(0x06) // Dying @@ -1123,9 +1115,7 @@ u8 func041c_elvis_outside_prebridgelift[] = { u8 func040a_elvis_go_to_hangar_lift[] = { set_shotlist(AILIST_ELVIS_GO_TO_HANGAR_LIFT) - if_chr_dead(CHR_SELF, /*goto*/ 0x2c) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2c) goto_next(0x06) // Dying @@ -1180,9 +1170,7 @@ u8 func040a_elvis_go_to_hangar_lift[] = { u8 func041b_elvis_at_bridge[] = { stop_chr set_shotlist(AILIST_ELVIS_AT_BRIDGE) - if_chr_dead(CHR_SELF, /*goto*/ 0x2c) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2c) goto_next(0x06) // Dying @@ -1237,9 +1225,7 @@ u8 func041b_elvis_at_bridge[] = { u8 func1005_check_elvis_dead[] = { beginloop(0x04) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x2c) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x2c) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x2c) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x2c) endloop(0x04) label(0x2c) @@ -1250,9 +1236,7 @@ u8 func1005_check_elvis_dead[] = { }; u8 func040f_init_skedar[] = { - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x0d) - if_chr_dead(CHR_SELF, /*goto*/ 0x0d) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x0d) + if_chr_deadish(CHR_SELF, /*goto*/ 0x0d) // Alive set_accuracy(VERSION >= VERSION_NTSC_1_0 ? 20 : 40) @@ -1271,9 +1255,7 @@ u8 func040f_init_skedar[] = { }; u8 func0410_wake_suspendedanim_skedar[] = { - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) - if_chr_dead(CHR_SELF, /*goto*/ 0x2c) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) @@ -1329,9 +1311,7 @@ u8 func1006_wake_slayer_skedar[] = { unlock_door(0x14, 0x02) open_door(0x13) - if_chr_death_animation_finished(CHR_SUSPENDEDANIM3, /*goto*/ 0x2c) - if_chr_dead(CHR_SUSPENDEDANIM3, /*goto*/ 0x2c) - if_chr_knockedout(CHR_SUSPENDEDANIM3, /*goto*/ 0x2c) + if_chr_deadish(CHR_SUSPENDEDANIM3, /*goto*/ 0x2c) set_ailist(CHR_SUSPENDEDANIM3, AILIST_WAKE_SUSPENDEDANIM_SKEDAR) set_chr_team(CHR_SUSPENDEDANIM3, TEAM_ENEMY) @@ -1478,9 +1458,7 @@ u8 func1008_hangar_lifts[] = { label(0x2c) set_object_flag(OBJ_HANGARLIFT_JO, OBJFLAG_DEACTIVATED) unset_object_flag(OBJ_HANGARLIFT_ELVIS, OBJFLAG_DEACTIVATED) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x2c) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x2c) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x2c) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x2c) set_ailist(CHR_ELVIS, GAILIST_STOP_AND_IDLE) yield @@ -1517,9 +1495,7 @@ u8 func1008_hangar_lifts[] = { endloop(0x0c) label(0x2c) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x2c) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x2c) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x2c) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x2c) set_ailist(CHR_ELVIS, AILIST_ELVIS_FOLLOW) label(0x2c) @@ -1872,9 +1848,7 @@ u8 func0414_hangarclone[] = { u8 func0419_hangar_maian[] = { set_shotlist(AILIST_HANGAR_MAIAN) set_self_chrflag(CHRCFLAG_NOAUTOAIM) - if_chr_dead(CHR_SELF, /*goto*/ 0x2c) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) @@ -2048,9 +2022,7 @@ u8 func100c_engineroom[] = { endloop(0x04) label(0x06) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x2c) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x2c) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x2c) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x2c) set_ailist(CHR_ELVIS, AILIST_ELVIS_RUN_FROM_ENGINEROOM) play_x_track(XREASON_DEFAULT, 10, 10) speak(CHR_BOND, L_LEE_046, MP3_03D7, CHANNEL_6, COLOR_04_ORANGE) // "We have to get out of here!" @@ -2301,9 +2273,7 @@ u8 func0415_bridgespawner[] = { // morale is 0 or 1 label(0x2c) if_never_been_onscreen(/*goto*/ 0x4d) - if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x2c) - if_chr_dead(CHR_CLONE, /*goto*/ 0x2c) - if_chr_knockedout(CHR_CLONE, /*goto*/ 0x2c) + if_chr_deadish(CHR_CLONE, /*goto*/ 0x2c) label(0x2c) if_can_see_target(/*goto*/ 0x08) endloop(0x04) @@ -2330,9 +2300,7 @@ u8 func0415_bridgespawner[] = { // Check clone is dead label(0x2c) - if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x4d) - if_chr_dead(CHR_CLONE, /*goto*/ 0x4d) - if_chr_knockedout(CHR_CLONE, /*goto*/ 0x4d) + if_chr_deadish(CHR_CLONE, /*goto*/ 0x4d) goto_first(0x04) // Spawn @@ -2394,9 +2362,7 @@ u8 func0417_init_spawner_reveal[] = { u8 func041a_bridgeclone[] = { set_shotlist(AILIST_BRIDGECLONE) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) - if_chr_dead(CHR_SELF, /*goto*/ 0x2c) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2c) goto_next(0x06) // Dying @@ -2423,9 +2389,7 @@ u8 func041a_bridgeclone[] = { label(0x03) beginloop(LABEL_C2) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x2c) - if_chr_dead(CHR_TARGET, /*goto*/ 0x2c) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0x2c) + if_chr_deadish(CHR_TARGET, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) @@ -2441,9 +2405,7 @@ u8 func041a_bridgeclone[] = { beginloop(0x08) if_chr_dead(CHR_SELF, /*goto*/ LABEL_B8) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x10) - if_chr_dead(CHR_TARGET, /*goto*/ 0x10) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0x10) + if_chr_deadish(CHR_TARGET, /*goto*/ 0x10) if_timer_gt(120, /*goto*/ 0x09) endloop(0x08) @@ -2454,9 +2416,7 @@ u8 func041a_bridgeclone[] = { // Start running beginloop(0x0a) if_chr_dead(CHR_SELF, /*goto*/ LABEL_B8) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x10) - if_chr_dead(CHR_TARGET, /*goto*/ 0x10) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0x10) + if_chr_deadish(CHR_TARGET, /*goto*/ 0x10) if_target_moving_away(/*goto*/ 0x2c) if_distance_to_target_lt(150, /*goto*/ 0x2e) label(0x2c) @@ -2477,9 +2437,7 @@ u8 func041a_bridgeclone[] = { beginloop(0x0b) if_chr_dead(CHR_SELF, /*goto*/ LABEL_B8) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x10) - if_chr_dead(CHR_TARGET, /*goto*/ 0x10) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0x10) + if_chr_deadish(CHR_TARGET, /*goto*/ 0x10) if_target_in_fov_left(10, /*goto*/ 0x06) if_target_out_of_fov_left(246, /*goto*/ 0x06) if_timer_gt(15, /*goto*/ 0x06) @@ -2492,9 +2450,7 @@ u8 func041a_bridgeclone[] = { beginloop(0x2f) if_chr_dead(CHR_SELF, /*goto*/ LABEL_B8) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x10) - if_chr_dead(CHR_TARGET, /*goto*/ 0x10) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0x10) + if_chr_deadish(CHR_TARGET, /*goto*/ 0x10) if_chr_stopped(/*goto*/ 0x06) endloop(0x2f) @@ -2522,21 +2478,15 @@ u8 func041a_bridgeclone[] = { u8 func100f_bridge_entry[] = { // Wait until 3 bridge Skedar dead beginloop(0x09) - if_chr_dead(CHR_BRIDGE1, /*goto*/ 0x2c) - if_chr_death_animation_finished(CHR_BRIDGE1, /*goto*/ 0x2c) - if_chr_knockedout(CHR_BRIDGE1, /*goto*/ 0x2c) + if_chr_deadish(CHR_BRIDGE1, /*goto*/ 0x2c) reloop(0x09) label(0x2c) - if_chr_dead(CHR_BRIDGE2, /*goto*/ 0x2c) - if_chr_death_animation_finished(CHR_BRIDGE2, /*goto*/ 0x2c) - if_chr_knockedout(CHR_BRIDGE2, /*goto*/ 0x2c) + if_chr_deadish(CHR_BRIDGE2, /*goto*/ 0x2c) reloop(0x09) label(0x2c) - if_chr_dead(CHR_BRIDGE3, /*goto*/ 0x2c) - if_chr_death_animation_finished(CHR_BRIDGE3, /*goto*/ 0x2c) - if_chr_knockedout(CHR_BRIDGE3, /*goto*/ 0x2c) + if_chr_deadish(CHR_BRIDGE3, /*goto*/ 0x2c) endloop(0x09) label(0x2c) @@ -2591,15 +2541,11 @@ u8 func1010_check_bridge_captured[] = { if_stage_flag_eq(STAGEFLAG_BRIDGE_DOORS_UNLOCKED, TRUE, /*goto*/ 0x2c) if_timer_gt(3600, /*goto*/ 0x0d) label(0x2c) - if_chr_death_animation_finished(CHR_BRIDGESPAWNER1, /*goto*/ 0x2c) - if_chr_dead(CHR_BRIDGESPAWNER1, /*goto*/ 0x2c) - if_chr_knockedout(CHR_BRIDGESPAWNER1, /*goto*/ 0x2c) + if_chr_deadish(CHR_BRIDGESPAWNER1, /*goto*/ 0x2c) reloop(0x09) label(0x2c) - if_chr_death_animation_finished(CHR_BRIDGESPAWNER2, /*goto*/ 0x2c) - if_chr_dead(CHR_BRIDGESPAWNER2, /*goto*/ 0x2c) - if_chr_knockedout(CHR_BRIDGESPAWNER2, /*goto*/ 0x2c) + if_chr_deadish(CHR_BRIDGESPAWNER2, /*goto*/ 0x2c) endloop(0x09) // 60 seconds elapsed @@ -2631,15 +2577,11 @@ u8 func1011_check_end_level[] = { endloop(0x08) label(0x06) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2c) - if_chr_dead(CHR_BOND, /*goto*/ 0x2c) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x2c) + if_chr_deadish(CHR_BOND, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2c) - if_chr_dead(CHR_COOP, /*goto*/ 0x2c) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x2c) + if_chr_deadish(CHR_COOP, /*goto*/ 0x2c) goto_next(0x06) // Both players dead @@ -2649,9 +2591,7 @@ u8 func1011_check_end_level[] = { // Either buddy is alive label(0x06) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x2c) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x2c) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x2c) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x2c) // Mission complete set_invincible(CHR_BOND) @@ -3086,9 +3026,7 @@ u8 func0420_init_bridge3[] = { */ u8 func0421_bridge_skedar[] = { set_shotlist(AILIST_BRIDGE_SKEDAR) - if_chr_dead(CHR_SELF, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) + if_chr_deadish(CHR_SELF, /*goto*/ 0x06) goto_next(0x2c) // Dying @@ -3329,9 +3267,7 @@ u8 func0422_cass[] = { beginloop(LABEL_C2) damage_chr(CHR_SELF, WEAPON_SUPERDRAGON) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) - if_chr_dead(CHR_SELF, /*goto*/ 0x2c) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2c) endloop(LABEL_C2) label(0x2c) diff --git a/src/setups/setuplip.c b/src/setups/setuplip.c index ff4cccb91..904813c13 100644 --- a/src/setups/setuplip.c +++ b/src/setups/setuplip.c @@ -1526,9 +1526,7 @@ u8 func0412_init_labtech_showers[] = { u8 func0410_labtech_showers_sa_pa[] = { set_shotlist(AILIST_LABTECH_SA_PA) - if_chr_dead(CHR_SELF, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) + if_chr_deadish(CHR_SELF, /*goto*/ 0x06) goto_next(LABEL_2D) label(0x06) @@ -1916,9 +1914,7 @@ u8 func0419_init_doorman[] = { u8 func0418_doorman[] = { set_shotlist(GAILIST_ALERTED) - if_chr_dead(CHR_SELF, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) + if_chr_deadish(CHR_SELF, /*goto*/ 0x06) goto_next(LABEL_2D) label(0x06) @@ -2092,9 +2088,7 @@ u8 func0418_doorman[] = { u8 func100b_check_doorman_dead[] = { beginloop(0x04) chr_toggle_p1p2(CHR_SELF) - if_chr_dead(CHR_DOORMAN, /*goto*/ LABEL_2D) - if_chr_death_animation_finished(CHR_DOORMAN, /*goto*/ LABEL_2D) - if_chr_knockedout(CHR_DOORMAN, /*goto*/ LABEL_2D) + if_chr_deadish(CHR_DOORMAN, /*goto*/ LABEL_2D) reloop(0x04) label(LABEL_2D) @@ -2142,9 +2136,7 @@ u8 func100b_check_doorman_dead[] = { */ u8 func041a_labtech_harrysmate[] = { set_shotlist(AILIST_LABTECH_HARRYSMATE) - if_chr_dead(CHR_SELF, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) + if_chr_deadish(CHR_SELF, /*goto*/ 0x06) goto_next(LABEL_2D) label(0x06) @@ -2242,9 +2234,7 @@ u8 func041a_labtech_harrysmate[] = { u8 func041b_labtech_keycardguy[] = { set_shotlist(AILIST_LABTECH_KEYCARDGUY) - if_chr_dead(CHR_SELF, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) + if_chr_deadish(CHR_SELF, /*goto*/ 0x06) goto_next(LABEL_2D) // Dying @@ -2415,15 +2405,11 @@ u8 func100f_check_end_level[] = { restart_timer beginloop(LABEL_5C) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ LABEL_2D) - if_chr_dead(CHR_BOND, /*goto*/ LABEL_2D) - if_chr_knockedout(CHR_BOND, /*goto*/ LABEL_2D) + if_chr_deadish(CHR_BOND, /*goto*/ LABEL_2D) goto_next(0x06) label(LABEL_2D) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ LABEL_2D) - if_chr_dead(CHR_COOP, /*goto*/ LABEL_2D) - if_chr_knockedout(CHR_COOP, /*goto*/ LABEL_2D) + if_chr_deadish(CHR_COOP, /*goto*/ LABEL_2D) goto_next(0x06) label(LABEL_2D) @@ -2453,30 +2439,22 @@ u8 func1010_give_keycard[] = { label(LABEL_2D) label(LABEL_2D) - if_chr_dead(0x23, /*goto*/ 0x06) - if_chr_death_animation_finished(0x23, /*goto*/ 0x06) - if_chr_knockedout(0x23, /*goto*/ 0x06) + if_chr_deadish(0x23, /*goto*/ 0x06) give_object_to_chr(0x10, 0x23) goto_next(LABEL_2D) label(0x06) - if_chr_dead(0x24, /*goto*/ 0x06) - if_chr_death_animation_finished(0x24, /*goto*/ 0x06) - if_chr_knockedout(0x24, /*goto*/ 0x06) + if_chr_deadish(0x24, /*goto*/ 0x06) give_object_to_chr(0x10, 0x24) goto_next(LABEL_2D) label(0x06) - if_chr_dead(0x25, /*goto*/ 0x06) - if_chr_death_animation_finished(0x25, /*goto*/ 0x06) - if_chr_knockedout(0x25, /*goto*/ 0x06) + if_chr_deadish(0x25, /*goto*/ 0x06) give_object_to_chr(0x10, 0x25) goto_next(LABEL_2D) label(0x06) - if_chr_death_animation_finished(0x26, /*goto*/ LABEL_2D) - if_chr_dead(0x26, /*goto*/ LABEL_2D) - if_chr_knockedout(0x26, /*goto*/ LABEL_2D) + if_chr_deadish(0x26, /*goto*/ LABEL_2D) label(LABEL_2D) unset_object_flag2(0x10, OBJFLAG2_INVISIBLE) @@ -2492,9 +2470,7 @@ u8 func0414_init_mechanic[] = { u8 func0413_mechanic[] = { set_shotlist(AILIST_MECHANIC) - if_chr_dead(CHR_SELF, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) + if_chr_deadish(CHR_SELF, /*goto*/ 0x06) goto_next(LABEL_2D) label(0x06) @@ -2797,9 +2773,7 @@ u8 func1016_check_undisguised[] = { u8 func041f_labtech_lights[] = { set_shotlist(AILIST_LABTECH_LIGHTS) - if_chr_dead(CHR_SELF, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) + if_chr_deadish(CHR_SELF, /*goto*/ 0x06) goto_next(LABEL_2D) label(0x06) @@ -3024,9 +2998,7 @@ u8 func0421_init_labtech_doors[] = { u8 func0420_labtech_doors[] = { set_self_chrflag(CHRCFLAG_CANFACEWALL) set_shotlist(AILIST_LABTECH_DOORS) - if_chr_dead(CHR_SELF, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) + if_chr_deadish(CHR_SELF, /*goto*/ 0x06) goto_next(LABEL_2D) label(0x06) @@ -3230,9 +3202,7 @@ u8 func0423_init_labtech_records[] = { u8 func0422_labtech_records[] = { set_shotlist(AILIST_LABTECH_RECORDS) - if_chr_dead(CHR_SELF, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) + if_chr_deadish(CHR_SELF, /*goto*/ 0x06) goto_next(LABEL_2D) label(0x06) set_shotlist(GAILIST_IDLE) @@ -4535,9 +4505,7 @@ u8 func102c_msg_hurry[] = { */ u8 func0416_become_unaware[] = { set_chr_hiddenflag(CHR_SELF, CHRHFLAG_00002000) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x0f) - if_chr_dead(CHR_SELF, /*goto*/ 0x0f) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x0f) + if_chr_deadish(CHR_SELF, /*goto*/ 0x0f) if_can_see_target(/*goto*/ LABEL_2D) set_alertness(0) return @@ -4688,33 +4656,25 @@ u8 func1031_toggle_doorman[] = { u8 func1032_count_last_room_guards[] = { beginloop(0x04) set_morale(0) - if_chr_dead(0x23, /*goto*/ LABEL_2D) - if_chr_death_animation_finished(0x23, /*goto*/ LABEL_2D) - if_chr_knockedout(0x23, /*goto*/ LABEL_2D) + if_chr_deadish(0x23, /*goto*/ LABEL_2D) goto_next(0x06) label(LABEL_2D) add_morale(1) label(0x06) - if_chr_dead(0x24, /*goto*/ LABEL_2D) - if_chr_death_animation_finished(0x24, /*goto*/ LABEL_2D) - if_chr_knockedout(0x24, /*goto*/ LABEL_2D) + if_chr_deadish(0x24, /*goto*/ LABEL_2D) goto_next(0x06) label(LABEL_2D) add_morale(1) label(0x06) - if_chr_dead(0x25, /*goto*/ LABEL_2D) - if_chr_death_animation_finished(0x25, /*goto*/ LABEL_2D) - if_chr_knockedout(0x25, /*goto*/ LABEL_2D) + if_chr_deadish(0x25, /*goto*/ LABEL_2D) goto_next(0x06) label(LABEL_2D) add_morale(1) label(0x06) - if_chr_dead(0x26, /*goto*/ LABEL_2D) - if_chr_death_animation_finished(0x26, /*goto*/ LABEL_2D) - if_chr_knockedout(0x26, /*goto*/ LABEL_2D) + if_chr_deadish(0x26, /*goto*/ LABEL_2D) goto_next(0x06) label(LABEL_2D) diff --git a/src/setups/setuplue.c b/src/setups/setuplue.c index 28582dc86..28ed0edef 100644 --- a/src/setups/setuplue.c +++ b/src/setups/setuplue.c @@ -1315,15 +1315,11 @@ u8 func1008_check_end_level[] = { set_stage_flag(STAGEFLAG_MET_JON) yield yield - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2e) - if_chr_dead(CHR_BOND, /*goto*/ 0x2e) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x2e) + if_chr_deadish(CHR_BOND, /*goto*/ 0x2e) goto_next(0x06) label(0x2e) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2e) - if_chr_dead(CHR_COOP, /*goto*/ 0x2e) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x2e) + if_chr_deadish(CHR_COOP, /*goto*/ 0x2e) goto_next(0x06) label(0x2e) @@ -1623,9 +1619,7 @@ u8 func0417_traitor[] = { u8 func0416_mechanic[] = { set_shotlist(AILIST_MECHANIC) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_dead(CHR_SELF, /*goto*/ 0x2e) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2e) goto_next(0x06) label(0x2e) @@ -2631,15 +2625,11 @@ u8 func1018_unhide_guards[] = { reloop(0x04) label(0x06) - if_chr_death_animation_finished(0x10, /*goto*/ 0x06) - if_chr_dead(0x10, /*goto*/ 0x06) - if_chr_knockedout(0x10, /*goto*/ 0x06) + if_chr_deadish(0x10, /*goto*/ 0x06) goto_first(0x04) label(0x06) - if_chr_death_animation_finished(0x11, /*goto*/ 0x2e) - if_chr_dead(0x11, /*goto*/ 0x2e) - if_chr_knockedout(0x11, /*goto*/ 0x2e) + if_chr_deadish(0x11, /*goto*/ 0x2e) endloop(0x04) // Enable 4 more guards - the ones inside the blue door @@ -2751,15 +2741,11 @@ u8 func1019_spawn_guards_at_antenna[] = { reloop(0x04) label(0x06) - if_chr_death_animation_finished(0x10, /*goto*/ 0x06) - if_chr_dead(0x10, /*goto*/ 0x06) - if_chr_knockedout(0x10, /*goto*/ 0x06) + if_chr_deadish(0x10, /*goto*/ 0x06) reloop(0x04) label(0x06) - if_chr_death_animation_finished(0x11, /*goto*/ 0x2e) - if_chr_dead(0x11, /*goto*/ 0x2e) - if_chr_knockedout(0x11, /*goto*/ 0x2e) + if_chr_deadish(0x11, /*goto*/ 0x2e) endloop(0x04) // Spawn 3 guards diff --git a/src/setups/setuppam.c b/src/setups/setuppam.c index f8479f86b..a36f5df23 100644 --- a/src/setups/setuppam.c +++ b/src/setups/setuppam.c @@ -759,9 +759,7 @@ u8 func0402_elvis_follow_and_reactive_teleportals[] = { set_returnlist(CHR_SELF, AILIST_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) set_shotlist(AILIST_ELVIS_FOLLOW_AND_REACTIVATE_TELEPORTALS) set_target_chr(CHR_PRESET) - if_chr_dead(CHR_SELF, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2e) goto_next(0x06) // Dying @@ -943,9 +941,7 @@ u8 func0404_elvis_follow_and_do_agent_megaweapon[] = { unset_self_flag_bankx(CHRFLAG1_NOOP_00200000, BANK_1) set_shotlist(AILIST_ELVIS_FOLLOW_AND_DO_AGENT_MEGAWEAPON) set_target_chr(CHR_PRESET) - if_chr_dead(CHR_SELF, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2e) goto_next(0x06) // Dying @@ -1080,9 +1076,7 @@ u8 func0405_elvis_follow_nocombat[] = { unset_self_flag_bankx(CHRFLAG1_NOOP_00200000, BANK_1) set_shotlist(0x0405) set_target_chr(CHR_PRESET) - if_chr_dead(CHR_SELF, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2e) goto_next(0x06) // Dying @@ -1157,9 +1151,7 @@ u8 func0405_elvis_follow_nocombat[] = { u8 func0406_elvis_follow_and_do_sa_megaweapon[] = { set_shotlist(AILIST_ELVIS_FOLLOW_AND_DO_SA_MEGAWEAPON) set_target_chr(CHR_PRESET) - if_chr_dead(CHR_SELF, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2e) goto_next(0x06) // Dying @@ -1257,9 +1249,7 @@ u8 func0406_elvis_follow_and_do_sa_megaweapon[] = { u8 func0407_elvis_go_to_sa_teleport[] = { set_shotlist(AILIST_ELVIS_GO_TO_SA_TELEPORT) set_target_chr(CHR_PRESET) - if_chr_dead(CHR_SELF, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2e) goto_next(0x06) // Dying @@ -1331,9 +1321,7 @@ u8 func0407_elvis_go_to_sa_teleport[] = { u8 func0403_elvis_give_farsight[] = { set_shotlist(AILIST_ELVIS_GIVE_FARSIGHT) set_target_chr(CHR_PRESET) - if_chr_dead(CHR_SELF, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2e) goto_next(0x06) // Dying @@ -2221,9 +2209,7 @@ u8 func0430_unused[] = { u8 func1006_msg_thiswillhelpus[] = { beginloop(0x04) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x0d) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x0d) if_objective_complete(0, /*goto*/ 0x2e) endloop(0x04) @@ -2231,9 +2217,7 @@ u8 func1006_msg_thiswillhelpus[] = { restart_timer beginloop(0x08) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x0d) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x0d) if_timer_gt(180, /*goto*/ 0x2e) endloop(0x08) @@ -2248,9 +2232,7 @@ u8 func1007_msg_antibodymasking[] = { restart_timer beginloop(0x04) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x0d) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x0d) endloop(0x04) // Unreachable @@ -2264,13 +2246,9 @@ u8 func1007_msg_antibodymasking[] = { u8 func1008_msg_theresdrcaroll[] = { beginloop(0x04) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x0d) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_death_animation_finished(CHR_DRCAROLL, /*goto*/ 0x0d) - if_chr_dead(CHR_DRCAROLL, /*goto*/ 0x0d) - if_chr_knockedout(CHR_DRCAROLL, /*goto*/ 0x0d) + if_chr_deadish(CHR_DRCAROLL, /*goto*/ 0x0d) if_door_state(0xae, (DOORSTATE_OPEN | DOORSTATE_CLOSING | DOORSTATE_OPENING), /*goto*/ 0x2e) reloop(0x04) @@ -2301,9 +2279,7 @@ u8 func1009_msg_getoutofhere[] = { restart_timer beginloop(0x08) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x0d) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x0d) if_timer_gt(120, /*goto*/ 0x2e) endloop(0x08) @@ -2486,18 +2462,14 @@ u8 func100a_bond_teleports[] = { u8 func0414_teleport_bond_to_sapa[] = { set_chr_hiddenflag(CHR_BOND, CHRHFLAG_TRIGGER_BUDDY_WARP) if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, FALSE, /*goto*/ 0x61) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x61) - if_chr_dead(CHR_COOP, /*goto*/ 0x61) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x61) + if_chr_deadish(CHR_COOP, /*goto*/ 0x61) goto_next(0x62) label(0x61) set_ailist(CHR_ELVIS, AILIST_ELVIS_STOP) label(0x08) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x06) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x06) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x06) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x06) beginloop(0x63) chr_move_to_pad(CHR_ELVIS, PAD_PAM_01C6, 0x01, /*goto*/ 0x06) @@ -2516,9 +2488,7 @@ u8 func0414_teleport_bond_to_sapa[] = { stop_chr set_stage_flag(STAGEFLAG_TELEPORT_DONE) if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, FALSE, /*goto*/ 0x61) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x61) - if_chr_dead(CHR_COOP, /*goto*/ 0x61) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x61) + if_chr_deadish(CHR_COOP, /*goto*/ 0x61) goto_next(0x62) label(0x61) set_ailist(CHR_ELVIS, AILIST_ELVIS_GIVE_FARSIGHT) @@ -2530,16 +2500,12 @@ u8 func0414_teleport_bond_to_sapa[] = { u8 func0415_teleport_bond_to_drcaroll[] = { set_chr_hiddenflag(CHR_BOND, CHRHFLAG_TRIGGER_BUDDY_WARP) if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, FALSE, /*goto*/ 0x61) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x61) - if_chr_dead(CHR_COOP, /*goto*/ 0x61) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x61) + if_chr_deadish(CHR_COOP, /*goto*/ 0x61) goto_next(0x62) label(0x61) set_ailist(CHR_ELVIS, AILIST_ELVIS_STOP) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x07) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x07) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x07) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x07) beginloop(0x65) chr_move_to_pad(CHR_ELVIS, PAD_PAM_01BF, 0x01, /*goto*/ 0x06) @@ -2562,9 +2528,7 @@ u8 func0415_teleport_bond_to_drcaroll[] = { yield set_stage_flag(STAGEFLAG_TELEPORT_DONE) if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, FALSE, /*goto*/ 0x61) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x61) - if_chr_dead(CHR_COOP, /*goto*/ 0x61) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x61) + if_chr_deadish(CHR_COOP, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -2583,9 +2547,7 @@ u8 func0415_teleport_bond_to_drcaroll[] = { u8 func0416_teleport_bond_to_a_pa_drcaroll[] = { set_chr_hiddenflag(CHR_BOND, CHRHFLAG_TRIGGER_BUDDY_WARP) if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, FALSE, /*goto*/ 0x61) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x61) - if_chr_dead(CHR_COOP, /*goto*/ 0x61) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x61) + if_chr_deadish(CHR_COOP, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -2597,15 +2559,11 @@ u8 func0416_teleport_bond_to_a_pa_drcaroll[] = { // PA if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, FALSE, /*goto*/ 0x61) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x61) - if_chr_dead(CHR_COOP, /*goto*/ 0x61) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x61) + if_chr_deadish(CHR_COOP, /*goto*/ 0x61) goto_next(0x62) label(0x61) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x07) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x07) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x07) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x07) beginloop(0x66) chr_move_to_pad(CHR_ELVIS, PAD_PAM_01BE, 0x01, /*goto*/ 0x06) @@ -2625,9 +2583,7 @@ u8 func0416_teleport_bond_to_a_pa_drcaroll[] = { stop_chr yield if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, FALSE, /*goto*/ 0x61) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x61) - if_chr_dead(CHR_COOP, /*goto*/ 0x61) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x61) + if_chr_deadish(CHR_COOP, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -2644,15 +2600,11 @@ u8 func0416_teleport_bond_to_a_pa_drcaroll[] = { // Agent label(0x09) if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, FALSE, /*goto*/ 0x61) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x61) - if_chr_dead(CHR_COOP, /*goto*/ 0x61) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x61) + if_chr_deadish(CHR_COOP, /*goto*/ 0x61) goto_next(0x62) label(0x61) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x07) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x07) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x07) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x07) beginloop(0x6b) chr_move_to_pad(CHR_ELVIS, PAD_PAM_0040, 0x01, /*goto*/ 0x06) @@ -2673,9 +2625,7 @@ u8 func0416_teleport_bond_to_a_pa_drcaroll[] = { yield set_stage_flag(STAGEFLAG_TELEPORT_DONE) if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, FALSE, /*goto*/ 0x61) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x61) - if_chr_dead(CHR_COOP, /*goto*/ 0x61) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x61) + if_chr_deadish(CHR_COOP, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -2727,9 +2677,7 @@ u8 func100b_coop_teleports[] = { goto_first(0x5b) label(0x5e) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x61) - if_chr_dead(CHR_BOND, /*goto*/ 0x61) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x61) + if_chr_deadish(CHR_BOND, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -2773,9 +2721,7 @@ u8 func100b_coop_teleports[] = { goto_first(0x5c) label(0x5e) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x61) - if_chr_dead(CHR_BOND, /*goto*/ 0x61) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x61) + if_chr_deadish(CHR_BOND, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -2831,9 +2777,7 @@ u8 func100b_coop_teleports[] = { goto_first(0x5d) label(0x5e) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x61) - if_chr_dead(CHR_BOND, /*goto*/ 0x61) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x61) + if_chr_deadish(CHR_BOND, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -2855,18 +2799,14 @@ u8 func100b_coop_teleports[] = { u8 func0417_teleport_coop_to_sapa[] = { if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, TRUE, /*goto*/ 0x61) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x61) - if_chr_dead(CHR_BOND, /*goto*/ 0x61) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x61) + if_chr_deadish(CHR_BOND, /*goto*/ 0x61) goto_next(0x62) label(0x61) set_ailist(CHR_ELVIS, AILIST_ELVIS_STOP) label(0x08) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x06) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x06) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x06) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x06) beginloop(0x63) chr_move_to_pad(CHR_ELVIS, PAD_PAM_01C6, 0x01, /*goto*/ 0x06) @@ -2885,9 +2825,7 @@ u8 func0417_teleport_coop_to_sapa[] = { stop_chr set_stage_flag(STAGEFLAG_TELEPORT_DONE) if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, TRUE, /*goto*/ 0x61) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x61) - if_chr_dead(CHR_BOND, /*goto*/ 0x61) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x61) + if_chr_deadish(CHR_BOND, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -2900,16 +2838,12 @@ u8 func0417_teleport_coop_to_sapa[] = { u8 func0418_teleport_coop_to_drcaroll[] = { if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, TRUE, /*goto*/ 0x61) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x61) - if_chr_dead(CHR_BOND, /*goto*/ 0x61) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x61) + if_chr_deadish(CHR_BOND, /*goto*/ 0x61) goto_next(0x62) label(0x61) set_ailist(CHR_ELVIS, AILIST_ELVIS_STOP) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x07) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x07) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x07) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x07) beginloop(0x65) chr_move_to_pad(CHR_ELVIS, PAD_PAM_01BF, 0x01, /*goto*/ 0x06) @@ -2932,9 +2866,7 @@ u8 func0418_teleport_coop_to_drcaroll[] = { yield set_stage_flag(STAGEFLAG_TELEPORT_DONE) if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, TRUE, /*goto*/ 0x61) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x61) - if_chr_dead(CHR_BOND, /*goto*/ 0x61) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x61) + if_chr_deadish(CHR_BOND, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -2951,9 +2883,7 @@ u8 func0418_teleport_coop_to_drcaroll[] = { */ u8 func0419_teleport_coop_to_a_pa_drcaroll[] = { if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, TRUE, /*goto*/ 0x61) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x61) - if_chr_dead(CHR_BOND, /*goto*/ 0x61) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x61) + if_chr_deadish(CHR_BOND, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -2964,15 +2894,11 @@ u8 func0419_teleport_coop_to_a_pa_drcaroll[] = { // PA if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, TRUE, /*goto*/ 0x61) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x61) - if_chr_dead(CHR_BOND, /*goto*/ 0x61) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x61) + if_chr_deadish(CHR_BOND, /*goto*/ 0x61) goto_next(0x62) label(0x61) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x07) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x07) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x07) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x07) beginloop(0x66) chr_move_to_pad(CHR_ELVIS, PAD_PAM_01BE, 0x01, /*goto*/ 0x06) @@ -2992,9 +2918,7 @@ u8 func0419_teleport_coop_to_a_pa_drcaroll[] = { stop_chr yield if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, TRUE, /*goto*/ 0x61) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x61) - if_chr_dead(CHR_BOND, /*goto*/ 0x61) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x61) + if_chr_deadish(CHR_BOND, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -3010,14 +2934,10 @@ u8 func0419_teleport_coop_to_a_pa_drcaroll[] = { // Agent label(0x09) if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, TRUE, /*goto*/ 0x61) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x61) - if_chr_dead(CHR_BOND, /*goto*/ 0x61) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x61) + if_chr_deadish(CHR_BOND, /*goto*/ 0x61) goto_next(0x62) label(0x61) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x07) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x07) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x07) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x07) beginloop(0x6b) chr_move_to_pad(CHR_ELVIS, PAD_PAM_0040, 0x01, /*goto*/ 0x06) @@ -3038,9 +2958,7 @@ u8 func0419_teleport_coop_to_a_pa_drcaroll[] = { yield set_stage_flag(STAGEFLAG_TELEPORT_DONE) if_stage_flag_eq(STAGEFLAG_ELVIS_FOLLOWING_COOP, TRUE, /*goto*/ 0x61) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x61) - if_chr_dead(CHR_BOND, /*goto*/ 0x61) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x61) + if_chr_deadish(CHR_BOND, /*goto*/ 0x61) goto_next(0x62) label(0x61) @@ -3134,9 +3052,7 @@ u8 func041d_sniper[] = { set_self_chrflag(CHRCFLAG_00000040) set_shotlist(AILIST_SNIPER) set_chr_cloaked(CHR_SELF, TRUE, FALSE) - if_chr_dead(CHR_SELF, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) + if_chr_deadish(CHR_SELF, /*goto*/ 0x06) goto_next(0x03) // Dying @@ -3286,15 +3202,11 @@ u8 func100c_countdown_timer[] = { label(0x09) yield label(0x2e) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2e) - if_chr_dead(CHR_BOND, /*goto*/ 0x2e) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x2e) + if_chr_deadish(CHR_BOND, /*goto*/ 0x2e) goto_next(0x06) label(0x2e) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2e) - if_chr_dead(CHR_COOP, /*goto*/ 0x2e) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x2e) + if_chr_deadish(CHR_COOP, /*goto*/ 0x2e) goto_next(0x06) // Both players dead @@ -3313,9 +3225,7 @@ u8 func100c_countdown_timer[] = { u8 func100e_check_elvis_dead[] = { beginloop(0x04) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x2e) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x2e) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x2e) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x2e) endloop(0x04) label(0x2e) @@ -3327,9 +3237,7 @@ u8 func100e_check_elvis_dead[] = { u8 func100f_check_drcaroll_dead[] = { beginloop(0x04) - if_chr_death_animation_finished(CHR_DRCAROLL, /*goto*/ 0x2e) - if_chr_dead(CHR_DRCAROLL, /*goto*/ 0x2e) - if_chr_knockedout(CHR_DRCAROLL, /*goto*/ 0x2e) + if_chr_deadish(CHR_DRCAROLL, /*goto*/ 0x2e) endloop(0x04) label(0x2e) @@ -3382,9 +3290,7 @@ u8 func040e_init_miniskedar[] = { u8 func040f_miniskedar[] = { set_shotlist(AILIST_MINISKEDAR) - if_chr_dead(CHR_SELF, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2e) goto_next(0x06) // Dying @@ -4164,15 +4070,11 @@ u8 func1022_control_room[] = { endloop(0x04) label(0x2e) - if_chr_dead(CHR_BLONDE1, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_BLONDE1, /*goto*/ 0x2e) - if_chr_knockedout(CHR_BLONDE1, /*goto*/ 0x2e) + if_chr_deadish(CHR_BLONDE1, /*goto*/ 0x2e) goto_first(0x04) label(0x2e) - if_chr_dead(CHR_BLONDE2, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_BLONDE2, /*goto*/ 0x2e) - if_chr_knockedout(CHR_BLONDE2, /*goto*/ 0x2e) + if_chr_deadish(CHR_BLONDE2, /*goto*/ 0x2e) goto_first(0x04) label(0x2e) @@ -4188,12 +4090,8 @@ u8 func1023_check_drcaroll_restored[] = { give_object_to_chr(OBJ_BACKUPDISK, CHR_BOND) beginloop(0x04) - if_chr_death_animation_finished(CHR_DRCAROLL, /*goto*/ 0x0d) - if_chr_dead(CHR_DRCAROLL, /*goto*/ 0x0d) - if_chr_knockedout(CHR_DRCAROLL, /*goto*/ 0x0d) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x0d) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x0d) + if_chr_deadish(CHR_DRCAROLL, /*goto*/ 0x0d) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x0d) chr_toggle_p1p2(CHR_SELF) if_chr_distance_to_pad_lt(CHR_P1P2, 200, PAD_PAM_0193, /*goto*/ 0x2e) reloop(0x04) @@ -4223,17 +4121,13 @@ u8 func1023_check_drcaroll_restored[] = { u8 func1024_update_elvis_target_chr[] = { beginloop(0x04) - if_chr_dead(CHR_BOND, /*goto*/ 0x08) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x08) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x08) + if_chr_deadish(CHR_BOND, /*goto*/ 0x08) set_chr_target_chr(CHR_ELVIS, CHR_BOND) unset_stage_flag(STAGEFLAG_ELVIS_FOLLOWING_COOP) endloop(0x04) beginloop(0x08) - if_chr_dead(CHR_COOP, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2e) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x2e) + if_chr_deadish(CHR_COOP, /*goto*/ 0x2e) set_chr_target_chr(CHR_ELVIS, CHR_COOP) set_stage_flag(STAGEFLAG_ELVIS_FOLLOWING_COOP) endloop(0x08) @@ -4268,9 +4162,7 @@ u8 func042e_elvis_run_to_exit[] = { set_shotlist(AILIST_ELVIS_RUN_TO_EXIT) set_returnlist(CHR_SELF, AILIST_ELVIS_RUN_TO_EXIT) set_target_chr(CHR_PRESET) - if_chr_dead(CHR_SELF, /*goto*/ 0x2e) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2e) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2e) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2e) goto_next(0x06) // Dying @@ -4435,9 +4327,7 @@ u8 func102a_kill_pelagic_guard[] = { u8 func102b_proxymines[] = { beginloop(0x04) - if_chr_death_animation_finished(0x08, /*goto*/ 0x06) - if_chr_dead(0x08, /*goto*/ 0x06) - if_chr_knockedout(0x08, /*goto*/ 0x06) + if_chr_deadish(0x08, /*goto*/ 0x06) if_stage_flag_eq(STAGEFLAG_PURPLE_GUARD_SHOT_JO_OR_ELVIS, TRUE, /*goto*/ 0x2e) endloop(0x04) diff --git a/src/setups/setuppete.c b/src/setups/setuppete.c index 54d309ee5..b9d1387d5 100644 --- a/src/setups/setuppete.c +++ b/src/setups/setuppete.c @@ -718,18 +718,14 @@ u8 func100f_check_mine[] = { set_target_chr(CHR_P1P2) beginloop(0x11) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x29) - if_chr_dead(CHR_TARGET, /*goto*/ 0x29) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0x29) + if_chr_deadish(CHR_TARGET, /*goto*/ 0x29) if_ammo_quantity_lt(CHR_TARGET, AMMOTYPE_REMOTE_MINE, 1, /*goto*/ 0x03) endloop(0x11) label(0x29) label(0x54) yield - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x28) - if_chr_dead(CHR_TARGET, /*goto*/ 0x28) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0x28) + if_chr_deadish(CHR_TARGET, /*goto*/ 0x28) yield if_ammo_quantity_lt(CHR_BOND, AMMOTYPE_REMOTE_MINE, 1, /*goto*/ 0x29) reloop(0x08) @@ -983,9 +979,7 @@ u8 func040c_taxi[] = { \ beginloop(0x11) \ set_target_chr(chr2) \ - if_chr_death_animation_finished(chr, /*goto*/ 0x2f) \ - if_chr_dead(chr, /*goto*/ 0x2f) \ - if_chr_knockedout(chr, /*goto*/ 0x2f) \ + if_chr_deadish(chr, /*goto*/ 0x2f) \ if_ammo_quantity_lt(chr, AMMOTYPE_BUG, 1, /*goto*/ 0x03) \ label(0x04) \ endloop(0x11) \ @@ -993,9 +987,7 @@ u8 func040c_taxi[] = { /* Dead - not sure why it checks this a second time */ \ beginloop(0x2f) \ set_target_chr(chr2) \ - if_chr_death_animation_finished(chr, /*goto*/ 0x30) \ - if_chr_dead(chr, /*goto*/ 0x30) \ - if_chr_knockedout(chr, /*goto*/ 0x30) \ + if_chr_deadish(chr, /*goto*/ 0x30) \ label(0x31) \ yield \ yield \ @@ -1164,15 +1156,11 @@ u8 func1006_check_for_end[] = { // Objectives complete label(0x05) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x03) - if_chr_dead(CHR_BOND, /*goto*/ 0x03) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x03) + if_chr_deadish(CHR_BOND, /*goto*/ 0x03) goto_next(0x04) label(0x03) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x03) - if_chr_dead(CHR_COOP, /*goto*/ 0x03) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x03) + if_chr_deadish(CHR_COOP, /*goto*/ 0x03) goto_next(0x04) label(0x03) @@ -1269,9 +1257,7 @@ u8 func040c_taxi_timing[] = { u8 func0412_cia[] = { set_returnlist(CHR_SELF, AILIST_CIA) set_shotlist(AILIST_CIA) - if_chr_dead(CHR_SELF, /*goto*/ 0x04) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x04) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x04) + if_chr_deadish(CHR_SELF, /*goto*/ 0x04) goto_next(0x03) label(0x04) @@ -1536,9 +1522,7 @@ u8 func0413_bugspotter[] = { set_alertness(255) set_shotlist(AILIST_BUGSPOTTER) - if_chr_dead(CHR_SELF, /*goto*/ 0x04) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x04) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x04) + if_chr_deadish(CHR_SELF, /*goto*/ 0x04) goto_next(0x03) label(0x04) @@ -1767,9 +1751,7 @@ u8 func0419_init_cia1[] = { u8 func041d_fbi[] = { set_shotlist(AILIST_FBI) - if_chr_dead(CHR_SELF, /*goto*/ 0x04) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x04) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x04) + if_chr_deadish(CHR_SELF, /*goto*/ 0x04) goto_next(0x03) label(0x04) diff --git a/src/setups/setuprit.c b/src/setups/setuprit.c index d29ea1102..78f1d3c45 100644 --- a/src/setups/setuprit.c +++ b/src/setups/setuprit.c @@ -871,9 +871,7 @@ u8 func0403_stripes[] = { // Got target label(0x06) if_target_is_player(/*goto*/ 0x06) - if_chr_dead(CHR_TARGET, /*goto*/ 0x2d) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x2d) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0x2d) + if_chr_deadish(CHR_TARGET, /*goto*/ 0x2d) set_returnlist(CHR_SELF, AILIST_STRIPES) set_shotlist(AILIST_STRIPES) set_ailist(CHR_SELF, GAILIST_COMBAT_WITH_TARGET) @@ -1102,15 +1100,11 @@ u8 func1009_check_end_level[] = { label(0x08) yield label(0x06) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2d) - if_chr_dead(CHR_BOND, /*goto*/ 0x2d) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x2d) + if_chr_deadish(CHR_BOND, /*goto*/ 0x2d) goto_next(0x06) label(0x2d) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2d) - if_chr_dead(CHR_COOP, /*goto*/ 0x2d) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x2d) + if_chr_deadish(CHR_COOP, /*goto*/ 0x2d) goto_next(0x06) // Both players dead @@ -1119,15 +1113,11 @@ u8 func1009_check_end_level[] = { // Redundant check label(0x06) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2d) - if_chr_dead(CHR_BOND, /*goto*/ 0x2d) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x2d) + if_chr_deadish(CHR_BOND, /*goto*/ 0x2d) goto_next(0x06) label(0x2d) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2d) - if_chr_dead(CHR_COOP, /*goto*/ 0x2d) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x2d) + if_chr_deadish(CHR_COOP, /*goto*/ 0x2d) goto_next(0x06) label(0x2d) @@ -1192,9 +1182,7 @@ u8 func0406_init_president[] = { u8 func0405_president_in_room[] = { set_shotlist(AILIST_PRESIDENT_IN_ROOM) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2d) - if_chr_dead(CHR_SELF, /*goto*/ 0x2d) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2d) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2d) goto_next(0x06) // Dying @@ -1209,9 +1197,7 @@ u8 func0405_president_in_room[] = { beginloop(0x04) if_stage_flag_eq(STAGEFLAG_00100000, TRUE, /*goto*/ 0x03) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2d) - if_chr_dead(CHR_SELF, /*goto*/ 0x2d) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2d) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2d) endloop(0x04) // Dying @@ -1451,9 +1437,7 @@ u8 func0404_president_running[] = { set_self_chrflag(CHRCFLAG_PUSHABLE) set_shotlist(AILIST_PRESIDENT_RUNNING) set_target_chr(CHR_PRESET) - if_chr_dead(CHR_SELF, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) + if_chr_deadish(CHR_SELF, /*goto*/ 0x06) goto_next(0x2d) // Dying @@ -1645,9 +1629,7 @@ u8 func0404_president_running[] = { u8 func100b_check_president_dead[] = { beginloop(0x04) - if_chr_dead(CHR_PRESIDENT, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_PRESIDENT, /*goto*/ 0x06) - if_chr_knockedout(CHR_PRESIDENT, /*goto*/ 0x06) + if_chr_deadish(CHR_PRESIDENT, /*goto*/ 0x06) endloop(0x04) label(0x06) @@ -1666,9 +1648,7 @@ u8 func0409_unused[] = { label(0x06) if_target_is_player(/*goto*/ 0x06) - if_chr_dead(CHR_TARGET, /*goto*/ 0x2d) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x2d) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0x2d) + if_chr_deadish(CHR_TARGET, /*goto*/ 0x2d) set_returnlist(CHR_SELF, 0x0409) set_shotlist(0x0409) set_ailist(CHR_SELF, GAILIST_COMBAT_WITH_TARGET) @@ -1709,9 +1689,7 @@ u8 func100c_cockpit_stripes[] = { label(0x06) if_target_is_player(/*goto*/ 0x06) - if_chr_dead(CHR_TARGET, /*goto*/ 0x2d) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x2d) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0x2d) + if_chr_deadish(CHR_TARGET, /*goto*/ 0x2d) set_returnlist(CHR_SELF, AILIST_COCKPIT_STRIPES) set_shotlist(GAILIST_COMBAT_WITH_TARGET) set_ailist(CHR_SELF, GAILIST_COMBAT_WITH_TARGET) @@ -1785,9 +1763,7 @@ u8 func0413_taker[] = { endloop(0x0c) label(0x06) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x11) - if_chr_dead(CHR_TARGET, /*goto*/ 0x11) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0x11) + if_chr_deadish(CHR_TARGET, /*goto*/ 0x11) try_attack_stand(ATTACKFLAG_AIMATTARGET | ATTACKFLAG_AIMONLY, 0, /*goto*/ 0x06) label(0x06) try_modify_attack(ATTACKFLAG_AIMATTARGET, 0, /*goto*/ 0x08) @@ -1857,15 +1833,11 @@ u8 func100c_cockpit[] = { endloop(0x04) label(0x2d) - if_chr_dead(CHR_TAKER1, /*goto*/ 0x2d) - if_chr_death_animation_finished(CHR_TAKER1, /*goto*/ 0x2d) - if_chr_knockedout(CHR_TAKER1, /*goto*/ 0x2d) + if_chr_deadish(CHR_TAKER1, /*goto*/ 0x2d) goto_next(0x06) label(0x2d) - if_chr_dead(CHR_TAKER2, /*goto*/ 0x2d) - if_chr_death_animation_finished(CHR_TAKER2, /*goto*/ 0x2d) - if_chr_knockedout(CHR_TAKER2, /*goto*/ 0x2d) + if_chr_deadish(CHR_TAKER2, /*goto*/ 0x2d) goto_next(0x06) // Both takers dead @@ -2333,9 +2305,7 @@ u8 func1011_dumbwaiter2[] = { u8 func040a_defend_pad[] = { set_shotlist(AILIST_DEFEND_PAD) set_returnlist(CHR_SELF, AILIST_DEFEND_PAD) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2d) - if_chr_dead(CHR_SELF, /*goto*/ 0x2d) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2d) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2d) goto_next(0x06) // Dying @@ -2733,9 +2703,7 @@ u8 func041e_blonde[] = { rebuild_squadrons set_accuracy(30) set_shotlist(AILIST_BLONDE) - if_chr_dead(CHR_SELF, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) + if_chr_deadish(CHR_SELF, /*goto*/ 0x06) goto_next(0x2d) // Dying @@ -2934,9 +2902,7 @@ u8 func0420_trent_attacking[] = { endloop(0x08) label(0x06) - if_chr_dead(CHR_TARGET, /*goto*/ 0x09) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x09) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0x09) + if_chr_deadish(CHR_TARGET, /*goto*/ 0x09) goto_first(0x03) label(0x2d) @@ -2981,13 +2947,8 @@ u8 func0422_trent_running[] = { u8 func1012_check_blondes_dead[] = { beginloop(0x04) - if_chr_dead(CHR_BLONDE1, /*goto*/ 0x2d) - if_chr_death_animation_finished(CHR_BLONDE1, /*goto*/ 0x2d) - if_chr_knockedout(CHR_BLONDE1, /*goto*/ 0x2d) - - if_chr_dead(CHR_BLONDE2, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_BLONDE2, /*goto*/ 0x06) - if_chr_knockedout(CHR_BLONDE2, /*goto*/ 0x06) + if_chr_deadish(CHR_BLONDE1, /*goto*/ 0x2d) + if_chr_deadish(CHR_BLONDE2, /*goto*/ 0x06) reloop(0x04) // Blonde 2 dead @@ -2998,9 +2959,7 @@ u8 func1012_check_blondes_dead[] = { // Blonde 1 dead label(0x2d) set_stage_flag(STAGEFLAG_ONE_BLONDE_DEAD) - if_chr_dead(CHR_BLONDE2, /*goto*/ 0x2d) - if_chr_death_animation_finished(CHR_BLONDE2, /*goto*/ 0x2d) - if_chr_knockedout(CHR_BLONDE2, /*goto*/ 0x2d) + if_chr_deadish(CHR_BLONDE2, /*goto*/ 0x2d) endloop(0x04) // Both blondes dead @@ -3053,9 +3012,7 @@ u8 func0429_be_unalert[] = { beginloop(0x04) if_chr_stopped(/*goto*/ 0x06) - if_chr_dead(CHR_PRESIDENT, /*goto*/ 0x2d) - if_chr_death_animation_finished(CHR_PRESIDENT, /*goto*/ 0x2d) - if_chr_knockedout(CHR_PRESIDENT, /*goto*/ 0x2d) + if_chr_deadish(CHR_PRESIDENT, /*goto*/ 0x2d) endloop(0x04) label(0x06) @@ -3280,9 +3237,7 @@ u8 func0425_steward_shot[] = { u8 func0408_stewardess[] = { set_chr_maxdamage(CHR_SELF, 0) set_shotlist(AILIST_STEWARDESS) - if_chr_dead(CHR_SELF, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) + if_chr_deadish(CHR_SELF, /*goto*/ 0x06) goto_next(0x03) label(0x06) @@ -3295,9 +3250,7 @@ u8 func0408_stewardess[] = { label(0x2d) if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x2d) if_saw_injury(0x00, /*goto*/ 0x2d) - if_chr_dead(CHR_STEWARD, /*goto*/ 0x2d) - if_chr_death_animation_finished(CHR_STEWARD, /*goto*/ 0x2d) - if_chr_knockedout(CHR_STEWARD, /*goto*/ 0x2d) + if_chr_deadish(CHR_STEWARD, /*goto*/ 0x2d) endloop(0x03) // Alerted @@ -3922,9 +3875,7 @@ u8 func101d_handle_early_president_death[] = { set_object_flag(OBJ_EXTERIOR_DOOR_DETACHED, OBJFLAG_00000100) beginloop(0x08) - if_chr_death_animation_finished(CHR_PRESIDENT, /*goto*/ 0x2d) - if_chr_dead(CHR_PRESIDENT, /*goto*/ 0x2d) - if_chr_knockedout(CHR_PRESIDENT, /*goto*/ 0x2d) + if_chr_deadish(CHR_PRESIDENT, /*goto*/ 0x2d) endloop(0x08) label(0x2d) diff --git a/src/setups/setupsev.c b/src/setups/setupsev.c index 86ad94b4d..681e3f296 100644 --- a/src/setups/setupsev.c +++ b/src/setups/setupsev.c @@ -1380,15 +1380,11 @@ u8 func1009_check_for_exit[] = { label(0x2c) set_chr_chrflag(CHR_BOND, CHRCFLAG_INVINCIBLE) set_chr_chrflag(CHR_COOP, CHRCFLAG_INVINCIBLE) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2c) - if_chr_dead(CHR_BOND, /*goto*/ 0x2c) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x2c) + if_chr_deadish(CHR_BOND, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2c) - if_chr_dead(CHR_COOP, /*goto*/ 0x2c) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x2c) + if_chr_deadish(CHR_COOP, /*goto*/ 0x2c) goto_next(0x06) // Both players dead @@ -1487,15 +1483,11 @@ u8 func100b_check_medlab_escapable[] = { // Timer expired, and no glass was broken. Check if lab techs are dead. label(0x2c) - if_chr_death_animation_finished(CHR_LABTECH1, /*goto*/ 0x63) - if_chr_dead(CHR_LABTECH1, /*goto*/ 0x63) - if_chr_knockedout(CHR_LABTECH1, /*goto*/ 0x63) + if_chr_deadish(CHR_LABTECH1, /*goto*/ 0x63) goto_next(0x06) label(0x63) - if_chr_death_animation_finished(CHR_LABTECH2, /*goto*/ 0x65) - if_chr_dead(CHR_LABTECH2, /*goto*/ 0x65) - if_chr_knockedout(CHR_LABTECH2, /*goto*/ 0x65) + if_chr_deadish(CHR_LABTECH2, /*goto*/ 0x65) label(0x06) if_chr_has_object(CHR_BOND, OBJ_PSYCHOSISGUN, /*goto*/ 0x2c) diff --git a/src/setups/setupsho.c b/src/setups/setupsho.c index e732a1094..60cc92613 100644 --- a/src/setups/setupsho.c +++ b/src/setups/setupsho.c @@ -509,9 +509,7 @@ u8 func0401_init_unarmed_skedar[] = { u8 func0402_unarmed_skedar[] = { set_shotlist(AILIST_UNARMED_SKEDAR) set_action(MA_NORMAL, TRUE) - if_chr_dead(CHR_SELF, /*goto*/ 0x2d) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2d) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2d) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2d) goto_next(0x06) // Dying @@ -602,9 +600,7 @@ u8 func0402_unarmed_skedar[] = { if_chr_has_hiddenflag(CHR_TARGET, CHRHFLAG_CLOAKED, /*goto*/ 0x10) if_chr_in_room(CHR_SELF, 0x00, 0x003b, /*goto*/ LABEL_HANDLE_PHOENIX_AREA) if_chr_in_room(CHR_SELF, 0x00, 0x0041, /*goto*/ LABEL_HANDLE_WALL_AREA) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x10) - if_chr_dead(CHR_TARGET, /*goto*/ 0x10) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0x10) + if_chr_deadish(CHR_TARGET, /*goto*/ 0x10) if_target_moving_away(/*goto*/ 0x2d) if_distance_to_target_lt(150, /*goto*/ 0x2f) label(0x2d) @@ -627,9 +623,7 @@ u8 func0402_unarmed_skedar[] = { if_chr_has_hiddenflag(CHR_TARGET, CHRHFLAG_CLOAKED, /*goto*/ 0x10) if_chr_in_room(CHR_SELF, 0x00, 0x003b, /*goto*/ LABEL_HANDLE_PHOENIX_AREA) if_chr_in_room(CHR_SELF, 0x00, 0x0041, /*goto*/ LABEL_HANDLE_WALL_AREA) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x10) - if_chr_dead(CHR_TARGET, /*goto*/ 0x10) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0x10) + if_chr_deadish(CHR_TARGET, /*goto*/ 0x10) if_target_in_fov_left(10, /*goto*/ 0x06) if_target_out_of_fov_left(246, /*goto*/ 0x06) if_timer_gt(60, /*goto*/ 0x06) @@ -647,17 +641,13 @@ u8 func0402_unarmed_skedar[] = { if_chr_has_hiddenflag(CHR_TARGET, CHRHFLAG_CLOAKED, /*goto*/ 0x10) if_chr_in_room(CHR_SELF, 0x00, 0x003b, /*goto*/ LABEL_HANDLE_PHOENIX_AREA) if_chr_in_room(CHR_SELF, 0x00, 0x0041, /*goto*/ LABEL_HANDLE_WALL_AREA) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x10) - if_chr_dead(CHR_TARGET, /*goto*/ 0x10) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0x10) + if_chr_deadish(CHR_TARGET, /*goto*/ 0x10) if_chr_stopped(/*goto*/ 0x06) endloop(0x30) // Finished attack label(0x06) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x10) - if_chr_dead(CHR_TARGET, /*goto*/ 0x10) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0x10) + if_chr_deadish(CHR_TARGET, /*goto*/ 0x10) goto_first(0xd9) // Killed target @@ -738,9 +728,7 @@ u8 func0403_init_miniskedar[] = { u8 func0404_miniskedar[] = { set_shotlist(AILIST_MINISKEDAR) - if_chr_dead(CHR_SELF, /*goto*/ 0x2d) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2d) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2d) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2d) goto_next(0x06) // Dying @@ -1650,9 +1638,7 @@ u8 func0409_reaper_slayer_skedar[] = { unset_self_chrflag(CHRCFLAG_HIDDEN) #endif set_shotlist(AILIST_REAPER_SLAYER_SKEDAR) - if_chr_dead(CHR_SELF, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x06) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x06) + if_chr_deadish(CHR_SELF, /*goto*/ 0x06) goto_next(0x2d) // Dying @@ -2279,11 +2265,7 @@ u8 func040e_king_skedar_spawner[] = { set_chr_hiddenflag(CHR_SELF, CHRHFLAG_00100000) beginloop(0x04) - if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x2d) -#if VERSION >= VERSION_NTSC_1_0 - if_chr_dead(CHR_CLONE, /*goto*/ 0x2d) - if_chr_knockedout(CHR_CLONE, /*goto*/ 0x2d) -#endif + if_chr_deadish(CHR_CLONE, /*goto*/ 0x2d) goto_next(0x06) // Clone dead @@ -2295,11 +2277,7 @@ u8 func040e_king_skedar_spawner[] = { reloop(0x04) label(0x4f) - if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x4f) -#if VERSION >= VERSION_NTSC_1_0 - if_chr_dead(CHR_CLONE, /*goto*/ 0x4f) - if_chr_knockedout(CHR_CLONE, /*goto*/ 0x4f) -#endif + if_chr_deadish(CHR_CLONE, /*goto*/ 0x4f) reloop(0x04) label(0x4f) @@ -2342,11 +2320,7 @@ u8 func0411_king_miniskedar_spawner[] = { set_chr_hiddenflag(CHR_SELF, CHRHFLAG_00100000) beginloop(0x04) - if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x2d) -#if VERSION >= VERSION_NTSC_1_0 - if_chr_dead(CHR_CLONE, /*goto*/ 0x2d) - if_chr_knockedout(CHR_CLONE, /*goto*/ 0x2d) -#endif + if_chr_deadish(CHR_CLONE, /*goto*/ 0x2d) goto_next(0x06) // Clone dead @@ -2359,11 +2333,7 @@ u8 func0411_king_miniskedar_spawner[] = { // Clone dead and flag set // Redundant check label(0x4f) - if_chr_death_animation_finished(CHR_CLONE, /*goto*/ 0x4f) -#if VERSION >= VERSION_NTSC_1_0 - if_chr_dead(CHR_CLONE, /*goto*/ 0x4f) - if_chr_knockedout(CHR_CLONE, /*goto*/ 0x4f) -#endif + if_chr_deadish(CHR_CLONE, /*goto*/ 0x4f) reloop(0x04) // Spawn clone @@ -2493,15 +2463,11 @@ u8 func1014_spike_top[] = { set_stage_flag(STAGEFLAG_SPIKE5_DESTROYED) yield - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2d) - if_chr_dead(CHR_BOND, /*goto*/ 0x2d) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x2d) + if_chr_deadish(CHR_BOND, /*goto*/ 0x2d) goto_next(0x06) label(0x2d) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2d) - if_chr_dead(CHR_COOP, /*goto*/ 0x2d) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x2d) + if_chr_deadish(CHR_COOP, /*goto*/ 0x2d) goto_next(0x06) label(0x2d) diff --git a/src/setups/setupstat.c b/src/setups/setupstat.c index 665c274b5..e8045ae5e 100644 --- a/src/setups/setupstat.c +++ b/src/setups/setupstat.c @@ -343,9 +343,7 @@ u8 func0402_init_king[] = { u8 func0401_defend[] = { set_shotlist(AILIST_DEFEND) set_self_chrflag(CHRCFLAG_NOAUTOAIM) - if_chr_dead(CHR_SELF, /*goto*/ 0x2d) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2d) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2d) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2d) goto_next(0x06) // Dying @@ -404,9 +402,7 @@ u8 func0401_defend[] = { endloop(0x8f) label(0x2d) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0x2d) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x2d) - if_chr_dead(CHR_TARGET, /*goto*/ 0x2d) + if_chr_deadish(CHR_TARGET, /*goto*/ 0x2d) set_returnlist(CHR_SELF, AILIST_DEFEND) set_shotlist(AILIST_DEFEND) set_ailist(CHR_SELF, GAILIST_COMBAT_WITH_TARGET) @@ -529,17 +525,13 @@ u8 func0404_maian[] = { label(0x03) set_target_chr(CHR_KING1) - if_chr_dead(CHR_KING1, /*goto*/ 0x8f) - if_chr_death_animation_finished(CHR_KING1, /*goto*/ 0x8f) - if_chr_knockedout(CHR_KING1, /*goto*/ 0x8f) + if_chr_deadish(CHR_KING1, /*goto*/ 0x8f) goto_next(0x2d) // King 1 dead label(0x8f) set_target_chr(CHR_KING2) - if_chr_dead(CHR_KING2, /*goto*/ 0x90) - if_chr_death_animation_finished(CHR_KING2, /*goto*/ 0x90) - if_chr_knockedout(CHR_KING2, /*goto*/ 0x90) + if_chr_deadish(CHR_KING2, /*goto*/ 0x90) goto_next(0x2d) // King 2 dead @@ -554,9 +546,7 @@ u8 func0404_maian[] = { beginloop(0x04) if_enemy_distance_lt_and_los(2540, /*goto*/ 0x08) - if_chr_dead(CHR_TARGET, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x06) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0x06) + if_chr_deadish(CHR_TARGET, /*goto*/ 0x06) endloop(0x04) // King died while running to him @@ -565,9 +555,7 @@ u8 func0404_maian[] = { // Maian has line of sight to king label(0x08) - if_chr_dead(CHR_TARGET, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_TARGET, /*goto*/ 0x06) - if_chr_knockedout(CHR_TARGET, /*goto*/ 0x06) + if_chr_deadish(CHR_TARGET, /*goto*/ 0x06) set_returnlist(CHR_SELF, AILIST_MAIAN) set_shotlist(AILIST_MAIAN) set_ailist(CHR_SELF, GAILIST_COMBAT_WITH_TARGET) @@ -906,9 +894,7 @@ u8 func0406_skedar[] = { u8 func1005_check_leader_dead[] = { beginloop(0x03) - if_chr_death_animation_finished(CHR_MAIAN_LEADER, /*goto*/ 0x2d) - if_chr_dead(CHR_MAIAN_LEADER, /*goto*/ 0x2d) - if_chr_knockedout(CHR_MAIAN_LEADER, /*goto*/ 0x2d) + if_chr_deadish(CHR_MAIAN_LEADER, /*goto*/ 0x2d) endloop(0x03) label(0x2d) @@ -922,9 +908,7 @@ u8 func1009_check_king1_dead[] = { set_object_flag(OBJ_BRIDGE, OBJFLAG_DEACTIVATED) beginloop(0x03) - if_chr_death_animation_finished(CHR_KING1, /*goto*/ 0x2d) - if_chr_dead(CHR_KING1, /*goto*/ 0x2d) - if_chr_knockedout(CHR_KING1, /*goto*/ 0x2d) + if_chr_deadish(CHR_KING1, /*goto*/ 0x2d) endloop(0x03) label(0x2d) @@ -941,9 +925,7 @@ u8 func100a_check_king2_dead[] = { if_difficulty_lt(DIFF_SA, /*goto*/ 0x0e) beginloop(0x03) - if_chr_death_animation_finished(CHR_KING2, /*goto*/ 0x2d) - if_chr_dead(CHR_KING2, /*goto*/ 0x2d) - if_chr_knockedout(CHR_KING2, /*goto*/ 0x2d) + if_chr_deadish(CHR_KING2, /*goto*/ 0x2d) endloop(0x03) label(0x2d) @@ -959,9 +941,7 @@ u8 func100b_check_king3_dead[] = { if_difficulty_lt(DIFF_PA, /*goto*/ 0x0e) beginloop(0x03) - if_chr_death_animation_finished(CHR_KING3, /*goto*/ 0x2d) - if_chr_dead(CHR_KING3, /*goto*/ 0x2d) - if_chr_knockedout(CHR_KING3, /*goto*/ 0x2d) + if_chr_deadish(CHR_KING3, /*goto*/ 0x2d) endloop(0x03) label(0x2d) @@ -988,16 +968,12 @@ u8 func1007_check_end_level[] = { // Check Jo not dead label(0x2d) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2d) - if_chr_dead(CHR_BOND, /*goto*/ 0x2d) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x2d) + if_chr_deadish(CHR_BOND, /*goto*/ 0x2d) goto_next(0x06) // Check Velvet not dead label(0x2d) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2d) - if_chr_dead(CHR_COOP, /*goto*/ 0x2d) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x2d) + if_chr_deadish(CHR_COOP, /*goto*/ 0x2d) goto_next(0x06) // Mission failed diff --git a/src/setups/setuptra.c b/src/setups/setuptra.c index 8c5a11858..4fad1578b 100644 --- a/src/setups/setuptra.c +++ b/src/setups/setuptra.c @@ -827,9 +827,7 @@ u8 func0403_init_jonathan[] = { u8 func0402_jonathan_waiting_for_meetup[] = { set_shotlist(AILIST_JONATHAN_WAITING_FOR_MEETUP) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x32) - if_chr_dead(CHR_SELF, /*goto*/ 0x32) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x32) + if_chr_deadish(CHR_SELF, /*goto*/ 0x32) goto_next(0x67) label(0x32) @@ -898,9 +896,7 @@ u8 func0404_jonathan_following_and_mine[] = { rebuild_squadrons set_returnlist(CHR_SELF, AILIST_JONATHAN_FOLLOWING_AND_MINE) set_shotlist(AILIST_JONATHAN_FOLLOWING_AND_MINE) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x32) - if_chr_dead(CHR_SELF, /*goto*/ 0x32) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x32) + if_chr_deadish(CHR_SELF, /*goto*/ 0x32) goto_next(0x06) label(0x32) @@ -1080,9 +1076,7 @@ u8 func0404_jonathan_following_and_mine[] = { u8 func0413_jonathan_hangar[] = { set_returnlist(CHR_SELF, AILIST_JONATHAN_HANGAR) set_shotlist(AILIST_JONATHAN_HANGAR) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x32) - if_chr_dead(CHR_SELF, /*goto*/ 0x32) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x32) + if_chr_deadish(CHR_SELF, /*goto*/ 0x32) goto_next(0x06) label(0x32) @@ -1140,17 +1134,13 @@ u8 func0413_jonathan_hangar[] = { // Start conversation label(0x06) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0xc3) restart_timer chr_do_animation(ANIM_TALKING_0232, -1, 200, CHRANIMFLAG_MOVEWHENINVIS, 0, CHR_ELVIS, 2) speak(CHR_P1P2, L_TRA_059, MP3_029A, CHANNEL_5, COLOR_06_WHITE) // "Oh, no! We have a problem. It's a single seater!" beginloop(0x7d) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0xc3) if_sound_finished(CHANNEL_5, /*goto*/ 0x32) reloop(0x7d) @@ -1164,9 +1154,7 @@ u8 func0413_jonathan_hangar[] = { speak(CHR_P1P2, L_TRA_060, MP3_029B, CHANNEL_5, COLOR_06_WHITE) // "Two can get in but no more." beginloop(0x7e) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0xc3) if_sound_finished(CHANNEL_5, /*goto*/ 0x32) reloop(0x7e) @@ -1179,9 +1167,7 @@ u8 func0413_jonathan_hangar[] = { speak(CHR_BOND, L_TRA_041, MP3_02A7, CHANNEL_5, COLOR_09_BLUE) // "It's the only way out of here." beginloop(0x15) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0xc3) if_sound_finished(CHANNEL_5, /*goto*/ 0x32) reloop(0x15) @@ -1195,9 +1181,7 @@ u8 func0413_jonathan_hangar[] = { speak(CHR_P1P2, L_TRA_061, MP3_029C, CHANNEL_5, COLOR_06_WHITE) // "Plus, it's got no style, you know what I'm saying?" beginloop(0x7f) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0xc3) if_sound_finished(CHANNEL_5, /*goto*/ 0x32) reloop(0x7f) @@ -1210,9 +1194,7 @@ u8 func0413_jonathan_hangar[] = { speak(CHR_BOND, L_TRA_042, MP3_02A8, CHANNEL_5, COLOR_09_BLUE) // "You're the only one who can fly it, Elvis, so get ..." beginloop(0x17) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0xc3) if_sound_finished(CHANNEL_5, /*goto*/ 0x32) endloop(0x17) @@ -1226,9 +1208,7 @@ u8 func0413_jonathan_hangar[] = { speak(CHR_P1P2, L_TRA_045, MP3_02B9, CHANNEL_5, COLOR_03_RED) // "One of us will have to stay behind and open the ha..." beginloop(0x1a) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0xc3) if_sound_finished(CHANNEL_5, /*goto*/ 0x32) reloop(0x1a) @@ -1241,9 +1221,7 @@ u8 func0413_jonathan_hangar[] = { speak(CHR_BOND, L_TRA_043, MP3_02A9, CHANNEL_5, COLOR_09_BLUE) // "But we can't leave you behind." beginloop(0x18) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0xc3) if_sound_finished(CHANNEL_5, /*goto*/ 0x32) reloop(0x18) @@ -1256,9 +1234,7 @@ u8 func0413_jonathan_hangar[] = { speak(CHR_BOND, L_TRA_044, MP3_02AA, CHANNEL_5, COLOR_09_BLUE) // "There must be a way out of here." beginloop(0x19) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_dead(CHR_ELVIS, /*goto*/ 0xc3) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0xc3) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0xc3) if_sound_finished(CHANNEL_5, /*goto*/ 0x32) reloop(0x19) @@ -1276,9 +1252,7 @@ u8 func0413_jonathan_hangar[] = { reloop(0x1b) label(0x66) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x06) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x06) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x06) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x06) set_ailist(CHR_ELVIS, AILIST_ELVIS_GO_TO_UFO) label(0x06) @@ -1391,9 +1365,7 @@ u8 func0413_jonathan_hangar[] = { u8 func041c_elvis_go_to_ufo[] = { set_returnlist(CHR_SELF, AILIST_ELVIS_GO_TO_UFO) set_shotlist(AILIST_ELVIS_GO_TO_UFO) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x32) - if_chr_dead(CHR_SELF, /*goto*/ 0x32) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x32) + if_chr_deadish(CHR_SELF, /*goto*/ 0x32) goto_next(0x06) label(0x32) @@ -1418,9 +1390,7 @@ u8 func041c_elvis_go_to_ufo[] = { u8 func041b_jonathan_after_terminals[] = { set_returnlist(CHR_SELF, AILIST_JONATHAN_AFTER_TERMINALS) set_shotlist(AILIST_JONATHAN_AFTER_TERMINALS) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x32) - if_chr_dead(CHR_SELF, /*goto*/ 0x32) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x32) + if_chr_deadish(CHR_SELF, /*goto*/ 0x32) goto_next(0x06) label(0x32) @@ -1926,9 +1896,7 @@ u8 func100b_check_jonathan_dead[] = { // All difficulties beginloop(0x04) - if_chr_dead(CHR_JONATHAN, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_JONATHAN, /*goto*/ 0x06) - if_chr_knockedout(CHR_JONATHAN, /*goto*/ 0x06) + if_chr_deadish(CHR_JONATHAN, /*goto*/ 0x06) endloop(0x04) label(0x06) @@ -2004,19 +1972,13 @@ u8 func100c_medpack_activation[] = { endloop(0x0c) label(0x32) - if_chr_death_animation_finished(CHR_JONATHAN, /*goto*/ 0x32) - if_chr_dead(CHR_JONATHAN, /*goto*/ 0x32) - if_chr_knockedout(CHR_JONATHAN, /*goto*/ 0x32) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x33) - if_chr_dead(CHR_BOND, /*goto*/ 0x33) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x33) + if_chr_deadish(CHR_JONATHAN, /*goto*/ 0x32) + if_chr_deadish(CHR_BOND, /*goto*/ 0x33) goto_next(0x06) // Joanna is dead label(0x33) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x32) - if_chr_dead(CHR_COOP, /*goto*/ 0x32) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x32) + if_chr_deadish(CHR_COOP, /*goto*/ 0x32) goto_next(0x06) // Everyone is alive @@ -2188,9 +2150,7 @@ u8 func100d_check_terminals_destroyed[] = { u8 func100e_check_elvis_dead[] = { beginloop(0x04) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x06) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x06) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x06) endloop(0x04) label(0x06) @@ -2242,24 +2202,16 @@ u8 func1010_check_end_level[] = { reloop(0x04) label(0x32) - if_chr_death_animation_finished(CHR_ELVIS, /*goto*/ 0x0f) - if_chr_dead(CHR_ELVIS, /*goto*/ 0x0f) - if_chr_knockedout(CHR_ELVIS, /*goto*/ 0x0f) + if_chr_deadish(CHR_ELVIS, /*goto*/ 0x0f) - if_chr_death_animation_finished(CHR_JONATHAN, /*goto*/ 0x0f) - if_chr_dead(CHR_JONATHAN, /*goto*/ 0x0f) - if_chr_knockedout(CHR_JONATHAN, /*goto*/ 0x0f) + if_chr_deadish(CHR_JONATHAN, /*goto*/ 0x0f) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x32) - if_chr_dead(CHR_BOND, /*goto*/ 0x32) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x32) + if_chr_deadish(CHR_BOND, /*goto*/ 0x32) goto_next(0x06) // Joanna is dead label(0x32) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x33) - if_chr_dead(CHR_COOP, /*goto*/ 0x33) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x33) + if_chr_deadish(CHR_COOP, /*goto*/ 0x33) goto_next(0x06) // Both Joanna and Velvet are dead @@ -2868,15 +2820,11 @@ u8 func0c01_midcutscene[] = { disable_object(OBJ_HOVERBED) #if VERSION >= VERSION_NTSC_1_0 set_target_chr(CHR_BOND) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x33) - if_chr_dead(CHR_BOND, /*goto*/ 0x33) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x33) + if_chr_deadish(CHR_BOND, /*goto*/ 0x33) goto_next(0x06) label(0x33) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x06) - if_chr_dead(CHR_COOP, /*goto*/ 0x06) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x06) + if_chr_deadish(CHR_COOP, /*goto*/ 0x06) set_target_chr(CHR_COOP) label(0x06) diff --git a/src/setups/setupwax.c b/src/setups/setupwax.c index 735abc321..60394b049 100644 --- a/src/setups/setupwax.c +++ b/src/setups/setupwax.c @@ -1292,9 +1292,7 @@ u8 func0412_init_cass[] = { }; u8 func0411_cass_in_office[] = { - if_chr_dead(CHR_SELF, /*goto*/ 0x2c) - if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x2c) - if_chr_knockedout(CHR_SELF, /*goto*/ 0x2c) + if_chr_deadish(CHR_SELF, /*goto*/ 0x2c) goto_next(0x06) // Dying @@ -1402,9 +1400,7 @@ u8 func0413_cass_running[] = { chr_toggle_modelpart(CHR_CASS, MODELPART_CHR_NECKLACE) unset_self_chrflag(CHRCFLAG_INVINCIBLE) set_shotlist(AILIST_CASS_RUNNING) - if_chr_dead(CHR_CASS, /*goto*/ 0x06) - if_chr_death_animation_finished(CHR_CASS, /*goto*/ 0x06) - if_chr_knockedout(CHR_CASS, /*goto*/ 0x06) + if_chr_deadish(CHR_CASS, /*goto*/ 0x06) goto_next(0x2c) // Dying @@ -1500,9 +1496,7 @@ u8 func0413_cass_running[] = { u8 func1004_check_cass_dead[] = { // Wait until Cass dead beginloop(0x03) - if_chr_dead(CHR_CASS, /*goto*/ 0x2c) - if_chr_death_animation_finished(CHR_CASS, /*goto*/ 0x2c) - if_chr_knockedout(CHR_CASS, /*goto*/ 0x2c) + if_chr_deadish(CHR_CASS, /*goto*/ 0x2c) endloop(0x03) label(0x2c) @@ -1515,9 +1509,7 @@ u8 func1004_check_cass_dead[] = { u8 func1005_check_cass_captured[] = { // Wait until Cass at helipad beginloop(0x03) - if_chr_death_animation_finished(CHR_CASS, /*goto*/ 0x0d) - if_chr_dead(CHR_CASS, /*goto*/ 0x0d) - if_chr_knockedout(CHR_CASS, /*goto*/ 0x0d) + if_chr_deadish(CHR_CASS, /*goto*/ 0x0d) if_chr_y(CHR_CASS, 0, OPERATOR_LESS_THAN, /*goto*/ 0x2c) show_hudmsg(CHR_BOND, L_WAX_015) // "Cassandra has been captured successfully." set_stage_flag(STAGEFLAG_CASS_CAPTURED) @@ -1566,9 +1558,7 @@ u8 func1006_lift_disabling[] = { // Wait until chief dead beginloop(0x08) - if_chr_death_animation_finished(CHR_CHIEF, /*goto*/ 0x2c) - if_chr_dead(CHR_CHIEF, /*goto*/ 0x2c) - if_chr_knockedout(CHR_CHIEF, /*goto*/ 0x2c) + if_chr_deadish(CHR_CHIEF, /*goto*/ 0x2c) endloop(0x08) label(0x2c) @@ -1606,9 +1596,7 @@ u8 func0415_chief[] = { set_shotlist(AILIST_CHIEF) // Check if dying - if_chr_dead(CHR_CHIEF, /*goto*/ 0x2c) - if_chr_death_animation_finished(CHR_CHIEF, /*goto*/ 0x2c) - if_chr_knockedout(CHR_CHIEF, /*goto*/ 0x2c) + if_chr_deadish(CHR_CHIEF, /*goto*/ 0x2c) goto_next(0x03) label(0x2c) set_ailist(CHR_SELF, GAILIST_IDLE) @@ -1891,15 +1879,11 @@ u8 func100a_check_for_completion[] = { // If either player is alive label(0x06) - if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x2c) - if_chr_dead(CHR_BOND, /*goto*/ 0x2c) - if_chr_knockedout(CHR_BOND, /*goto*/ 0x2c) + if_chr_deadish(CHR_BOND, /*goto*/ 0x2c) goto_next(0x06) label(0x2c) - if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x2c) - if_chr_dead(CHR_COOP, /*goto*/ 0x2c) - if_chr_knockedout(CHR_COOP, /*goto*/ 0x2c) + if_chr_deadish(CHR_COOP, /*goto*/ 0x2c) goto_next(0x06) // Both players dead