Commit Graph

97 Commits

Author SHA1 Message Date
Evil Eye a95b6e050a Replace new with make_unique in components 2022-05-29 13:24:32 +02:00
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.
2022-04-17 20:03:00 +02:00
psi29a 6f7a067e0c Merge branch 'esmrename' into 'master'
esm refactor work

See merge request OpenMW/openmw!1575
2022-01-27 17:52:42 +00:00
Bret Curtis 74e7cfc023 remove unused includes: part1
remove unused imports: part2

revert one tidy we will keep for c++20
2022-01-23 17:30:25 +01:00
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.
2022-01-22 01:02:31 +01:00
elsid d7041613ef
Store BulletShape source file name and content hash 2021-11-11 00:27:18 +01:00
elsid 2b057f5c15
Expect nif node children to have parent 2021-11-02 22:44:33 +01:00
elsid 19843af704
Combine data check with data handling logic 2021-11-02 22:44:33 +01:00
elsid 4e8e8304aa
Avoid mesh allocation when data is invalid 2021-11-02 22:44:33 +01:00
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.
2021-11-02 22:44:32 +01:00
elsid 56eef691a8
Use reference type to pass nif node as argument where nullptr is not handled 2021-11-02 22:44:32 +01:00
elsid 4631d95739
Add more tests for BulletNifLoader 2021-11-02 22:44:32 +01:00
elsid a851ac5fea
Use custom deleter for btCompoundShape to delete children shapes 2021-10-30 03:48:02 +02:00
elsid b905dd17c3
Use unique_ptr to store btCollisionShape in BulletShape 2021-10-30 03:44:07 +02:00
elsid 29a772c33f
Rename Resource::BulletShape::CollisionBox fields according to styleguide 2021-10-29 21:05:58 +02:00
Dobrohotov Alexei 19f0b80983 Improve null root handling 2021-05-05 02:41:30 +03:00
Andrei Kortunov 6d351b2bdd Fix MSVC 4706 warnings 2021-04-23 22:53:59 +04:00
Alexei Dobrohotov 53e1e57eef Formatting 2020-12-15 00:06:43 +03:00
Alexei Dobrohotov 42226533d8 Handle BSLODTriShape
Its levels of detail are currently not handled
2020-12-15 00:06:43 +03:00
Alexei Dobrohotov 8fd45d85ec Unify NiGeometry/NiGeometryData handling 2020-12-15 00:06:43 +03:00
Alexei Dobrohotov 15291f15d3 Make actor collision box components a struct 2020-12-11 20:07:59 +03:00
Alexei Dobrohotov 5b6377b061 Handle multiple root nodes (bug #5604) 2020-11-28 13:25:39 +03:00
Alexei Dobrohotov df9667e923 Read NIF bounding volume data correctly 2020-11-14 14:16:29 +03:00
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
2020-11-08 13:23:18 +03:00
Capostrophic 30558c2434 Try to resolve CI concerns 2020-05-14 10:00:33 +03:00
Capostrophic 915ffe2241 Handle non-node roots more gracefully (bug #5416) 2020-05-14 00:57:00 +03:00
Andrei Kortunov 77d6fe46ca Handle NiCollisionSwitch node 2020-02-19 12:14:21 +04:00
Alexei Dobrohotov 822b20ef46
Fix invalid strips-based collision shape transformation 2019-09-23 20:38:42 +03:00
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
2019-09-13 20:26:22 +03:00
capostrophic 9e93c9ecd2 Fix multiple-strip NiTriStrips loading 2019-08-08 22:48:24 +03:00
capostrophic 7fc3153f62 Reduce code duplication further 2019-08-08 20:29:45 +03:00
capostrophic 91efdf18a9 Reduce Bullet part code duplication 2019-08-08 19:02:08 +03:00
capostrophic b4f54651f8 Make sure strips have valid size 2019-08-08 17:15:33 +03:00
capostrophic 6599a28ecf Generate collision shape based on NiTriStrips 2019-08-08 17:15:33 +03:00
capostrophic 8efbdeaa57 Load NiTriStrips/NiTriStripsData (don't do anything yet) 2019-08-08 17:09:06 +03:00
Alexei Dobrohotov 5965aa991b
Improve grammar in a warning 2019-06-01 00:06:49 +03:00
Bret Curtis 2ab7f903d7 make use of std::make_unique to test that MSVC2015 can handle that 2019-04-10 11:09:44 +02:00
Andrei Kortunov 3032b177a1 Remove redundant includes 2019-02-23 08:02:12 +04:00
Bret Curtis d6c674660a
Merge pull request #1633 from elsid/pathfinder_detour
Use recastnavigation for pathfinding (#2229)
2018-10-30 20:44:13 +01:00
Andrei Kortunov 61da6b6ecf Print warning if the RootCollisionNode is attached to non-root node (bug #4311) 2018-10-26 17:11:08 +04:00
Andrei Kortunov 6d91fe69b2 Revert "Handle RootCollisionNode, attached to non-root node (bug #4311)"
This reverts commit ec9a1b0d05.
2018-10-26 12:51:04 +04:00
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.
2018-10-13 22:22:12 +03:00
elsid f6a60790f8
Create collision shape for all avoided nodes 2018-10-13 22:16:31 +03:00
elsid 330e596c64
Remove useless parameter 2018-10-13 22:16:31 +03:00
Andrei Kortunov e06f0b797a Replace all NULLs to nullptr 2018-10-09 10:21:12 +04:00
Andrei Kortunov 1452684d9e Use new logging system for components 2018-08-14 19:42:41 +04:00
elsid 2de38142e2
Replace raw pointers by unique_ptr 2018-08-11 18:00:52 +03:00
elsid f2a63bcf35
Add unit tests for BulletNifLoader 2018-08-11 18:00:52 +03:00
Andrei Kortunov ec9a1b0d05 Handle RootCollisionNode, attached to non-root node (bug #4311) 2018-08-10 11:11:40 +04:00
elsid 3f21c49479
Put check for nif file name into separate function 2018-07-10 23:46:06 +03:00