mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 12:36:42 +00:00
Replaced tabs with spaces (oops)
This commit is contained in:
parent
49ce80346c
commit
61097d93b9
1 changed files with 25 additions and 26 deletions
|
@ -145,7 +145,7 @@ namespace MWWorld
|
||||||
state.mNode->setPosition(pos);
|
state.mNode->setPosition(pos);
|
||||||
state.mNode->setAttitude(orient);
|
state.mNode->setAttitude(orient);
|
||||||
|
|
||||||
osg::Group* attachTo = state.mNode;
|
osg::Group* attachTo = state.mNode;
|
||||||
|
|
||||||
if (rotate)
|
if (rotate)
|
||||||
{
|
{
|
||||||
|
@ -169,26 +169,25 @@ namespace MWWorld
|
||||||
mResourceSystem->getSceneManager()->getInstance("meshes\\" + weapon->mModel, findVisitor.mFoundNode);
|
mResourceSystem->getSceneManager()->getInstance("meshes\\" + weapon->mModel, findVisitor.mFoundNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isMagic)
|
if (isMagic)
|
||||||
{
|
{
|
||||||
// Add magic bolt light
|
// Add magic bolt light
|
||||||
osg::ref_ptr<osg::Light> projectileLight(new osg::Light);
|
osg::ref_ptr<osg::Light> projectileLight(new osg::Light);
|
||||||
projectileLight->setDiffuse(osg::Vec4(0.95f, 0.71f, 0.25f, 1.0f));
|
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->setAmbient(osg::Vec4(0.32f, 0.08f, 0.01f, 1.0f));
|
||||||
projectileLight->setSpecular(osg::Vec4(0, 0, 0, 0));
|
projectileLight->setSpecular(osg::Vec4(0, 0, 0, 0));
|
||||||
projectileLight->setLinearAttenuation(0.5f / 15);
|
projectileLight->setLinearAttenuation(0.5f / 15);
|
||||||
projectileLight->setPosition(osg::Vec4(pos, 1.0));
|
projectileLight->setPosition(osg::Vec4(pos, 1.0));
|
||||||
|
|
||||||
// Add magic bolt light source
|
// Add magic bolt light source
|
||||||
SceneUtil::LightSource* projectileLightSource = new SceneUtil::LightSource;
|
SceneUtil::LightSource* projectileLightSource = new SceneUtil::LightSource;
|
||||||
projectileLightSource->setNodeMask(MWRender::Mask_Lighting);
|
projectileLightSource->setNodeMask(MWRender::Mask_Lighting);
|
||||||
projectileLightSource->setRadius(66.f);
|
projectileLightSource->setRadius(66.f);
|
||||||
|
|
||||||
// Attach to scene node
|
|
||||||
state.mNode->addChild(projectileLightSource);
|
|
||||||
projectileLightSource->setLight(projectileLight);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// Attach to scene node
|
||||||
|
state.mNode->addChild(projectileLightSource);
|
||||||
|
projectileLightSource->setLight(projectileLight);
|
||||||
|
}
|
||||||
|
|
||||||
SceneUtil::DisableFreezeOnCullVisitor disableFreezeOnCullVisitor;
|
SceneUtil::DisableFreezeOnCullVisitor disableFreezeOnCullVisitor;
|
||||||
state.mNode->accept(disableFreezeOnCullVisitor);
|
state.mNode->accept(disableFreezeOnCullVisitor);
|
||||||
|
@ -482,9 +481,9 @@ namespace MWWorld
|
||||||
|
|
||||||
bool ProjectileManager::readRecord(ESM::ESMReader &reader, uint32_t type)
|
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);
|
esm.load(reader);
|
||||||
|
|
||||||
ProjectileState state;
|
ProjectileState state;
|
||||||
|
@ -513,7 +512,7 @@ namespace MWWorld
|
||||||
}
|
}
|
||||||
else if (type == ESM::REC_MPRJ)
|
else if (type == ESM::REC_MPRJ)
|
||||||
{
|
{
|
||||||
ESM::MagicBoltState esm;
|
ESM::MagicBoltState esm;
|
||||||
esm.load(reader);
|
esm.load(reader);
|
||||||
|
|
||||||
MagicBoltState state;
|
MagicBoltState state;
|
||||||
|
|
Loading…
Reference in a new issue