Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all
Unified · Split
| @@ -4859,13 +4859,9 @@ void Application::update(float deltaTime) { · 4858 unmodified lines | ||
| 4859 | 4859 | // we haven't yet enabled physics. we wait until we think we have all the collision information |
| 4860 | 4860 | // for nearby entities before starting bullet up. |
| 4861 | 4861 | quint64 now = usecTimestampNow(); |
| 4862 | − bool timeout = false; | |
| 4863 | 4862 | const int PHYSICS_CHECK_TIMEOUT = 2 * USECS_PER_SECOND; |
| 4864 | − if (_lastPhysicsCheckTime > 0 && now - _lastPhysicsCheckTime > PHYSICS_CHECK_TIMEOUT) { | |
| 4865 | − timeout = true; | |
| 4866 | − } | |
| 4867 | 4863 | |
| 4868 | − if (timeout || _fullSceneReceivedCounter > _fullSceneCounterAtLastPhysicsCheck) { | |
| 4864 | + if (now - _lastPhysicsCheckTime > PHYSICS_CHECK_TIMEOUT || _fullSceneReceivedCounter > _fullSceneCounterAtLastPhysicsCheck) { | |
| 4869 | 4865 | // we've received a new full-scene octree stats packet, or it's been long enough to try again anyway |
| 4870 | 4866 | _lastPhysicsCheckTime = now; |
| 4871 | 4867 | _fullSceneCounterAtLastPhysicsCheck = _fullSceneReceivedCounter; |