Commit Graph

246 Commits (0.7.0)

Author SHA1 Message Date
Capostrophic 85208eff7f Revert untextured shapes rendering changes 6 years ago
Capostrophic bda23c6ad6 Fix nodemask 6 years ago
Capostrophic a1e3b2e586 Don't render NiTriShapes without NiTexturingProperty (bug #4483) 6 years ago
Andrei Kortunov 469bb29621 Do not try to handle shape controllers as node controllers 7 years ago
Andrei Kortunov 7e0df01c83 Do not optimize animated shapes (bug #3950) 7 years ago
Andrei Kortunov 2fada94879 Improve MRK NiStringExtraData handling (bug #4419) 7 years ago
tri4ng1e d4d1703bcf
Some PVS-Studio and cppcheck fixes
cppcheck:
[apps/esmtool/record.cpp:697]: (performance) Prefer prefix ++/-- operators for non-primitive types.
[apps/esmtool/record.cpp:1126]: (performance) Prefer prefix ++/-- operators for non-primitive types.
[apps/esmtool/record.cpp:1138]: (performance) Prefer prefix ++/-- operators for non-primitive types.
[apps/niftest/niftest.cpp:36]: (performance) Function parameter 'filename' should be passed by reference.
[apps/niftest/niftest.cpp:41]: (performance) Function parameter 'filename' should be passed by reference.
[apps/opencs/model/prefs/boolsetting.cpp:25]: (warning) Possible leak in public function. The pointer 'mWidget' is not deallocated before it is allocated.
[apps/opencs/model/prefs/shortcuteventhandler.cpp:52]: (warning) Return value of std::remove() ignored. Elements remain in container.
[apps/openmw/mwstate/quicksavemanager.cpp:5]: (performance) Variable 'mSaveName' is assigned in constructor body. Consider performing initialization in initialization list.

PVS-Studio:
apps/opencs/model/filter/parser.cpp  582  warn  V560 A part of conditional expression is always true: allowPredefined.
apps/opencs/view/world/referencecreator.cpp  67  warn  V547 Expression '!errors.empty()' is always false.
apps/opencs/view/world/referencecreator.cpp  74  warn  V547 Expression '!errors.empty()' is always false.
apps/opencs/view/doc/loader.cpp  170  warn  V560 A part of conditional expression is always true: !completed.
apps/opencs/view/doc/loader.cpp  170  warn  V560 A part of conditional expression is always true: !error.empty().
apps/opencs/model/tools/pathgridcheck.cpp  32  err  V517 The use of 'if (A) {...} else if (A) {...}' pattern was detected. There is a probability of logical error presence. Check lines: 32, 34.
apps/opencs/model/world/refidadapterimp.cpp  1376  err  V547 Expression 'subColIndex < 3' is always true.

apps/openmw/mwgui/widgets.hpp  318  warn  V703 It is odd that the 'mEnableRepeat' field in derived class 'MWScrollBar' overwrites field in base class 'ScrollBar'. Check lines: widgets.hpp:318, MyGUI_ScrollBar.h:179.
apps/openmw/mwgui/widgets.hpp  319  warn  V703 It is odd that the 'mRepeatTriggerTime' field in derived class 'MWScrollBar' overwrites field in base class 'ScrollBar'. Check lines: widgets.hpp:319, MyGUI_ScrollBar.h:180.
apps/openmw/mwgui/widgets.hpp  320  warn  V703 It is odd that the 'mRepeatStepTime' field in derived class 'MWScrollBar' overwrites field in base class 'ScrollBar'. Check lines: widgets.hpp:320, MyGUI_ScrollBar.h:181
apps/openmw/mwmechanics/actors.cpp  1425  warn  V547 Expression '!detected' is always true.
apps/openmw/mwmechanics/character.cpp  2155  err  V547 Expression 'mode == 0' is always true.
apps/openmw/mwmechanics/character.cpp  1192  warn  V592 The expression was enclosed by parentheses twice: ((expression)). One pair of parentheses is unnecessary or misprint is present.
apps/openmw/mwmechanics/character.cpp  521  warn  V560 A part of conditional expression is always true: (idle == mIdleState).
apps/openmw/mwmechanics/pathfinding.cpp  317  err  V547 Expression 'mPath.size() >= 2' is always true.
apps/openmw/mwscript/interpretercontext.cpp  409  warn  V560 A part of conditional expression is always false: rank > 9.
apps/openmw/mwgui/windowbase.cpp  28  warn  V560 A part of conditional expression is always true: !visible.
apps/openmw/mwgui/journalwindow.cpp  561  warn  V547 Expression '!mAllQuests' is always false.
apps/openmw/mwgui/referenceinterface.cpp  18  warn  V571 Recurring check. The '!mPtr.isEmpty()' condition was already verified in line 16.
apps/openmw/mwworld/scene.cpp  463  warn  V547 Expression 'adjustPlayerPos' is always true.
apps/openmw/mwworld/worldimp.cpp  409  err  V766 An item with the same key '"sCompanionShare"' has already been added.
apps/openmw/mwworld/cellstore.cpp  691  warn  V519 The 'state.mWaterLevel' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 689, 691.
apps/openmw/mwworld/weather.cpp  1125  warn  V519 The 'mResult.mParticleEffect' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1123, 1125.
apps/openmw/mwworld/weather.cpp  1137  warn  V519 The 'mResult.mParticleEffect' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 1135, 1137.

apps/wizard/unshield/unshieldworker.cpp  475  warn  V728 An excessive check can be simplified. The '(A && B) || (!A && !B)' expression is equivalent to the 'bool(A) == bool(B)' expression.
apps/wizard/installationpage.cpp  163  warn  V735 Possibly an incorrect HTML. The "</p" closing tag was encountered, while the "</span" tag was expected.

components/fontloader/fontloader.cpp  427  err  V547 Expression 'i == 1' is always true.
components/nifosg/nifloader.cpp  282  warn  V519 The 'created' variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 278, 282.
components/esm/loadregn.cpp  119  err  V586 The 'clear' function is called twice for deallocation of the same resource. Check lines: 112, 119.
components/esm/cellref.cpp  178  warn  V581 The conditional expressions of the 'if' statements situated alongside each other are identical. Check lines: 175, 178.
components/esmterrain/storage.cpp  235  warn  V560 A part of conditional expression is always true: colStart == 0.
components/esmterrain/storage.cpp  237  warn  V560 A part of conditional expression is always true: rowStart == 0.
7 years ago
scrawl c920f95d1e
Don't incorrectly discard root node transformation (Fixes #4272) 7 years ago
scrawl 03554b2f4b Fix some style issues flagged by cppcheck 7 years ago
scrawl 5d524a6a10 Add custom version of MorphGeometry replacing osgAnimation
Double buffering, custom bounding box and the update in the cull visitor (instead of update) are now all handled internally rather than needing hacks and/or callbacks.
7 years ago
scrawl 209e139aa8 Move double buffering implementation inside RigGeometry
The double buffering is an implementation detail so it should be handled as such, rather than mandating the scene graph to be structured in a certain way.

Override accept(NodeVisitor&) instead of using callbacks.
7 years ago
scrawl 45f7563a55 Revert "Revert "Check for a Geometry node when attaching bodyparts""
Issue with shaders has been fixed with b9931fb71c

This reverts commit a1e3fb7604.
7 years ago
scrawl a1e3fb7604 Revert "Check for a Geometry node when attaching bodyparts"
This reverts commit 3fc8634206.
7 years ago
scrawl 3fc8634206 Check for a Geometry node when attaching bodyparts (Fixes #3957) 7 years ago
scrawl bc82c6a35d Use white color if told to use nonexisting vertexcolors (Fixes #3833) 7 years ago
scrawl 5d2fe5e887 Implement lightmode/vertmode of NiVertexColorProperty 7 years ago
scrawl 40dc1dd6f5 Fix checking a variable before it's assigned (Bug #3950) 8 years ago
Bret Curtis d785344fad purge all instances of <boost/shared_ptr.hpp>, clean up unused headers 8 years ago
Bret Curtis 07f75e1104 replace boost::shared_ptr in extern and components 8 years ago
scrawl 45d9e38616 Fix check for default material 8 years ago
Allofich ff3e307059 Pass parameters by const reference 8 years ago
scrawl 29556a1802 More consistent wording of errors/warnings
A Warning indicates a potential problem in the content file(s) that the user told OpenMW to load. E.g. this might cause an object to not display at all or as intended, however the rest of the game will run fine.

An Error, however, is more likely to be a bug with the engine itself - it means that basic assumptions have been violated and the engine might not run correctly anymore.

The above mostly applies to errors/warnings during game-play; startup issues are handled differently: when a file is completely invalid/corrupted to the point that the engine can not start, that might cause messages that are worded as Error due to the severity of the issue but are not necessarily the engine's fault.

Hopefully, being a little more consistent here will alleviate confusion among users as to when a log message should be reported and to whom.
8 years ago
scrawl 1402e0b872 Don't optimize billboard nodes (Fixes #3774) 8 years ago
scrawl 9b27ec4945 Remove redundant and ambiguous NiNode::makeBone()
Ambiguous because a skeleton can have multiple skinned meshes, with their own bone weights/bind matrix each.
8 years ago
scrawl aba3c471a9 nifloader: fix setting of dataVariance for non-controlled bones and refactor the code 8 years ago
scrawl 4e5a1e6123 nifloader: improve setting of DataVariance 8 years ago
scrawl 6e996bf2a3 Create TriShapes with an identity transform as a Group 8 years ago
scrawl 6e5d9efa93 Remove NifLoader::optimize, to be replaced with something better 8 years ago
scrawl c45013c983 Fix particle systems not being rendered in their first frame 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 892d1b162d nifloader: ignore nodes named 'bounding box' (Fixes #3650) 8 years ago
scrawl 4d53ab6c32 nifloader: attempt to remove redundant root node when a Skeleton is added 8 years ago
scrawl 2a42c4781e nifloader: override animflags instead of accumulating them 8 years ago
scrawl 0187f2ce4c nifloader: combine animFlags and particleFlags (Bug #2100) 8 years ago
scrawl bccfd6cef8 nifloader: handle textures with no image that are later assigned in a FlipController
As found in vurt's trees (Bug #2100)
8 years ago
scrawl 33e654f94d Add explicit handling of most commonly used nodes to NodeVisitors to avoid excessive virtual function calls 8 years ago
scrawl f3045331f1 Fix regression in handling of NiZBufferProperty 8 years ago
scrawl 851f61ac82 Always assign osg::Material when a material controller is used 8 years ago
scrawl 9180089a3b Add sharing for more State Attributes, most notably BlendFunc and AlphaFunc, to improve the state tracking in osg::State and reduce the number of GL calls 8 years ago
scrawl 960d4a96c3 Reduce the number of osg::Material state by setting the default state on the graph root 8 years ago
scrawl e399e10607 Add missing lock in shareMaterial 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 aafff1deb6 Fix memory leak 8 years ago
MiroslavR 99bcf47167 Implement NiSphericalCollider (Closes #3644) 8 years ago
Allofich 6ec37b5cfb Fix shadowing warnings 8 years ago
scrawl cd4b182091 Merge pull request #1051 from Allofich/textures
Use spell effect particle textures
8 years ago
Allofich a8e9f2df67 Cleanup 8 years ago
Allofich be96ff1fd1 Remove redundant parameter 8 years ago
scrawl 8f5347b79b Update comment, osgAnimation::RigGeometry is no longer used 8 years ago