Subversion Repository Public Repository

Divide-Framework

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

Diff Revisions 989 vs 990 for /trunk/Source Code/Scenes/WarScene/WarScene.cpp

Diff revisions: vs.
  @@ -513,12 +513,12 @@
513 513
514 514 SceneGraphNode_ptr firstPersonFlag = _sceneGraph->getRoot().addNode(flagNode, normalMask, PhysicsGroup::GROUP_KINEMATIC, "FirstPersonFlag");
515 515 firstPersonFlag->lockVisibility(true);
516 - firstPersonFlag->onCollisionCbk(DELEGATE_BIND(&WarScene::weaponCollision, this, std::placeholders::_1));
517 516 firstPersonFlag->usageContext(SceneGraphNode::UsageContext::NODE_DYNAMIC);
518 517 flagPComp = firstPersonFlag->get<PhysicsComponent>();
519 518 flagPComp->setScale(0.0015f);
520 519 flagPComp->setPosition(1.25f, -1.5f, 0.15f);
521 520 flagPComp->rotate(-20.0f, -70.0f, 50.0f);
521 + flagPComp->onCollisionCbk(DELEGATE_BIND(&WarScene::weaponCollision, this, std::placeholders::_1));
522 522 flagRComp = firstPersonFlag->getChild(0).get<RenderingComponent>();
523 523 flagRComp->getMaterialInstance()->setDiffuse(DefaultColours::GREEN);
524 524 flagRComp->getMaterialInstance()->setHighPriority(true);
  @@ -768,10 +768,8 @@
768 768 Scene::postLoadMainThread();
769 769 }
770 770
771 - void WarScene::weaponCollision(SceneGraphNode_cptr collider) {
772 - if (collider) {
773 - Console::d_printfn("Weapon touched [ %s ]", collider->getName().c_str());
774 - }
771 + void WarScene::weaponCollision(const PhysicsComponent& collider) {
772 + Console::d_printfn("Weapon touched [ %s ]", collider.getSGN().getName().c_str());
775 773 }
776 774
777 775 };