Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 868 vs 869 for /trunk/Source Code/Scenes/Scene.cpp

Diff revisions: vs.
  @@ -442,7 +442,7 @@
442 442 to_const_U32(SGNComponent::ComponentType::RENDERING) |
443 443 to_const_U32(SGNComponent::ComponentType::NETWORKING);
444 444
445 - SceneGraphNode_ptr flashLight = _flashLight[playerIndex];
445 + SceneGraphNode_ptr& flashLight = _flashLight[playerIndex];
446 446 if (!flashLight) {
447 447 ResourceDescriptor tempLightDesc(Util::StringFormat("Flashlight_%d", playerIndex));
448 448 tempLightDesc.setEnumValue(to_const_U32(LightType::SPOT));
  @@ -452,8 +452,13 @@
452 452 tempLight->setRange(30.0f);
453 453 tempLight->setCastShadows(true);
454 454 tempLight->setDiffuseColour(DefaultColours::WHITE());
455 - flashLight = _sceneGraph->getRoot().addNode(tempLight, lightMask, PhysicsGroup::GROUP_IGNORE);
456 - hashAlg::emplace(_flashLight, playerIndex, flashLight);
455 + flashLight = _sceneGraph->getRoot().addNode(tempLight,
456 + lightMask,
457 + PhysicsGroup::GROUP_IGNORE);
458 + hashAlg::emplace(_flashLight,
459 + playerIndex,
460 + flashLight);
461 +
457 462 }
458 463
459 464 flashLight->getNode<Light>()->toggleEnabled();
  @@ -724,7 +729,15 @@
724 729 loadXMLAssets();
725 730 addSelectionCallback(DELEGATE_BIND(&GUI::selectionChangeCallback, &_context.gui(), this, std::placeholders::_1));
726 731
727 - WAIT_FOR_CONDITION(_loadingTasks == 0);
732 + U32 totalLoadingTasks = _loadingTasks;
733 + Console::d_printfn(Locale::get(_ID("SCENE_LOAD_TASKS")), totalLoadingTasks);
734 + while (totalLoadingTasks > 0) {
735 + if (totalLoadingTasks != _loadingTasks) {
736 + totalLoadingTasks = _loadingTasks;
737 + Console::d_printfn(Locale::get(_ID("SCENE_LOAD_TASKS")), totalLoadingTasks);
738 + }
739 + std::this_thread::yield();
740 + }
728 741
729 742 _loadComplete = true;
730 743 return _loadComplete;