Fix collapsible_if in lighting update
This commit is contained in:
parent
55856ccf1b
commit
9d88168d0e
|
@ -208,11 +208,9 @@ impl World {
|
||||||
while !self.light_updates.is_empty() {
|
while !self.light_updates.is_empty() {
|
||||||
updates_performed += 1;
|
updates_performed += 1;
|
||||||
self.do_light_update();
|
self.do_light_update();
|
||||||
if updates_performed & 0xFFF == 0 {
|
if (updates_performed & 0xFFF == 0) && start.elapsed().subsec_nanos() >= 5000000 {
|
||||||
if start.elapsed().subsec_nanos() >= 5000000 {
|
// 5 ms for light updates
|
||||||
// 5 ms for light updates
|
break;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue