Commit Graph

167 Commits (84f8a6848a8b05502d7618ca7af8cca74f2c3bae)

Author SHA1 Message Date
Project579 a13709c510 Replace implicit convertions from std::filesystem::path to std::string with correctly converting functions. 2 years ago
Project579 e5c417c968 Make sure all paths are passed as std::filesystem::path instead of std::string where possible. 2 years ago
elsid 948e2f5db9
Do not use collision shapes with visual only collision to generate navmesh
These collision shapes are not used for actors movement physics simulation.
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
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
Petr Mikheev 8b8c304953 Treat empty `RootCollisionNode` in NIF as NCC flag and generate CameraOnly collision shape 3 years ago
elsid b4f12aace1
Explicitly ignore result of std::unique_ptr::release call
components/nifbullet/bulletnifloader.cpp:206:13: warning: the value returned by this function should be used [bugprone-unused-return-value]
            boxShape.release();
            ^~~~~~~~~~~~~~~~~~

components/nifbullet/bulletnifloader.cpp:232:13: warning: the value returned by this function should be used [bugprone-unused-return-value]
            child.release();
            ^~~~~~~~~~~~~~~

components/nifbullet/bulletnifloader.cpp:233:13: warning: the value returned by this function should be used [bugprone-unused-return-value]
            mStaticMesh.release();
            ^~~~~~~~~~~~~~~~~~~~~

components/nifbullet/bulletnifloader.cpp:240:9: warning: the value returned by this function should be used [bugprone-unused-return-value]
        mStaticMesh.release();
        ^~~~~~~~~~~~~~~~~~~~~

components/nifbullet/bulletnifloader.cpp:246:9: warning: the value returned by this function should be used [bugprone-unused-return-value]
        mAvoidStaticMesh.release();
        ^~~~~~~~~~~~~~~~~~~~~~~~~~

components/nifbullet/bulletnifloader.cpp:411:9: warning: the value returned by this function should be used [bugprone-unused-return-value]
        childMesh.release();
        ^~~~~~~~~~~~~~~~~~~

components/nifbullet/bulletnifloader.cpp:425:9: warning: the value returned by this function should be used [bugprone-unused-return-value]
        childShape.release();
        ^~~~~~~~~~~~~~~~~~~~
3 years ago
elsid 72bda2bd10
Avoid redundant initialization
components/nifbullet/bulletnifloader.cpp:79:24: warning: Value stored to 'a' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
        unsigned short a = strip[0], b = strip[0], c = strip[1];
                       ^   ~~~~~~~~
3 years ago
elsid bef15edf0b
Remove redundant ostream, istream, iostream and sstream includes
* Replace by std::to_string and operator+ where possible.
* Move the code requiring to include <sstream> from .hpp to .cpp files.
3 years ago
Alexei Kotov e673f9fa76 Clean up NIF flags 3 years ago
Evil Eye a95b6e050a Replace new with make_unique in components 3 years ago
fredzio d05a2facf3 Handle NCC flag in Nif files. Objects with this flag will collide only with camera.
Expose objects with NC flag to be used by Lua mods.
3 years ago
psi29a 6f7a067e0c Merge branch 'esmrename' into 'master'
esm refactor work

See merge request OpenMW/openmw!1575
3 years ago
Bret Curtis 74e7cfc023 remove unused includes: part1
remove unused imports: part2

revert one tidy we will keep for c++20
3 years ago
elsid 3f14011087
Support multiple parents for NIF nodes
Choose a parent base on which node is used to iterate over children nodes.
This leads to duplicate handing of child nodes. A node will be handled so many
times how many parents it has.

For example:
p1 p2
 \ /
  c

Will be handled as:
p1 p2
|  |
c  c

If c has children they will be handled X times c is handled.
3 years ago
elsid d7041613ef
Store BulletShape source file name and content hash 3 years ago
elsid 2b057f5c15
Expect nif node children to have parent 3 years ago
elsid 19843af704
Combine data check with data handling logic 3 years ago
elsid 4e8e8304aa
Avoid mesh allocation when data is invalid 3 years ago
elsid 4ac83f4c39
Add separate function to handle NiGeometry node
To force use a single source of data. All fields of Nif::Node are available in NiGeometry.
3 years ago
elsid 56eef691a8
Use reference type to pass nif node as argument where nullptr is not handled 3 years ago
elsid 4631d95739
Add more tests for BulletNifLoader 3 years ago
elsid a851ac5fea
Use custom deleter for btCompoundShape to delete children shapes 3 years ago
elsid b905dd17c3
Use unique_ptr to store btCollisionShape in BulletShape 3 years ago
elsid 29a772c33f
Rename Resource::BulletShape::CollisionBox fields according to styleguide 3 years ago
jvoisin aec3c74fa5 Sprinkle some [[noreturn]] where possible 4 years ago
Dobrohotov Alexei 19f0b80983 Improve null root handling 4 years ago
Andrei Kortunov 6d351b2bdd Fix MSVC 4706 warnings 4 years ago
Andrei Kortunov ee2416017e Fix tag mismatch 4 years ago
Alexei Dobrohotov 53e1e57eef Formatting 4 years ago
Alexei Dobrohotov 42226533d8 Handle BSLODTriShape
Its levels of detail are currently not handled
4 years ago
Alexei Dobrohotov 8fd45d85ec Unify NiGeometry/NiGeometryData handling 4 years ago
Alexei Dobrohotov 15291f15d3 Make actor collision box components a struct 4 years ago
Alexei Dobrohotov 5b6377b061 Handle multiple root nodes (bug #5604) 4 years ago
Alexei Dobrohotov df9667e923 Read NIF bounding volume data correctly 4 years ago
Alexei Dobrohotov c79f509652 Misc NIF loader improvements
Bullet NIF loader cleanup
Collect all extra records of a node
Remove code duplication in geometry type detection in OSG-side NIF loader
4 years ago
Capostrophic 30558c2434 Try to resolve CI concerns 5 years ago
Capostrophic 915ffe2241 Handle non-node roots more gracefully (bug #5416) 5 years ago
Andrei Kortunov 77d6fe46ca Handle NiCollisionSwitch node 5 years ago
Alexei Dobrohotov 822b20ef46
Fix invalid strips-based collision shape transformation 5 years ago
Capostrophic 8baddefdbd Refactor extra data and particle modifier handling
Objects no longer inherit from extra data class
"Controlled" harmful abstraction no longer exists
Introduced NiParticleModifier/NiParticleCollider abstractions
Extra data size reading moved into the base read() method
5 years ago
capostrophic 9e93c9ecd2 Fix multiple-strip NiTriStrips loading 5 years ago
capostrophic 7fc3153f62 Reduce code duplication further 5 years ago
capostrophic 91efdf18a9 Reduce Bullet part code duplication 5 years ago
capostrophic b4f54651f8 Make sure strips have valid size 5 years ago
capostrophic 6599a28ecf Generate collision shape based on NiTriStrips 5 years ago
capostrophic 8efbdeaa57 Load NiTriStrips/NiTriStripsData (don't do anything yet) 5 years ago
Alexei Dobrohotov 5965aa991b
Improve grammar in a warning 6 years ago
Bret Curtis 2ab7f903d7 make use of std::make_unique to test that MSVC2015 can handle that 6 years ago
Andrei Kortunov 3032b177a1 Remove redundant includes 6 years ago