bevy/crates/bevy_time
Doug Roeper c859eacdc8
Fix bug where events are not being dropped (#11528)
# Objective

Fix an issue where events are not being dropped after being read. I
believe #10077 introduced this issue. The code currently works as
follows:

1. `EventUpdateSignal` is **shared for all event types**
2. During the fixed update phase, `EventUpdateSignal` is set to true
3. `event_update_system`, **unique per event type**, runs to update
Events<T>
4. `event_update_system` reads value of `EventUpdateSignal` to check if
it should update, and then **resets** the value to false

If there are multiple event types, the first `event_update_system` run
will reset the shared `EventUpdateSignal` signal, preventing other
events from being cleared.

## Solution

I've updated the code to have separate signals per event type and added
a shared signal to notify all systems that the time plugin is installed.

## Changelog

- Fixed bug where events were not being dropped
2024-02-02 21:14:54 +00:00
..
src Fix bug where events are not being dropped (#11528) 2024-02-02 21:14:54 +00:00
Cargo.toml Standardize toml format with taplo (#10594) 2023-11-21 01:04:14 +00:00
README.md Add missing documentation to bevy_time (#9428) 2023-08-15 21:48:37 +00:00

Bevy Time

The built-in timekeeping plugin for the Bevy game engine.