From 40da7be104eab0d19065fddd08f88d5d817fba94 Mon Sep 17 00:00:00 2001 From: Magus Date: Tue, 7 Feb 2023 19:03:40 +0700 Subject: [PATCH] Hoss will only terminate combat once, ref https://github.com/BGforgeNet/Fallout2_Restoration_Project/issues/185 --- scripts_src/ncr/schoss.ssl | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts_src/ncr/schoss.ssl b/scripts_src/ncr/schoss.ssl index 5d3e0d9e1..f1b34ba52 100644 --- a/scripts_src/ncr/schoss.ssl +++ b/scripts_src/ncr/schoss.ssl @@ -107,16 +107,18 @@ procedure start begin end procedure combat_p_proc begin - - if ( (self_cur_hits <= (self_max_hits / 3)) or (is_critter_prone(self_obj)) ) then begin - set_global_var(GVAR_NCR_BEAT_HOSS, 1); + if (global_var(GVAR_NCR_BEAT_HOSS) == 0) + and ( + (self_cur_hits <= (self_max_hits / 3)) + or is_critter_prone(self_obj) + ) + then begin call surrender; end - end procedure timed_event_p_proc begin - if (fixed_param == TIMER_CHECK_END_FIGHT) then begin + if (global_var(GVAR_NCR_BEAT_HOSS) == 0) and (fixed_param == TIMER_CHECK_END_FIGHT) then begin ndebug("checking for weapon"); if (self_cur_hits <= (self_max_hits / 3)) then begin @@ -178,7 +180,7 @@ procedure damage_p_proc begin set_local_var(LVAR_Personal_Enemy,1); end - if (self_cur_hits <= (self_max_hits / 3)) then begin + if (global_var(GVAR_NCR_BEAT_HOSS) == 0) and (self_cur_hits <= (self_max_hits / 3)) then begin set_global_var(GVAR_NCR_BEAT_HOSS, 1); call surrender; end @@ -368,7 +370,9 @@ procedure getTimeBit begin end procedure surrender begin + set_global_var(GVAR_NCR_BEAT_HOSS, 1); set_local_var(LVAR_Surrendered, 1); + ndebug("terminating combat"); terminate_combat; set_self_team(TEAM_NCR); add_timer_event(self_obj, game_ticks(1), TIMER_TALK);