Commit Graph

102 Commits (228a0dc723a925f60ab8a235d4939fe3267e3adb)

Author SHA1 Message Date
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
Dobrohotov Alexei 19f0b80983 Improve null root handling 4 years ago
Andrei Kortunov 6d351b2bdd Fix MSVC 4706 warnings 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
Bret Curtis d6c674660a
Merge pull request #1633 from elsid/pathfinder_detour
Use recastnavigation for pathfinding (#2229)
6 years ago
Andrei Kortunov 61da6b6ecf Print warning if the RootCollisionNode is attached to non-root node (bug #4311) 6 years ago
Andrei Kortunov 6d91fe69b2 Revert "Handle RootCollisionNode, attached to non-root node (bug #4311)"
This reverts commit ec9a1b0d05.
6 years ago
elsid ed73d130f9
Cache navmesh tiles
Use LRU modification to hold currently used items. Use RecastMesh binary
data for item key.

Store original pointer of btCollisionShape in user pointer to make available
it as an identifier within all duplicates. Use pointer to heights data array
for btHeightfieldTerrainShape.
6 years ago
elsid f6a60790f8
Create collision shape for all avoided nodes 6 years ago
elsid 330e596c64
Remove useless parameter 6 years ago
Andrei Kortunov e06f0b797a Replace all NULLs to nullptr 6 years ago