Commit Graph

82 Commits

Author SHA1 Message Date
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
elsid 2599aba196
Fix check whether file name starts with x or X
If path doens't contains / or \, then slashpos will be 0.
Therefore slashpos + 1 = 1 doesn't point to first symbol.

xmesh.nif
 ^
 slashpos + 1
2018-07-10 23:46:06 +03:00
uramer 5502790ed9 removed the unnecessary comment 2018-02-09 16:34:55 +01:00
uramer 86c25f5dba Removed NIF flag handling to replicate vanilla engine behaviour 2018-02-09 01:53:52 +01:00
scrawl 03554b2f4b Fix some style issues flagged by cppcheck 2017-10-15 17:06:58 +02:00
scrawl 54bb1b13cb Change NCO/NCC flags to NC* (Fixes #3915) 2017-06-20 00:36:17 +02:00
Ewan Higgs 38a2de3c51 convert std::autor_ptr to std::unique_ptr, originally by Ewan Higgs and updated by Bret Curtis 2017-06-09 16:49:25 +02:00
scrawl aa8459b5c7 Revert "Remove redundant allocations for NIF meshes"
This reverts commit a7c5beb7c5.

Conflicts:
	components/nif/data.cpp
	components/nifbullet/bulletnifloader.cpp
	components/nifosg/nifloader.cpp
2017-02-18 02:33:41 +01:00
scrawl 6a37909ee7 Revert "Fix race conditions caused by Array <-> GLBufferObject interactions (Bug #3580)"
This reverts commit 115e563a7a.
2017-02-18 02:33:41 +01:00
scrawl 115e563a7a Fix race conditions caused by Array <-> GLBufferObject interactions (Bug #3580)
The first part of the fix is to assign VBO/EBO's upon loading the array in the Nif reader. This avoids triggering the 'addVertexBufferObjectIfRequired' code path in osg::Geometry which has the race condition when two threads add the same Array at the same time. Essentially, we want the Arrays to be 'const' when they come out of the Nif reader.

The second part of the fix is to make sure not to create empty arrays in the Nif reader (importantly, not assigning a VBO to the empty array). This empty array would be deleted when the NIFFile is cleaned up, and the detachment of the VBO assigned to it (which is still in use by other arrays) would cause threading issues.

This rare crash bug was first introduced with commit a7c5beb7c5. When using OSG dev version 3.5 the crashes were a little more prevalent, because 'addVertexBufferObjectIfRequired' in osg::Geometry is now used even when VBO's are disabled (as part of the VAO support changes).
2017-01-19 22:23:41 +01:00
scrawl 4e5462bc19 Don't attempt to create a collision shape for an empty TriShape 2016-02-19 14:23:55 +01:00
scrawl eb92b853fe BulletNifLoader: preallocate the btTriangleMesh's vertices/indices 2015-12-10 00:05:35 +01:00
Arthur Moore 4c0c20b1a0 Changed relative includes to library header format 2015-11-27 21:01:28 -05:00
scrawl 8cf57ef6ac Move BulletShapeManager and BulletShape to resource/ 2015-11-17 00:20:15 +01:00
scrawl b3f5ac5dbb Include cleanup 2015-07-25 02:11:49 +02:00
scrawl a7c5beb7c5 Remove redundant allocations for NIF meshes 2015-06-18 01:26:45 +02:00