You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: azalea/src/pathfinder/mod.rs
+11-1Lines changed: 11 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ use std::{
32
32
collections::VecDeque,
33
33
sync::{
34
34
Arc,
35
-
atomic::{self,AtomicUsize},
35
+
atomic::{self,AtomicBool,AtomicUsize},
36
36
},
37
37
thread,
38
38
time::{Duration,Instant},
@@ -306,6 +306,16 @@ pub fn goto_listener(
306
306
continue;
307
307
};
308
308
309
+
// this env variable is set from the build.rs
310
+
ifenv!("OPT_LEVEL") == "0"{
311
+
staticWARNED:AtomicBool = AtomicBool::new(false);
312
+
if !WARNED.swap(true, atomic::Ordering::Relaxed){
313
+
warn!(
314
+
"Azalea was compiled with no optimizations, which may result in significantly reduced pathfinding performance. Consider following the steps at https://azalea.matdoes.dev/azalea/#optimization for faster performance in debug mode."
315
+
)
316
+
}
317
+
}
318
+
309
319
let cur_pos = player_pos_to_block_pos(**position);
0 commit comments