Commit Graph

26526 Commits (2bace703d55a06defb1bd133ac3266f3914b866d)
 

Author SHA1 Message Date
elsid 2bace703d5
Add dependency to SQLite3
This will be required by navmeshtool.
3 years ago
Bo Svensson d6613d3677
mostly reverts MWLua changes (#3170)
We just can no longer use the former ptr.getTypeName() as a fallback, but I do not suppose it matters. This value was an implementation defined string that usually contained a garbled mess.
Probably we should additionally refactor Lua types completely now that we have Ptr::getType(). I will leave this up to MWLua developers.
3 years ago
Bret Curtis 21f1cf6d86
Merge pull request #3169 from bosvensson1/patch-47
fixes build
For some reason only some platforms complain about this missing header.
3 years ago
Bo Svensson 5cf9995a31
fixes windows build 3 years ago
Bo Svensson 93848ef01c
avoids virtual function calls in ComputeLightSpaceBounds (#3167)
osg::NodeVisitor is designed to recursively call virtual apply signatures until we find an implemented signature. Encountered nodes that we do not explicitely handle will trigger additional virtual function calls. With this PR we avoid these additional virtual function calls in the particularly costly ComputeLightSpaceBounds by adding some explicit signatures.
3 years ago
Bo Svensson ef906cbfa8
improves MWClass mapping (#3166)
Currently, we use a peculiar mapping of ESM classes by their std::type_info::name. This mapping is an undefined behaviour because std::type_info::name is strictly implementation defined. It could return a non-unique value on some platforms. With this PR we use the unsigned int sRecordId of the ESM class as a more efficient lookup type that does not build on undefined behaviour. We can expect marginally faster save-game loading with these changes as well.
3 years ago
Bo Svensson 98f8295765
allows to skip ComputeLightSpaceBounds traversal (#3152)
Currently, we always traverse the scene graph an additional time with a ComputeLightSpaceBounds visitor during shadow casting. ComputeLightSpaceBounds is only useful when the shadow casting mask allows us to shrink the bounds of the rendered scene, so we guard its traversal with a check against getCastsShadowTraversalMask. In practice, this guard never works because we build the traversal mask inclusively.

With this PR we limit the getCastsShadowTraversalMask check to relevant masks. This new check allows us to skip a superfluous ComputeLightSpaceBounds traversal with most settings.
3 years ago
psi29a 66a6b80df9 Merge branch 'thrust_into_the_light' into 'master'
Detect keys and enchanted items in containers without custom data

Closes #6326

See merge request OpenMW/openmw!1265
3 years ago
psi29a f9124ccea6 Merge branch 'recast_mesh_slope' into 'master'
Use different colors for walkable and non-walkable recast mesh triangles

See merge request OpenMW/openmw!1277
3 years ago
psi29a 3e2694dde9 Merge branch 'catch_me' into 'master'
Remove active effects from spells that no longer exist

See merge request OpenMW/openmw!1273
3 years ago
psi29a d3bad2dba2 Merge branch 'stripperiffic_werewolves' into 'master'
Remove magic effects before saving stats when turning into a werewolf

Closes #6330

See merge request OpenMW/openmw!1270
3 years ago
psi29a 21c4504d35 Merge branch 'max_slope' into 'master'
Change max walkable slope angle to 46 degrees

See merge request OpenMW/openmw!1280
3 years ago
psi29a f014edd27c Merge branch 'fix_write_recast_mesh' into 'master'
Fix writing to file for RecastMesh

See merge request OpenMW/openmw!1278
3 years ago
Bo Svensson 7c50f823d8
devirtualises BSAFile (#3161)
Currently, Open MW's basic file access speed is limited by a peculiar layer of virtualisation in BSAFile's interface. This PR removes such virtualisation by properly separating BSAFile from CompressedBSAFile in low level contexts.
3 years ago
Bo Svensson cbcdd705ee
minor objectpaging.cpp scene graph optimisations (#3155)
We now use PositionAttitudeTransform for unmerged nodes because I have been informed PositionAttitudeTransform's scene graph performance is measurably faster than MatrixTransform's. We still need to use MatrixTransform for merged nodes because the Optimizer has limited support for non-MatrixTransform nodes. These MatrixTransforms will be removed in the merging process anyway.
3 years ago
Bo Svensson c2d836c6c4
optimises riggeometry.cpp (#3165)
We skip this during node path iterations. this is not a node we are interested in.
We avoid allocating a new mGeomToSkelMatrix per frame and avoid a ref_ptr associated with its update.
We speed up a search for the Skeleton node by adding a continue; condition prior to an expensive dynamic_cast.
3 years ago
elsid ff9aabafd1
Change max walkable slope angle to 46 degrees
This is the value used by vanilla Morrowind engine. At this angle player
character starts sliding down the slope.

This fixes navigation and movement issue in Mournhold, Godsreach.
3 years ago
Bo Svensson af759683b8
enables std::move in keywordsearch.hpp (#3163)
For some reason we have commented std::move keywords in keywordsearch.hpp while they are quite beneficial. openmw_test_suite for keywordsearch.hpp takes 30% less time with these changes.
3 years ago
Bo Svensson 031871cd48
speeds up optimizer (#3162)
We can expect marginally improved loading times with this PR. Drawable, Transform and Node counts in stats panels are expected to remain unchanged - this PR does not add new scene graph optimisations, it just increases the speed with which we apply existing ones.

1. We add explicit `NodeVisitor::apply` overrides for commonly encountered node types to avoid additional virtual function calls per node associated with the default `apply` implementation.
2. We skip pushing `StateSet`s when  `_mergeAlphaBlending` is enabled or the `StateSet` contains no relevant state.
3. We add a specialised variant of `CollectLowestTransformsVisitor::addTransform` accepting `MatrixTransform` to avoid matrix copies and multiplications.
3 years ago
elsid 0c8a811ad5
Render only cached recast mesh
To avoid waiting while recast mesh is generating.

Remove redundant continue.
3 years ago
elsid daff7aba01
Use different colors for walkable and non-walkable triangles 3 years ago
elsid 88ac77df1f
Fix writing to file for RecastMesh
Add missing scaling and y, z coordinates swap.
3 years ago
Evil Eye 3d5950f790 Remove active effects from spells that no longer exist 3 years ago
Bo Svensson b61140b8ba
optimises skeleton.cpp (#3158)
With this PR we optimise a function that is called quite often when loading new cells.

We remove avoidable dynamic_casts.
We remove an unused pair.second element.
We convert a map to an unordered_map because its ordering is irrelevant in this case.
We avoid adding the root Skeleton node to the bones' node path.
3 years ago
Evil Eye ec735529da Remove active effects from the player when transforming 3 years ago
Evil Eye f6eeee3ad5 Detect keys and enchanted items in containers without custom data 3 years ago
psi29a 7af245d205 Merge branch 'sync_sync_with_async' into 'master'
Merge logic of sync and async physics simulation

See merge request OpenMW/openmw!1250
3 years ago
psi29a ae31138686 Merge branch 'options_tests' into 'master'
Add tests for openmw options

See merge request OpenMW/openmw!1253
3 years ago
Bo Svensson 5242e2695c
avoids memory allocations within ComputeLightSpaceBounds (#3156)
Currently, we create a new ComputeLightSpaceBounds visitor per frame. Within this visitor, we require excessive memory allocations, mainly a new osg::RefMatrix per encountered Transform node.

With this PR we reuse a single ComputeLightSpaceBounds visitor across frames and enable the createOrReuseMatrix functionality to avoid allocating new matrices every frame. osgUtil::CullVisitor internally uses the same approach.
3 years ago
psi29a 9c47fdcf7e Merge branch 'flip_sign' into 'master'
Fix regression #6328

Closes #6328

See merge request OpenMW/openmw!1267
3 years ago
psi29a 1332e57195 Merge branch 'outside_means_outside' into 'master'
Make StayOutside only block teleportation from exteriors to interiors

Closes #6323

See merge request OpenMW/openmw!1268
3 years ago
psi29a 88d5b4a90b Merge branch 'variable_function' into 'master'
Parse local variables sharing a name with a function as variables

Closes #6291

See merge request OpenMW/openmw!1269
3 years ago
psi29a fc7e13d76a Merge branch 'omwaddon_dep' into 'master'
Allow creating omwaddons without a dependency on an omwgame

See merge request OpenMW/openmw!1243
3 years ago
Evil Eye caafd0c667 Remove CE enchantments before saving stats when turning into a werewolf 3 years ago
psi29a 1f62fd3b56 Merge branch 'Fix_Keyword_Report_to_caius' into 'master'
Fix keyword search when the keyword is preceded by a non whitespace non alpha character

Closes #6308

See merge request OpenMW/openmw!1266
3 years ago
florent teppe e5abadc234 Fix keyword search when the keyword is preceded by a non whitespace non alpha character 3 years ago
Bret Curtis 8d37d79d6c
Merge pull request #3154 from bosvensson1/patch-29
improves RemoveRedundantNodesVisitor performance for large children vectors
3 years ago
Bret Curtis bf85745931
Merge pull request #3153 from bosvensson1/patch-27
With this PR we fix a warning from coverity-ci triggered by inconsistent nullptr checks.
3 years ago
psi29a 555224a0fb Merge branch 'fixes' into 'master'
Make compilers happy and fix the changelog

See merge request OpenMW/openmw!1260
3 years ago
Bo Svensson 08608da62c
optimizer.cpp 3 years ago
Evil Eye 5037def3b3 Parse local variables sharing a name with a function as variables 3 years ago
Evil Eye dfc72e9b7e Make StayOutside only block teleportation from exteriors to interiors 3 years ago
Evil Eye a1825980c4 Define OpenMW specific C++ flags 3 years ago
Evil Eye 7540265432 Fix regression #6328 3 years ago
Bo Svensson 87d52dc1fd
fixes coverity-ci warning 3 years ago
Bo Svensson cd4d76f8c5
discard off-screen lights (#3120)
Currently, we run culling tests against all lights in the scene during LightListCallback::pushLightState. We can avoid most of these tests by removing off-screen lights at an earlier stage. We should benchmark the cumulative time spent within LightListCallback::pushLightState before and after this PR.
3 years ago
Bo Svensson 787f91211d resets state updater to apply light settings (#3141)
resets state updater to apply light settings

With this PR we achieve the same effect with fewer lines of code.
3 years ago
psi29a c3f5e8f968 Merge branch 'lua_transform' into 'master'
3D transforms in Lua

See merge request OpenMW/openmw!1235
3 years ago
Bret Curtis e581b61ecb check if FORCE_OPAQUE is available before using it. 3 years ago
elsid 035307b012
Add tests for openmw options
In attempt to document current behaviour. Add commented out checks as desired
behaviour.
3 years ago