Rename functions and an AI command relating to FOV checks

This commit is contained in:
Ryan Dwyer
2021-02-05 22:04:01 +10:00
parent 91b275bb19
commit 0c9bb52b78
18 changed files with 126 additions and 81 deletions
+2 -2
View File
@@ -1817,7 +1817,7 @@ u8 func0414_programmer[] = {
if_can_see_target(/*goto*/ 0x06)
goto_next(0x2c)
label(0x06)
if_player_looking_at_something_maybe(0x28, 0x01, 0x00, /*goto*/ LABEL_JO_SPEAK)
if_within_targets_fovx_by_angle(40, /*goto*/ LABEL_JO_SPEAK)
label(0x2c)
endloop(0x0d)
@@ -1887,7 +1887,7 @@ u8 func0414_programmer[] = {
if_chr_stopped(/*goto*/ LABEL_LOG_ON)
if_stage_flag_eq(STAGEFLAG_PROGRAMMER_INJURED, TRUE, /*goto*/ 0x06)
if_distance_to_target_lt(500, /*goto*/ 0x06)
if_player_looking_at_something_maybe(0x28, 0x01, 0x00, /*goto*/ 0x06)
if_within_targets_fovx_by_angle(40, /*goto*/ 0x06)
if_chr_in_room(CHR_PROGRAMMER, 0x00, 0x007d, /*goto*/ 0x06)
if_chr_in_room(CHR_PROGRAMMER, 0x00, 0x007e, /*goto*/ 0x06)
if_chr_in_room(CHR_PROGRAMMER, 0x00, 0x007f, /*goto*/ 0x06)
+1 -1
View File
@@ -1421,7 +1421,7 @@ u8 func041a_pres_clone[] = {
chr_toggle_p1p2(CHR_SELF)
set_target_chr(CHR_P1P2)
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x31)
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x08)
if_target_outside_my_yvisang(/*goto*/ 0x08)
if_target_in_sight(/*goto*/ 0x31)
label(0x08)
endloop(0x06)
+3 -3
View File
@@ -1193,7 +1193,7 @@ u8 func0407_stewardess[] = {
if_distance_to_target_gt(500, /*goto*/ 0x31)
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x04)
label(0x31)
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x02)
if_target_outside_my_yvisang(/*goto*/ 0x02)
if_target_in_sight(/*goto*/ 0x04)
label(0x02)
if_timer_gt(120, /*goto*/ 0x16)
@@ -1220,7 +1220,7 @@ u8 func0407_stewardess[] = {
if_saw_death(0x00, /*goto*/ 0x0f)
label(0x31)
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x04)
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x02)
if_target_outside_my_yvisang(/*goto*/ 0x02)
if_target_in_sight(/*goto*/ 0x04)
label(0x02)
if_chr_stopped(/*goto*/ 0x0b)
@@ -1291,7 +1291,7 @@ u8 func0407_stewardess[] = {
label(0x75)
if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x4e)
dprint 'W','A','L','K','I','N','G','\n',0,
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x31)
if_target_outside_my_yvisang(/*goto*/ 0x31)
if_target_in_sight(/*goto*/ 0x02)
label(0x31)
if_distance_to_chr_lt(200, 0xfb, /*goto*/ 0x4a)
+1 -1
View File
@@ -2305,7 +2305,7 @@ u8 func0412_cloak_guard[] = {
goto_next(0x06)
label(0x2c)
if_player_looking_at_something_maybe(0x0f, 0x01, 0x00, /*goto*/ 0x0e)
if_within_targets_fovx_by_angle(15, /*goto*/ 0x0e)
label(0x06)
if_can_see_attack_target(/*goto*/ 0x2c)
goto_next(0x0d)
+4 -4
View File
@@ -631,7 +631,7 @@ u8 func041e_colleague[] = {
goto_first(0x59)
label(0x06)
if_player_looking_at_something_maybe(0x14, 0x01, 0x00, /*goto*/ 0x06)
if_within_targets_fovx_by_angle(20, /*goto*/ 0x06)
goto_first(0x59)
label(0x06)
@@ -658,7 +658,7 @@ u8 func041e_colleague[] = {
goto_next(0x2f)
label(0x06)
if_player_looking_at_something_maybe(0x14, 0x01, 0x00, /*goto*/ 0x30)
if_within_targets_fovx_by_angle(20, /*goto*/ 0x30)
label(0x2f)
if_chr_idle(/*goto*/ 0x06)
if_self_flag_bankx_eq(CHRFLAG1_DOINGIDLEANIMATION, FALSE, BANK_1, /*goto*/ 0x7f)
@@ -4052,7 +4052,7 @@ u8 func042f_holo2_part2[] = {
endloop(0x08)
beginloop(0x04)
if_player_looking_at_something_maybe(0x14, 0x01, 0x00, /*goto*/ 0x06)
if_within_targets_fovx_by_angle(20, /*goto*/ 0x06)
goto_next(0x2f)
label(0x06)
@@ -5153,7 +5153,7 @@ u8 func0415_holo_guard_unarmed_unalert[] = {
beginloop(0x08)
if_timer_gt(120, /*goto*/ 0x04)
if_player_looking_at_something_maybe(0x28, 0x01, 0x00, /*goto*/ 0x04)
if_within_targets_fovx_by_angle(40, /*goto*/ 0x04)
endloop(0x08)
beginloop(0x04)
+3 -3
View File
@@ -2998,7 +2998,7 @@ u8 func0421_bridge_skedar[] = {
chr_toggle_p1p2(CHR_SELF)
label(0x2c)
set_target_chr(CHR_P1P2)
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x06)
if_target_outside_my_yvisang(/*goto*/ 0x06)
if_target_in_sight(/*goto*/ 0xc8)
label(0x06)
if_saw_injury(0x00, /*goto*/ 0xc8)
@@ -3008,7 +3008,7 @@ u8 func0421_bridge_skedar[] = {
reloop(0xc7)
label(0x06)
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x2c)
if_target_outside_my_yvisang(/*goto*/ 0x2c)
if_target_in_sight(/*goto*/ 0xc8)
label(0x2c)
set_target_chr(CHR_BOND)
@@ -3053,7 +3053,7 @@ u8 func0421_bridge_skedar[] = {
call_rng
chr_toggle_p1p2(CHR_SELF)
set_target_chr(CHR_P1P2)
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x06)
if_target_outside_my_yvisang(/*goto*/ 0x06)
if_target_in_sight(/*goto*/ 0xce)
label(0x06)
if_timer_gt(60, /*goto*/ 0xcf)
+2 -2
View File
@@ -3467,7 +3467,7 @@ u8 func0426_check_looking_at_alien[] = {
// Jo is in range
label(0x64)
if_player_looking_at_something_maybe(0x0a, 0x01, 0x00, /*goto*/ 0x2d)
if_within_targets_fovx_by_angle(10, /*goto*/ 0x2d)
// Jo is too far away or not looking at alien
label(0x66)
@@ -3477,7 +3477,7 @@ u8 func0426_check_looking_at_alien[] = {
// Velvet is in range
label(0x68)
if_player_looking_at_something_maybe(0x0a, 0x01, 0x00, /*goto*/ 0x2d)
if_within_targets_fovx_by_angle(10, /*goto*/ 0x2d)
// Both players are too far away
label(0x69)
+1 -1
View File
@@ -3210,7 +3210,7 @@ u8 func041d_sniper[] = {
label(0x2e)
dprint 'C','H','E','C','K',' ','P','L','A','Y','E','R',' ','D','I','R','\n',0,
if_player_looking_at_something_maybe(0x14, 0x01, 0x00, /*goto*/ 0x0d)
if_within_targets_fovx_by_angle(20, /*goto*/ 0x0d)
dprint '3','\n',0,
label(0x06)
if_can_see_target(/*goto*/ 0x2e)
+3 -3
View File
@@ -1704,7 +1704,7 @@ u8 func0409_reaper_slayer_skedar[] = {
if_self_flag_bankx_eq(CHRFLAG0_AIVSAI, FALSE, BANK_0, /*goto*/ 0x2e)
if_enemy_distance_lt_and_los(2540, /*goto*/ 0x60)
label(0x2e)
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x06)
if_target_outside_my_yvisang(/*goto*/ 0x06)
if_target_in_sight(/*goto*/ 0x60)
label(0x06)
if_just_injured(CHR_SELF, /*goto*/ 0x58)
@@ -1716,7 +1716,7 @@ u8 func0409_reaper_slayer_skedar[] = {
endloop(0x5f)
label(0x06)
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x2d)
if_target_outside_my_yvisang(/*goto*/ 0x2d)
if_target_in_sight(/*goto*/ 0x60)
label(0x2d)
set_target_chr(CHR_BOND)
@@ -1768,7 +1768,7 @@ u8 func0409_reaper_slayer_skedar[] = {
call_rng
chr_toggle_p1p2(CHR_SELF)
set_target_chr(CHR_P1P2)
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x06)
if_target_outside_my_yvisang(/*goto*/ 0x06)
if_target_in_sight(/*goto*/ 0x6b)
label(0x06)
if_timer_gt(60, /*goto*/ 0x6c)
+1 -1
View File
@@ -831,7 +831,7 @@ u8 func0402_jonathan_waiting_for_meetup[] = {
do_preset_animation(3)
beginloop(0x09)
if_player_looking_at_something_maybe(0x0a, 0x01, 0x00, /*goto*/ 0x06)
if_within_targets_fovx_by_angle(10, /*goto*/ 0x06)
if_timer_gt(60, /*goto*/ 0x06)
endloop(0x09)
+1 -1
View File
@@ -1579,7 +1579,7 @@ u8 func0415_chief[] = {
beginloop(0x03)
chr_toggle_p1p2(CHR_SELF)
set_target_chr(CHR_P1P2)
if_player_looking_at_something_maybe(0x00, 0x00, 0x01, /*goto*/ 0x06)
if_target_outside_my_yvisang(/*goto*/ 0x06)
if_target_in_sight(/*goto*/ 0x2c)
label(0x06)
reloop(0x03)