1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 16:29:55 +00:00
Commit graph

204 commits

Author SHA1 Message Date
psi29a
5d53eb7566 Merge branch 'russianroulette' into 'master'
BulletNifLoader: Handle NiSkinPartition, reduce false-positive collision generation for NiSwitchNode children

See merge request OpenMW/openmw!3634
2023-12-26 10:33:20 +00:00
Alexei Kotov
754c5a8e2a Restore animated collision shape rescaling 2023-12-06 00:54:54 +03:00
Alexei Kotov
b93291840e BulletNifLoader: Handle NiSkinPartition
Add NiSkinPartition recovery helper method
2023-12-04 15:53:24 +03:00
Alexei Kotov
6e7661ca87 BulletNifLoader: Handle only the first child of NiSwitchNode and NiFltAnimationNode
To prevent duplicated collisions in general cases when the node states are similar or only one child is ever active.
For NiLODNode this is definitely not going to work
2023-12-04 01:22:13 +03:00
Alexei Kotov
9a43ca2d00 Move NiGeometry triangulation to NiGeometry 2023-11-24 23:39:49 +03:00
Alexei Kotov
c7d5ea9fbf Improve BulletNifLoader handling of extra data
Only handle extra data for the root node(s)
Properly handle MRK flag editor marker filtering
Fix BSXFlags test
2023-11-14 01:30:36 +03:00
Alexei Kotov
2c1db92d04 Don't use Bounding Box node bounds as the original collision shape
Bounding Box node bounds are not used for non-actor collision in Morrowind and the generated box isn't actually used for actor collision in OpenMW
Preserving btBoxShape cloning code because it might get used in the future
2023-11-04 00:56:14 +03:00
Alexei Kotov
9405e5cb3c BulletNifLoader: Replicate node bounds handling more closely 2023-10-19 03:11:55 +03:00
Alexei Kotov
40313019ef BulletNifLoader updates
Refactor root node, visual collision type and filename handling
Only handle BSXFlags for the root, handle BSXFlags collision flag and absence
Properly distinguish collision node and autogenerated flag
2023-10-15 15:22:59 +03:00
Alexei Kotov
af24d3fd3c Nth revision of NifLoader geometry handling
Handle BSSegmentedTriShape
2023-10-04 15:54:28 +03:00
Alexei Kotov
eb8242946a Improve node record consistency with NifTools 2023-09-16 19:17:40 +03:00
Alexei Kotov
bff9231c3b Refactor NiGeometry/BSTriShape
Don't pass invalid geometry data links to the loaders
2023-09-16 19:17:40 +03:00
Alexei Kotov
deb051639e Refactor NiBoundingVolume 2023-09-15 21:11:12 +03:00
Alexei Kotov
0fe095303f Rename Controller->NiTimeController, update NiTimeController and related code 2023-09-14 03:12:10 +03:00
Alexei Kotov
a7cc4e6ba6 Rename Node->NiAVObject and update everything directly related
Update NiNode
Simplify RootCollisionNode handling in BulletNifLoader
2023-09-10 07:18:39 +03:00
Alexei Kotov
ef896faa90 Rename Named->NiObjectNET and update everything directly related to it
BulletNifLoader: properly check if the node has animation controllers
Flatten extra data linked list
2023-09-10 07:18:39 +03:00
Alexei Kotov
89774716fb Modernize NiGeometryData 2023-09-06 23:55:36 +03:00
Alexei Kotov
cfd37dbcc6 Modernize NiTriShapeData 2023-09-06 23:55:36 +03:00
Alexei Kotov
eba0ab444b Modernize NiTriStripsData 2023-09-06 23:55:35 +03:00
Alexei Kotov
fda6b0b4f8 Modernize NiUVData, NiLinesData, NiTriBasedGeomData 2023-09-06 23:55:35 +03:00
Alexei Kotov
2edf3399e2 Modernize extra data records 2023-09-01 01:54:11 +03:00
psi29a
c290754077 Revert "Merge branch 'loadSSEAlchemyTable' into 'master'"
This reverts merge request !3267
2023-08-03 19:55:06 +00:00
alekulyn
d2896945e8 Load SSE alchemy table 2023-07-28 07:46:20 +00:00
Alexei Kotov
3f252eab5d Copy triangle data from NiSkinPartition 2023-07-23 13:32:33 +03:00
Alexei Dobrohotov
2de8c6b3c0 Don't discard collision for the entire tree if BSXFlags marker flag is set 2023-07-10 23:37:37 +03:00
Petr Mikheev
19fb9f8e14 Handle editor marker bit in BSXFlags 2023-05-29 18:47:27 +02:00
Petr Mikheev
fd90a8c9b4 Hide Nif nodes with name "EditorMarker". 2023-05-29 18:47:27 +02:00
Alexei Dobrohotov
562461a659 Unify collision shape transformations 2023-03-10 00:12:12 +03:00
Alexei Dobrohotov
2277bdc1ae Improve btTriangleMesh abuse (bug #6027, part 2) 2023-03-08 06:13:32 +03:00
Alexei Kotov
7fd9b27b54 Don't combine static node collision geometry (bug #6027) 2023-03-01 00:41:04 +03:00
Alexei Kotov
c8430ee6c8 Clean up fillTriangleMesh for NiTriStrips 2023-02-09 20:24:05 +03:00
Alexei Kotov
434b4deda1 Don't use xkf if xnif is merely the base model (bug #5371) 2023-01-14 04:55:12 +03:00
elsid
843753da14
Remove unused includes 2022-10-09 16:44:18 +02:00
elsid
0688b6de40
Separate record list reading from its state
To make it possible to set record list state independently from reading NIF
file.
2022-09-24 19:10:35 +02:00
elsid
c338c1e5d3
Add Nif::FileView as read only interface for Nif::NIFFile
To make sure interface is scoped to what users require.
2022-09-24 19:10:21 +02:00
elsid
f2fb3d6de8
Separate NIFFileReader from NIFFile
NIFFile might not always be created from a file or stream containing NIF data.
Basically there are 2 different responsibilities for this class:
1. Read NIF file
2. Provide input for nifosg and bulletnifloader.

Remove no longer needed NIFFileMock since the state of NIFFfile can be
initialized independently from reading NIF file.
2022-09-24 19:10:14 +02:00
clang-format-bot
ddb0522bbf
Apply clang-format to code base 2022-09-22 21:35:26 +03:00
Project579
a13709c510 Replace implicit convertions from std::filesystem::path to std::string with correctly converting functions. 2022-09-11 14:41:20 +02:00
Project579
e5c417c968 Make sure all paths are passed as std::filesystem::path instead of std::string where possible. 2022-09-11 14:41:15 +02:00
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.
2022-08-25 00:56:03 +02:00
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.
2022-08-22 09:32:22 +02:00
elsid
f99ed6f1db
Split components/misc/stringops.hpp into multiple headers
Replace all ciEqual overloads with one having std::string_view as argument.
2022-08-03 22:06:24 +02:00
Petr Mikheev
8b8c304953 Treat empty RootCollisionNode in NIF as NCC flag and generate CameraOnly collision shape 2022-07-10 00:46:11 +02:00
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();
        ^~~~~~~~~~~~~~~~~~~~
2022-07-06 13:52:29 +02:00
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];
                       ^   ~~~~~~~~
2022-07-06 13:52:28 +02:00
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.
2022-07-05 01:41:28 +02:00
Alexei Kotov
e673f9fa76 Clean up NIF flags 2022-06-22 01:58:16 +03:00
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