Fix collapsible_if in lighting update

This commit is contained in:
ice_iix 2020-06-29 18:26:53 -07:00
parent 55856ccf1b
commit 9d88168d0e
1 changed files with 3 additions and 5 deletions

View File

@ -208,11 +208,9 @@ impl World {
while !self.light_updates.is_empty() {
updates_performed += 1;
self.do_light_update();
if updates_performed & 0xFFF == 0 {
if start.elapsed().subsec_nanos() >= 5000000 {
// 5 ms for light updates
break;
}
if (updates_performed & 0xFFF == 0) && start.elapsed().subsec_nanos() >= 5000000 {
// 5 ms for light updates
break;
}
}