Skip to content

FIX: trigger_multiple restart#935

Merged
s1lentq merged 1 commit intorehlds:masterfrom
overl4y:triggers
May 8, 2024
Merged

FIX: trigger_multiple restart#935
s1lentq merged 1 commit intorehlds:masterfrom
overl4y:triggers

Conversation

@overl4y
Copy link
Copy Markdown
Contributor

@overl4y overl4y commented Jan 25, 2024

FIX: trigger_multiple restart

Description

This PR introduces a fix to the trigger_multiple entity, adding the ability to restart the trigger after being deactivated. Previously, trigger_multiple entities did not properly restart when required, potentially leaving certain game mechanics broken.

Changes:

  • New Restart Mechanism: The CTriggerMultiple::Restart function has been implemented to handle the reinitialization of the trigger.
  • Trigger Restart Logic: When invoked, the Restart function stops the current trigger and spawns it again, allowing it to be reused.
  • Improvement to Spawn Logic: Added logic to correctly reset the trigger in the Spawn method for proper functioning after restart.

Fixes:

  • Trigger Reset Issue: This fix addresses the problem where trigger_multiple entities wouldn't restart, preventing certain game events from being triggered multiple times as intended.

Impact:

  • This fix enhances the functionality and reliability of the trigger_multiple entity, allowing it to function as expected in multiplayer games with multiple activations.

@s1lentq
Copy link
Copy Markdown
Member

s1lentq commented Feb 1, 2024

@overl4y Can you provide an map to demonstrate that restarting trigger_multiple is necessary?
need to be careful to this PR, because it can break behavior a lot of maps

@overl4y
Copy link
Copy Markdown
Contributor Author

overl4y commented Feb 1, 2024

@overl4y Can you provide an map to demonstrate that restarting trigger_multiple is necessary? need to be careful to this PR, because it can break behavior a lot of maps

It's widely used in zombie escape maps to activate an ambient_generic, func_door, func_breakable, func_tracktrain and a trigger_hurt at the end of the map. But when the round ends quickly, it breaks the entire trigger_multiple flow.

Some examples:

ze_base_staff_lg
ze_biohazard_lab_dp
ze_breeze_warz_x1
ze_classic_oilrig
ze_coffeelobby_traintobusan_v2
ze_darkprofessional_dp1
ze_dasty_esc4
ze_death_heights_b5
ze_egypt_xmas_dp
ze_freezy_algeria
ze_frozen_throne_b3
ze_FTX_escape2_ma_fix
ze_last_battle_b2
ze_pathway_dp
ze_reverse_dust2_warz1

@s1lentq s1lentq merged commit d7f22ae into rehlds:master May 8, 2024
@wopox1337 wopox1337 changed the title Restart trigger_multiple FIX: trigger_multiple restart Dec 12, 2024
@wopox1337 wopox1337 requested a review from s1lentq December 12, 2024 11:59
@wopox1337 wopox1337 added Type: 🐞 bug An error that needs fixing. Difficulty: 🟡 medium Task of medium difficulty requiring moderate effort. Type: 🧬 bug in original HLDS An error that could not be fixed by ReHLDS. Priority: 🕒 low Low priority tasks that can be postponed for the future. Status: ✅ done The issue done and closed. labels Dec 12, 2024
yohimik pushed a commit to yohimik/ReGameDLL_CS that referenced this pull request Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Difficulty: 🟡 medium Task of medium difficulty requiring moderate effort. Priority: 🕒 low Low priority tasks that can be postponed for the future. Status: ✅ done The issue done and closed. Type: 🧬 bug in original HLDS An error that could not be fixed by ReHLDS. Type: 🐞 bug An error that needs fixing.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants