Commit Graph

207 Commits (master)

Author SHA1 Message Date
Andrei Kortunov ec9a1b0d05 Handle RootCollisionNode, attached to non-root node (bug #4311) 6 years ago
elsid 3f21c49479
Put check for nif file name into separate function 7 years ago
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
7 years ago
uramer 5502790ed9 removed the unnecessary comment 7 years ago
uramer 86c25f5dba Removed NIF flag handling to replicate vanilla engine behaviour 7 years ago
scrawl 03554b2f4b Fix some style issues flagged by cppcheck 7 years ago
scrawl 54bb1b13cb Change NCO/NCC flags to NC* (Fixes #3915) 8 years ago
Ewan Higgs 38a2de3c51 convert std::autor_ptr to std::unique_ptr, originally by Ewan Higgs and updated by Bret Curtis 8 years ago
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
8 years ago
scrawl 6a37909ee7 Revert "Fix race conditions caused by Array <-> GLBufferObject interactions (Bug #3580)"
This reverts commit 115e563a7a.
8 years ago
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).
8 years ago
scrawl 4e5462bc19 Don't attempt to create a collision shape for an empty TriShape 9 years ago
scrawl eb92b853fe BulletNifLoader: preallocate the btTriangleMesh's vertices/indices 9 years ago
Arthur Moore 4c0c20b1a0 Changed relative includes to library header format 9 years ago
scrawl 8cf57ef6ac Move BulletShapeManager and BulletShape to resource/ 9 years ago
scrawl eb2f16d682 Support for loading .osg mesh format 9 years ago
scrawl b3f5ac5dbb Include cleanup 10 years ago
scrawl a7c5beb7c5 Remove redundant allocations for NIF meshes 10 years ago
scrawl 712cef36b0 Minor cleanup 10 years ago
scrawl cdc47fa874 Remove BulletNifLoader dependency on keyframe manager
This will make threaded loading easier.
10 years ago
scrawl fe439e53ff Bullet include cleanup 10 years ago
scrawl 82316105de BulletShapeManager kf loading fix 10 years ago
scrawl 65f0195c71 Readded animated collision shape support 10 years ago
scrawl 47758c11cd Readded collision objects and movement physics 10 years ago
scrawl c843cfc8e2 Physics stub in preparation for rewrite 10 years ago
scrawl 48ffeab191 Remove old BulletShapeManager 10 years ago
scrawl 604580d75d Move toMatrix to Nif::Node 10 years ago
scrawl e1f4a7f647 Merge branch 'master' of https://github.com/OpenMW/openmw into osg
Conflicts:
	apps/openmw/engine.cpp
	apps/openmw/mwgui/mainmenu.cpp
	apps/openmw/mwgui/windowmanagerimp.cpp
	apps/openmw/mwinput/inputmanagerimp.cpp
	apps/openmw/mwrender/animation.cpp
	apps/openmw/mwrender/debugging.cpp
	apps/openmw/mwrender/npcanimation.cpp
	apps/openmw/mwrender/renderingmanager.cpp
	apps/openmw/mwrender/sky.cpp
	components/nif/nifkey.hpp
	components/nif/nifstream.hpp
	components/nifbullet/bulletnifloader.cpp
	components/nifogre/ogrenifloader.hpp
	libs/openengine/bullet/physic.cpp
	libs/openengine/gui/manager.cpp
10 years ago
Marc Zinnschlag 83a7eea2a9 Merge remote-tracking branch 'scrawl/master' 10 years ago
scrawl d9d84bd7b2 Remove bullet raycasting shapes, to be replaced with OSG ray casts 10 years ago
Rohit Nirmal 997347b01e Silence -Wreorder warnings. 10 years ago
scrawl 7bc0d41bb0 Marker collision fix (Fixes #2461) 10 years ago
dteviot 407cd50890 fixed warning C4099:
type name first seen using 'class' now seen using 'struct'
10 years ago
scrawl 0ad514b29b Fix collision for nodes with MRK extra data (Fixes #2415) 10 years ago
scrawl d387c207d1 Fix initial scaling for btCompoundShape children (Fixes #2234) 10 years ago
scrawl f11ec653d0 Add setting for showing MRK nodes to NIF loaders
This makes marker objects show up in OpenCS.
10 years ago
scrawl 883f7ec7ce Move workaround for hiding markers from NIF loader to Scene 10 years ago
scrawl 41b3a9dba9 Rewrite animated collision shape support (Fixes #2123) 10 years ago
scrawl 04d6cead3b Autogenerated collision should only be disabled if RootCollisionNode is a child of the root node (Fixes #2133) 10 years ago
scrawl 5fa7536427 Fix incorrect box shape translation reset
Fixes incorrect placement of collision box for "azura spirit_trib"
10 years ago
scrawl 6b82e3665b Remove old nifbullet test 10 years ago
Rohit Nirmal b5eb16b663 Silence some scan-build warnings. 10 years ago
scrawl 2b407a9995 Refactor NIF cache
- Remove broken cache locking mechanism

This was supposed to unload NIFFiles after a cell transition completes, but it was never working due to a mistake on the line if (--sLockLevel), should have been if (--sLockLevel == 0). Repairing this would increase load times (NIF files would have to be reloaded more frequently), so just removed it for now.

 - Decouple cache from NIFFile (now a new nifcache component)

 - Add API for future background loading

 - Provide a reliable way (SharedPtr) to hold on to loaded NIFFiles. This will be useful to avoid deep copies of keyframe and text key data, which is currently a performance bottleneck.
10 years ago
scrawl 1ab02d8072 Fix exception for box shapes (Fixes #1580) 11 years ago
scrawl 2bcbc6ab7d Potential crash fix, either way should have a better error message now 11 years ago
scrawl 0b34d8d2fd Add support for animated collision shapes (Fixes #1549) 11 years ago
scrawl 0bed6d9d56 Physics: Recognize BBoxCollision flag, but don't use it for raycasting (Fixes #1349) 11 years ago
scrawl e002acdeae Physics: Create actor shapes outside of BulletNifLoader
This will allow to create a specialised shape instead, such as a capsule, which tends to work better for character controllers.
11 years ago
scrawl 0a8c61a7fe Bug #1107: Reverted previous fix, which caused problems with some actors not using a box shape as expected. Instead, do not create a bounding box collision shape for hidden nodes. 11 years ago
scrawl 79a6ffd216 Closes #1107: Do not create box shapes unless the box collision flag is enabled 11 years ago
scrawl 7dc30a01cd Some changes suggested by cppcheck 12 years ago
Chris Robinson 4cedf0fbab Avoid colliding with AvoidNodes
These are placed under the RootCollisionNode hierarchy, but the shapes they
hold aren't collided with. Their exact function is unknown, but seems to be
related to lava? Maybe damage avoidance info for the AI.
12 years ago
Chris Robinson 36170c5374 Use flag enums instead of hard-coded hex values 12 years ago
Chris Robinson ebcb4c66c3 Properly read and use the NIF root record list 12 years ago
scrawl e30af28860 Markers should still have collision if they have a NiRootCollisionNode 12 years ago
scrawl 84afd87321 Placeable objects should not collide unless they have a NiRootCollisionNode 12 years ago
scrawl 14964e9fcd Only build a box shape for collision nodes; use StringUtils 12 years ago
scrawl d7c4a622cf Create a separate rigid body / shape with full details for raycasting, remove the occlusion query hack 12 years ago
Nathan Jeffords 109dff2d29 renamed high level NIF files... 12 years ago
Nathan Jeffords d3c1f5e7b2 renamed low-level NIF related files and include guards to conform to naming convention 12 years ago
Chris Robinson 5f2c897001 Better handle which collision shapes to load 12 years ago
scrawl f4749f10da NIF bullet loader fix for incorrect collision shapes (credit goes to Chris, he asked me to push this) 12 years ago
Nathan Jeffords d5ebd6654d cache loaded NIF files to eliminate reloads
Created a NIF file caching mechanism to prevent the system from
reloading a NIF during a startup and cell changes.
12 years ago
Nathan Jeffords 0989b44b41 spread some const around NIF loading 12 years ago
Nathan Jeffords 9d4f8c6722 changed bullet_nif_loader to not modifiy NIF file
The code in bullet_nif_loader was modifing the loaded NIF file as part of
processing. Currently this is OK since the NIF file will be thrown away
immediately, but it causes problems when trying to share loaded NIF files.
12 years ago
scrawl 00a2de432a fix BulletShapeLoader namespace 12 years ago
scrawl 4ca0eb93ee fix markers used for raycasting and blocking activation 12 years ago
scrawl bf3aad8be0 handle NCC flag 12 years ago
Marc Zinnschlag 4abb9a00da Merge remote-tracking branch 'jhooks/physicsaedra3' into next 12 years ago
scrawl b5ddc8d4fb Fix the marker collision; also, nodes marked with NCO are now correctly ignored for collision. 12 years ago
scrawl 906d290935 Markers are actually hidden now. Inspecting the markers in NifSkope revealed why it didn't work previously: the flag that is being looked for is not present in any of the markers, nor any other flag or extra data to identify them. However, the root node name always starts with "marker", making it possible to do a string search. 12 years ago
Jason Hooks c5b25ef70b Very basic actor physics (no set scale/rotate functions) 12 years ago
Jason Hooks 8762f4a47a boxrotation nif field; commented functions 13 years ago
Jason Hooks 1f5bc229e0 Separate adjustRigidBody function 13 years ago
Jason Hooks e7329d5f8b Creatures now have a properly positioned box shape 13 years ago
Jason Hooks 083e3537b4 post merge 13 years ago
Jason Hooks cacf0bd10d Basic collision with npcs 13 years ago
Chris Robinson 6047dc6a0c Merge remote branch 'zini/master' into nif-cleanup
Conflicts:
	apps/openmw/mwrender/animation.cpp
	apps/openmw/mwrender/animation.hpp
	apps/openmw/mwrender/creatureanimation.cpp
	apps/openmw/mwrender/npcanimation.cpp
	apps/openmw/mwrender/npcanimation.hpp
	components/nifogre/ogre_nif_loader.hpp
13 years ago
guidoj a021165d9f Changed standard C lib includes to C++ format 13 years ago
guidoj 0549e949ba Mostly removal of unnecessary #include's and a little clean up 13 years ago
Chris Robinson 9436ca4b0c Use vectors for ShapeData properties 13 years ago
Chris Robinson 386ac56bda Remove the NIF loader and code to manually transform the vertices
This currently breaks just about everything. They should come back as it's all
reimplemented, though.
13 years ago
Chris Robinson 86b37c6c11 Move the velocity out of the transformation object 13 years ago
Chris Robinson 645b507ba0 Return a reference to the RecordPtr from operator[] for consistency
RecordListT is supposed to be a list of RecordPtrT objects.
13 years ago
Chris Robinson 348b5fa207 Merge remote branch 'zini/master' into nif-cleanup
Conflicts:
	components/nifbullet/bullet_nif_loader.cpp
13 years ago
Marc Zinnschlag f11bf49a90 cmake fix; silenced some warnings 13 years ago
Chris Robinson ca37706b34 Use Ogre types for Matrix and Vector objects 13 years ago
Chris Robinson b3aa453f9a Use Ogre data streams for loading NIFs 13 years ago
Chris Robinson 0143cacd2b Avoid returning pointers from NIFFile 13 years ago
Chris Robinson d3a31a24ce Use proper strings and vectors instead of slice arrays for NIF files
Slice arrays use pre-allocated pointers whose memory is managed externally. This is
unnecessary and ultimately detrimental since it prevents any kind of data fixup
(e.g. little endian to big endian, p[adding handling), and it also makes it difficult
to use Ogre data streams.
13 years ago
Jason Hooks 595b0729da Few things changed 13 years ago
Jason Hooks fb0a52809d Changing transformation processing 13 years ago
Jason Hooks 4ff36a9018 Bullet loader trafos changed to match NIFLoader 13 years ago
gugus 6f87493df6 fix collision bug i think. It disable collision for quiet a lot of objects (maybe a little to much) 13 years ago
Lukasz Gromanowski d3b88b9e34 Issue #225: Added cleanup of allocated memory in BulletNifLoader and BulletShapeLoader. 13 years ago
gugus 241cf2555d Fixe collision shape bug. 13 years ago
gugus 1bf7c4e53d Improve bullet performances 14 years ago
Lukasz Gromanowski 2ddd5dba11 Mantis: #18 - Move components from global namespace into their own namespace.
Moving classes from components/nifbullet into NifBullet namespace.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
14 years ago
Jan-Peter Nilsson a94de76801 Whitespace changes only tabs->spaces and removal of traling space (including mangle and openengline) 14 years ago
gugus 3ad2b9986e fix actors not beeing deleted. Need the latest OEngine. 14 years ago
gugus b2194398a4 fixed a bug in loading. Every collision mesh is correctly loaded now. 14 years ago
gugus 9d4cda6510 OEngine doesn't rely on OpenMW anymore 14 years ago
Jan-Peter Nilsson 26b780d1ac Remove unused variables and fix signed/unsigned comparison to make the compiler happy 14 years ago
Marc Zinnschlag 1e9dc4b435 de-Windownizing and some build-fixes 14 years ago
gugus 86ded891d9 modified the nif loader for shapes used for raycasting only. 14 years ago
gugus d3c1640723 add physic support 14 years ago
gugus a8ade56c80 Add a bullet Shape Loader 14 years ago