Commit Graph

26857 Commits (a9877aea984243bc04cf26b80320a7d96c22124f)
 

Author SHA1 Message Date
psi29a 4cd927b22a Merge branch 'fix-osg-version-check' into 'master'
Fix FTBFS against older versions of osg

See merge request OpenMW/openmw!1292
3 years ago
Evil Eye 4a6464ea67 Stop trying to play non-existent music files started by scripts 3 years ago
Dan Church 42bd10f356
Fix FTBFS against older versions of osg
Bring back osg version guard.

Drawable::dirtyGLObjects wasn't available until OpenSceneGraph-3.5.10.
3 years ago
Evil Eye ec6451e93a Merge branch 'recordtype' into 'master'
Avoid copying std::string in MWWorld::Ptr::getTypeDescription()

See merge request OpenMW/openmw!1290
3 years ago
Bo Svensson 617eec338a
removes version guard (#3173)
We currently use a version guard to adapt to a change in the number of parameters supplied to osg::TriangleFunctor's operator() template functor. The differing parameter is unused in our code. Crucially, operator() is not an override, so we can just add a default value for the differing parameter. Such a default allows us to apply identical code to both versions of the library without regressing functionality.
3 years ago
Bo Svensson fc9ab97950
sky.cpp 3 years ago
Petr Mikheev 4e9d691715 Add comment for MWWorld::Ptr::getType() because it is not obvious. 3 years ago
Evil Eye 6b482d0b52 Merge branch 'openmw-tradeglitch' into master 3 years ago
Bo Svensson b0132be53f
do not dirty unchanged arrays (#3164)
This PR proposes a simple change to `RigGeometry` `dirtyGLObjects` logic.

1. We will avoid dirtying unmodified arrays.
2. We can drop an osg version guard since `Drawable::dirtyGLObjects` is not nearly as harmful as `Geometry::dirtyGLObjects`.
3. We will avoid crashes in an as yet unfinished future PR concerning `Array` sharing improvements.
3 years ago
psi29a 6ec66edb7c Merge branch 'soulful' into 'master'
Fix soul trapping for one shot kills

Closes #6337

See merge request OpenMW/openmw!1288
3 years ago
psi29a 67fa8413f3 Merge branch 'physics_heightfield' into 'master'
Replace float type for arguments to create heightfield with int

See merge request OpenMW/openmw!1285
3 years ago
psi29a f55f90b36c Merge branch 'sqlite3' into 'master'
Add dependency to SQLite3

See merge request OpenMW/openmw!1286
3 years ago
psi29a 207a7245bc Merge branch 'navigator_settings' into 'master'
Initialize navigator max climb and max slope settings in makeSettingsFromSettingsManager

See merge request OpenMW/openmw!1283
3 years ago
psi29a 444765e304 Merge branch 'navmesh_agent_half_extents' into 'master'
Define default actor half extents in settings

See merge request OpenMW/openmw!1282
3 years ago
psi29a d110c1be3b Merge branch 'collision_object' into 'master'
Move btCollisionObject creation for MWPhysics::Object into components

See merge request OpenMW/openmw!1281
3 years ago
Petr Mikheev a8acc19988 Avoid copying std::string in MWWorld::Ptr::getTypeDescription() 3 years ago
elsid 405e814190
Move btCollisionObject creation for MWPhysics::Object into components 3 years ago
Evil Eye ae4578f566 Fix soul trapping for one shot kills 3 years ago
Petr Mikheev fec65acd18 Move getters to header in order to allow inlining 3 years ago
elsid 144862aa35
Define default actor half extents in settings
Player's half extents may change over time when wolfskin model is used for
example. Having it in settings is a more presistent approach.
3 years ago
elsid 2bace703d5
Add dependency to SQLite3
This will be required by navmeshtool.
3 years ago
elsid 7c5a590890
Replace float type for arguments to create heightfield with int
To reduce amount of computations on the caller side and restrict possible
values.

* verts can't be non-int because it's a number of things.
* worldsize is initially defined as int by ESM::Land::REAL_SIZE.
* Put function to calculate heightfied shift into components to be able to
  reuse by other binaries.
3 years ago
elsid 6986feb81b
Initialize navigator max climb and max slope settings in makeSettingsFromSettingsManager
To avoid having multiple places to initialize them when they will be required
by multiple binaries.
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