Commit Graph

45 Commits (63b8e636f391e80388a7d7a5077c16cf9847fd64)

Author SHA1 Message Date
elsid cd6e49796e
Properly initialize local static pointers and collections
Static variables should be initalized once instead of initializing them with
nullptr and then doing actual initialization behind if condition. Otherwise a
race condition may happen leading to undefined behaviour.
3 months ago
Alexei Kotov 799da630e4 CopyRigVisitor: don't copy unskinned geometry (bug #5280) 1 year ago
Andrei Kortunov 35561450f1 Do not copy osg::ref_ptr when possible 1 year ago
elsid 843753da14
Remove unused includes 2 years ago
clang-format-bot ddb0522bbf
Apply clang-format to code base 2 years ago
elsid 5dc612aa54
Replace ciCompareLen with ciStartsWith where possible
`ciCompareLen(a, b, b.size()) == 0` expression is an equivalent of checking for
equality of `a` prefix with size `b.size()` with `b`.

`ciCompareLen(a, b, a.size()) == 0` is also the same thing but `a` is a prefix
`b` should start with.
2 years ago
unknown 206711876d Address feedback 2 years ago
unknown 827a2f0b77 Use string_view in animation code 2 years ago
elsid f99ed6f1db
Split components/misc/stringops.hpp into multiple headers
Replace all ciEqual overloads with one having std::string_view as argument.
2 years ago
Evil Eye a9106f4d7c Rotate torches by 90 degrees 3 years ago
Bo Svensson c9c8d02332
fixes a crash (#3183)
This PR fixes a crash caused by the improperly ensured lifetime of RigGeometry::mSourceGeometry. mSourceGeometry was not adequate to ensure mSourceGeometry would outlive mGeometry because we extend mGeometrys lifetime beyond this lifetime by passing mGeometry to the draw traversal instead of this.
In addition,

We add important comments.
We detect and prevent generally unsafe operations in high level code.
We add a sprinkling of const to help clarify intentions.
3 years ago
psi29a 01a8998e3b return if source is null in mergeUserData 3 years ago
Bo Svensson 147ed39900
This PR solves a crash with Robert's bodies logged on your bugtracker. (#3095)
* attach.cpp [ci skip]

* attach.cpp [ci skip]

* attach.cpp [ci skip]

* npcanimation.cpp [ci skip]

* attach.hpp [ci skip]

* attach.cpp [ci skip]

* creatureanimation.cpp [ci skip]

* creatureanimation.cpp [ci skip]

* cellpreloader.cpp

* npcanimation.cpp

* attach.cpp

* make android adk happy

* make android adk happy

* changelog.md [ci skip]

* authors.md [ci skip]
3 years ago
Andrei Kortunov 8ca3c3b123 Mark overrided methods by override keyword 4 years ago
Capostrophic 3b55d657e5 CopyRigVisitor: Log the number of parents in multiple parents error 4 years ago
Capostrophic 78b1bbe130 Remove unnecessary null check 5 years ago
Capostrophic 72e5043eda CopyRigVisitor fixes
Make sure it copies all relevant drawable parent nodes (e.g. including the node with the environment map effect)
Make sure it doesn't copy nodes multiple times
5 years ago
Andrei Kortunov 3032b177a1 Remove redundant includes 6 years ago
Andrei Kortunov 1452684d9e Use new logging system for components 6 years ago
scrawl 209e139aa8 Move double buffering implementation inside RigGeometry
The double buffering is an implementation detail so it should be handled as such, rather than mandating the scene graph to be structured in a certain way.

Override accept(NodeVisitor&) instead of using callbacks.
7 years ago
scrawl 45f7563a55 Revert "Revert "Check for a Geometry node when attaching bodyparts""
Issue with shaders has been fixed with b9931fb71c

This reverts commit a1e3fb7604.
7 years ago
scrawl a1e3fb7604 Revert "Check for a Geometry node when attaching bodyparts"
This reverts commit 3fc8634206.
7 years ago
scrawl 3fc8634206 Check for a Geometry node when attaching bodyparts (Fixes #3957) 7 years ago
scrawl 8d84869432 Fix commit 8f71b65d38 (don't overwrite the previous user data)
This resulted in a crash/corruption because the KeyframeController, for performance reasons, does not check that the expected user data is there and of correct type.

(Fixes #3829)
8 years ago
scrawl 8f71b65d38 sceneutil/attach: inherit the UserDataContainer to avoid the resource cache from being cleared incorrectly 8 years ago
scrawl 29556a1802 More consistent wording of errors/warnings
A Warning indicates a potential problem in the content file(s) that the user told OpenMW to load. E.g. this might cause an object to not display at all or as intended, however the rest of the game will run fine.

An Error, however, is more likely to be a bug with the engine itself - it means that basic assumptions have been violated and the engine might not run correctly anymore.

The above mostly applies to errors/warnings during game-play; startup issues are handled differently: when a file is completely invalid/corrupted to the point that the engine can not start, that might cause messages that are worded as Error due to the severity of the issue but are not necessarily the engine's fault.

Hopefully, being a little more consistent here will alleviate confusion among users as to when a log message should be reported and to whom.
8 years ago
scrawl c231b06320 Remove boneOffset node after using it 8 years ago
scrawl 33e654f94d Add explicit handling of most commonly used nodes to NodeVisitors to avoid excessive virtual function calls 8 years ago
scrawl 767eba941f Speed up finding of attachment node by using the cached nodeMap 8 years ago
scrawl f898bf493f Don't use Geodes 9 years ago
scrawl 0df975a4d7 Properly detach nodes in CopyRigVisitor (Fixes #3234) 9 years ago
scrawl 563807ee53 Share the StateSet used to invert front face 9 years ago
scrawl 1e5b4bea0a Don't create an unnecessary osg::Group when copying over a rig 9 years ago
scrawl b3f5ac5dbb Include cleanup 10 years ago
scrawl 7882c3d7f0 Fix incorrect rotation for meshes with BoneOffset 10 years ago
scrawl 5fbcf8a859 Mesh filtering fix 10 years ago
scrawl eaa4316ff8 Move skinning code to SceneUtil 10 years ago
scrawl bd88758962 Use the new skinning system in OpenMW 10 years ago
scrawl f7d2a28930 Port BoneOffset 10 years ago
scrawl 8f6d4fb3e0 Fix filtering bug 10 years ago
scrawl 57fd18b161 Fix frontface bug 10 years ago
scrawl c334a76a6f Fix skinning bug 10 years ago
scrawl 591a35b8d7 *very* early version of the LightManager 10 years ago
scrawl 5162e9c09e Add comment 10 years ago
scrawl a7272b73d0 Add utility for assembling body parts / equipment 10 years ago