From 61097d93b9d72f8c16db35b118e9cffe5ce7cd20 Mon Sep 17 00:00:00 2001 From: mrohrlach Date: Sat, 3 Dec 2016 19:09:03 -0700 Subject: [PATCH] Replaced tabs with spaces (oops) --- apps/openmw/mwworld/projectilemanager.cpp | 51 +++++++++++------------ 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/apps/openmw/mwworld/projectilemanager.cpp b/apps/openmw/mwworld/projectilemanager.cpp index a811880461..56a4b75feb 100644 --- a/apps/openmw/mwworld/projectilemanager.cpp +++ b/apps/openmw/mwworld/projectilemanager.cpp @@ -144,8 +144,8 @@ namespace MWWorld state.mNode->setNodeMask(MWRender::Mask_Effect); state.mNode->setPosition(pos); state.mNode->setAttitude(orient); - - osg::Group* attachTo = state.mNode; + + osg::Group* attachTo = state.mNode; if (rotate) { @@ -169,27 +169,26 @@ namespace MWWorld mResourceSystem->getSceneManager()->getInstance("meshes\\" + weapon->mModel, findVisitor.mFoundNode); } - if (isMagic) - { - // Add magic bolt light - osg::ref_ptr projectileLight(new osg::Light); - projectileLight->setDiffuse(osg::Vec4(0.95f, 0.71f, 0.25f, 1.0f)); - projectileLight->setAmbient(osg::Vec4(0.32f, 0.08f, 0.01f, 1.0f)); - projectileLight->setSpecular(osg::Vec4(0, 0, 0, 0)); - projectileLight->setLinearAttenuation(0.5f / 15); - projectileLight->setPosition(osg::Vec4(pos, 1.0)); - - // Add magic bolt light source - SceneUtil::LightSource* projectileLightSource = new SceneUtil::LightSource; - projectileLightSource->setNodeMask(MWRender::Mask_Lighting); - projectileLightSource->setRadius(66.f); - - // Attach to scene node - state.mNode->addChild(projectileLightSource); - projectileLightSource->setLight(projectileLight); - } - - + if (isMagic) + { + // Add magic bolt light + osg::ref_ptr projectileLight(new osg::Light); + projectileLight->setDiffuse(osg::Vec4(0.95f, 0.71f, 0.25f, 1.0f)); + projectileLight->setAmbient(osg::Vec4(0.32f, 0.08f, 0.01f, 1.0f)); + projectileLight->setSpecular(osg::Vec4(0, 0, 0, 0)); + projectileLight->setLinearAttenuation(0.5f / 15); + projectileLight->setPosition(osg::Vec4(pos, 1.0)); + + // Add magic bolt light source + SceneUtil::LightSource* projectileLightSource = new SceneUtil::LightSource; + projectileLightSource->setNodeMask(MWRender::Mask_Lighting); + projectileLightSource->setRadius(66.f); + + // Attach to scene node + state.mNode->addChild(projectileLightSource); + projectileLightSource->setLight(projectileLight); + } + SceneUtil::DisableFreezeOnCullVisitor disableFreezeOnCullVisitor; state.mNode->accept(disableFreezeOnCullVisitor); @@ -482,9 +481,9 @@ namespace MWWorld bool ProjectileManager::readRecord(ESM::ESMReader &reader, uint32_t type) { - if (type == ESM::REC_PROJ) + if (type == ESM::REC_PROJ) { - ESM::ProjectileState esm; + ESM::ProjectileState esm; esm.load(reader); ProjectileState state; @@ -513,7 +512,7 @@ namespace MWWorld } else if (type == ESM::REC_MPRJ) { - ESM::MagicBoltState esm; + ESM::MagicBoltState esm; esm.load(reader); MagicBoltState state;