Files
esx_core/[core]
Selt d41b0f1feb fix(es_extended/client): stop stacking adjustment threads on every relog
Adjustments:Load() runs from the esx:playerLoaded handler, so it runs again on
every character switch. AmmoAndVehicleRewards, Multipliers and DiscordPresence
each start a `while true` thread that never exits, and SeatShuffle and
DisableRadio register another esx:enteredVehicle handler. Nothing tears any of it
down, so a player who switches characters a few times ends up with several
per-frame threads all writing the same values, and client performance degrades
until they reconnect.

The loops now run `while ESX.PlayerLoaded`, the same way StartServerSyncLoops and
Actions:SlowLoop already do, so they end on logout and a fresh one starts on the
next load. The two event handlers are registered once. Actions:Init already
documents this exact concern in a comment; Adjustments never got the same
treatment.

Measured in game on artifact 25770 by counting thread ticks per frame:
  before: 2.01 -> 3.01 -> 4.02 across two relogs
  after:  1.00 -> 1.00 -> 1.00
2026-07-27 22:36:56 +02:00
..