mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-29 07:45:33 +00:00
Apply ambient lighting to free magic VFX
This commit is contained in:
parent
d476c8cf57
commit
d0918ed1f2
6 changed files with 7 additions and 9 deletions
|
@ -516,7 +516,7 @@ namespace MWBase
|
|||
virtual void spawnBloodEffect(const MWWorld::Ptr& ptr, const osg::Vec3f& worldPosition) = 0;
|
||||
|
||||
virtual void spawnEffect(VFS::Path::NormalizedView model, const std::string& textureOverride,
|
||||
const osg::Vec3f& worldPos, float scale = 1.f, bool isMagicVFX = true, bool useAmbientLight = false)
|
||||
const osg::Vec3f& worldPos, float scale = 1.f, bool isMagicVFX = true, bool useAmbientLight = true)
|
||||
= 0;
|
||||
|
||||
/// @see MWWorld::WeatherManager::isInStorm
|
||||
|
|
|
@ -329,10 +329,8 @@ namespace MWLua
|
|||
}
|
||||
else
|
||||
{
|
||||
context.mLuaManager->addAction(
|
||||
[world, model = VFS::Path::Normalized(model), worldPos]() {
|
||||
world->spawnEffect(model, "", worldPos, 1.f, true, true);
|
||||
},
|
||||
context.mLuaManager->addAction([world, model = VFS::Path::Normalized(model),
|
||||
worldPos]() { world->spawnEffect(model, "", worldPos, 1.f); },
|
||||
"openmw.vfx.spawn");
|
||||
}
|
||||
};
|
||||
|
|
|
@ -35,7 +35,7 @@ namespace MWRender
|
|||
|
||||
/// Add an effect. When it's finished playing, it will be removed automatically.
|
||||
void addEffect(VFS::Path::NormalizedView model, std::string_view textureOverride,
|
||||
const osg::Vec3f& worldPosition, float scale, bool isMagicVFX = true, bool useAmbientLight = false);
|
||||
const osg::Vec3f& worldPosition, float scale, bool isMagicVFX = true, bool useAmbientLight = true);
|
||||
|
||||
void update(float dt);
|
||||
|
||||
|
|
|
@ -195,7 +195,7 @@ namespace MWRender
|
|||
SkyManager* getSkyManager();
|
||||
|
||||
void spawnEffect(VFS::Path::NormalizedView model, std::string_view texture, const osg::Vec3f& worldPosition,
|
||||
float scale = 1.f, bool isMagicVFX = true, bool useAmbientLight = false);
|
||||
float scale = 1.f, bool isMagicVFX = true, bool useAmbientLight = true);
|
||||
|
||||
/// Clear all savegame-specific data
|
||||
void clear();
|
||||
|
|
|
@ -3685,7 +3685,7 @@ namespace MWWorld
|
|||
const VFS::Path::Normalized model = Misc::ResourceHelpers::correctMeshPath(
|
||||
VFS::Path::Normalized(Fallback::Map::getString("Blood_Model_" + std::to_string(number))));
|
||||
|
||||
mRendering->spawnEffect(model, texture, worldPosition, 1.0f, false);
|
||||
mRendering->spawnEffect(model, texture, worldPosition, 1.0f, false, false);
|
||||
}
|
||||
|
||||
void World::spawnEffect(VFS::Path::NormalizedView model, const std::string& textureOverride,
|
||||
|
|
|
@ -604,7 +604,7 @@ namespace MWWorld
|
|||
|
||||
void spawnEffect(VFS::Path::NormalizedView model, const std::string& textureOverride,
|
||||
const osg::Vec3f& worldPos, float scale = 1.f, bool isMagicVFX = true,
|
||||
bool useAmbientLight = false) override;
|
||||
bool useAmbientLight = true) override;
|
||||
|
||||
/// @see MWWorld::WeatherManager::isInStorm
|
||||
bool isInStorm() const override;
|
||||
|
|
Loading…
Reference in a new issue