Skip to content

Commit 25c19d5

Browse files
committed
Merge branch 'effectlighting' into 'master'
Apply white ambient lighting to free magic VFX See merge request OpenMW/openmw!4496
2 parents 9f90349 + d0918ed commit 25c19d5

File tree

6 files changed

+7
-9
lines changed

6 files changed

+7
-9
lines changed

apps/openmw/mwbase/world.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ namespace MWBase
516516
virtual void spawnBloodEffect(const MWWorld::Ptr& ptr, const osg::Vec3f& worldPosition) = 0;
517517

518518
virtual void spawnEffect(VFS::Path::NormalizedView model, const std::string& textureOverride,
519-
const osg::Vec3f& worldPos, float scale = 1.f, bool isMagicVFX = true, bool useAmbientLight = false)
519+
const osg::Vec3f& worldPos, float scale = 1.f, bool isMagicVFX = true, bool useAmbientLight = true)
520520
= 0;
521521

522522
/// @see MWWorld::WeatherManager::isInStorm

apps/openmw/mwlua/animationbindings.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -329,10 +329,8 @@ namespace MWLua
329329
}
330330
else
331331
{
332-
context.mLuaManager->addAction(
333-
[world, model = VFS::Path::Normalized(model), worldPos]() {
334-
world->spawnEffect(model, "", worldPos, 1.f, true, true);
335-
},
332+
context.mLuaManager->addAction([world, model = VFS::Path::Normalized(model),
333+
worldPos]() { world->spawnEffect(model, "", worldPos, 1.f); },
336334
"openmw.vfx.spawn");
337335
}
338336
};

apps/openmw/mwrender/effectmanager.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace MWRender
3535

3636
/// Add an effect. When it's finished playing, it will be removed automatically.
3737
void addEffect(VFS::Path::NormalizedView model, std::string_view textureOverride,
38-
const osg::Vec3f& worldPosition, float scale, bool isMagicVFX = true, bool useAmbientLight = false);
38+
const osg::Vec3f& worldPosition, float scale, bool isMagicVFX = true, bool useAmbientLight = true);
3939

4040
void update(float dt);
4141

apps/openmw/mwrender/renderingmanager.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ namespace MWRender
195195
SkyManager* getSkyManager();
196196

197197
void spawnEffect(VFS::Path::NormalizedView model, std::string_view texture, const osg::Vec3f& worldPosition,
198-
float scale = 1.f, bool isMagicVFX = true, bool useAmbientLight = false);
198+
float scale = 1.f, bool isMagicVFX = true, bool useAmbientLight = true);
199199

200200
/// Clear all savegame-specific data
201201
void clear();

apps/openmw/mwworld/worldimp.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -3685,7 +3685,7 @@ namespace MWWorld
36853685
const VFS::Path::Normalized model = Misc::ResourceHelpers::correctMeshPath(
36863686
VFS::Path::Normalized(Fallback::Map::getString("Blood_Model_" + std::to_string(number))));
36873687

3688-
mRendering->spawnEffect(model, texture, worldPosition, 1.0f, false);
3688+
mRendering->spawnEffect(model, texture, worldPosition, 1.0f, false, false);
36893689
}
36903690

36913691
void World::spawnEffect(VFS::Path::NormalizedView model, const std::string& textureOverride,

apps/openmw/mwworld/worldimp.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ namespace MWWorld
604604

605605
void spawnEffect(VFS::Path::NormalizedView model, const std::string& textureOverride,
606606
const osg::Vec3f& worldPos, float scale = 1.f, bool isMagicVFX = true,
607-
bool useAmbientLight = false) override;
607+
bool useAmbientLight = true) override;
608608

609609
/// @see MWWorld::WeatherManager::isInStorm
610610
bool isInStorm() const override;

0 commit comments

Comments
 (0)