Skip to content

Commit e3b82f3

Browse files
ShinySapphicjames7132
authored andcommitted
Re-add local bool has_received_time in time_system (bevyengine#6357)
# Objective - Fixes bevyengine#6355 ## Solution - Add the removed local bool from bevyengine#6159
1 parent 9a24592 commit e3b82f3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

crates/bevy_time/src/lib.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,17 @@ fn time_system(
8181
mut time: ResMut<Time>,
8282
update_strategy: Res<TimeUpdateStrategy>,
8383
time_recv: Option<Res<TimeReceiver>>,
84+
mut has_received_time: Local<bool>,
8485
) {
8586
let new_time = if let Some(time_recv) = time_recv {
8687
// TODO: Figure out how to handle this when using pipelined rendering.
8788
if let Ok(new_time) = time_recv.0.try_recv() {
89+
*has_received_time = true;
8890
new_time
8991
} else {
90-
warn!("time_system did not receive the time from the render world! Calculations depending on the time may be incorrect.");
92+
if *has_received_time {
93+
warn!("time_system did not receive the time from the render world! Calculations depending on the time may be incorrect.");
94+
}
9195
Instant::now()
9296
}
9397
} else {

0 commit comments

Comments
 (0)