1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 23:19:56 +00:00
Commit graph

287 commits

Author SHA1 Message Date
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.
2018-04-18 12:36:10 +00:00
Andrei Kortunov
53ef345680 Update magic effect particles after building new animation (bug #2254) 2018-03-19 10:43:22 +04:00
scrawl
8c0790580a Add screen fading for exterior cell transitions 2017-10-05 18:41:02 +02:00
MiroslavR
d24286273b Prevent respawned references from being added to the scene twice in certain cases (Fixes #3864) 2017-08-01 00:11:14 +02:00
scrawl
20606a2aff Add 'prediction time' setting for cell/terrain pre-loading 2017-07-19 16:44:37 +02:00
scrawl
534c81976c Add missing cell update for physics system (Fixes #3917) 2017-06-25 12:47:57 +02:00
Allofich
f299f26720 Remove unused variable 2017-04-20 01:22:33 +09:00
scrawl
c22fde2bcd Preload terrain while reading savegame 2017-03-14 19:27:56 +01:00
scrawl
59bf100907 Fill exteriorPositions in preloadFastTravel 2017-03-14 19:27:56 +01:00
scrawl
03c07d3bd5 Remove old code 2017-03-14 19:27:56 +01:00
scrawl
86e75f0987 Preload terrain even when cell preloading is disabled 2017-03-14 19:27:56 +01:00
scrawl
4549196b31 Use the new way of terrain preloading in CellPreloader/Scene 2017-03-14 19:27:56 +01:00
scrawl
4dbd224249 Hide the terrain in non-exterior cells 2017-03-14 19:27:56 +01:00
scrawl
0fc465da59 Store the min/max height in LandData 2017-03-14 19:27:55 +01:00
scrawl
9a3a64f0c4 Add resource manager for ESM::Land to allow data to be unloaded when no longer required 2017-03-14 19:27:55 +01:00
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.
2017-03-04 21:48:31 +01:00
scrawl
7e02bb7348 Preload summoned creature models before the spell is cast 2017-02-20 19:58:00 +01:00
scrawl
22482b7eec Don't use xmesh.nif over mesh.nif for classes that don't make use of the separated keyframes 2017-02-20 19:04:02 +01:00
scrawl
57b585570a Preload magic effect visuals of the player's selected weapon/spell 2017-02-15 21:01:25 +01:00
scrawl
325bf66653 Return const Land in ESMStore 2017-02-14 07:58:16 +01:00
scrawl
3f3d00ffc9 Add CellPreloader::clear to avoid potential dangling CellStore pointer and to more aggressively clear preload state from a previous game 2017-02-09 04:03:38 +01:00
scrawl
c68f662c9a Predict player movement when preloading cells to better handle moving at high speed 2017-02-09 01:34:42 +01:00
scrawl
1447bfa215 Improve scene loading performance by creating collision objects with the correct rotation right away instead of adjusting it later 2017-02-04 15:12:01 +01:00
scrawl
eaeba4138b Move the deletion of PreloadItem to the worker thread 2017-02-04 02:36:44 +01:00
scrawl
cf62d860b2 Fix the adjustPlayerPos parameter not being respected in all cases 2016-03-30 01:54:03 +02:00
scrawl
e1dda9675d Add "preload instances" setting, disabling this may help if you are low on memory. 2016-03-30 00:13:37 +02:00
scrawl
5cda89c15d Don't attempt to preload more exterior cells than the cache can hold (Bug #3273) 2016-03-29 00:50:30 +02:00
scrawl
4ac276b06c Update the resource cache every frame (Bug #3273)
Not much of a point in limiting this to cell loadings, since the update is done from a background thread and should be fairly cheap anyway if there's nothing to unload.
2016-03-29 00:50:13 +02:00
scrawl
5bd8ef247d Do not adjust the player position when loading a savegame (Fixes #2089) 2016-03-24 17:18:08 +01:00
scrawl
27577ce765 Add ESM::Land::DEFAULT_HEIGHT 2016-02-28 16:49:18 +01:00
scrawl
fc3de3302e Create a collision shape for the default terrain 2016-02-28 16:47:41 +01:00
scrawl
c3ef387208 Vanilla-compatible creature/NPC respawning (Fixes #2369, Fixes #2467) 2016-02-27 12:53:07 +01:00
scrawl
6fb0022b35 Update preloading settings
Disable 'preload fast travel' by default.

Add 'min cache size' and 'max cache size' settings.

Split the 'cache expiry delay' into 'preload cell expiry delay' and 'cache expiry delay'.
2016-02-18 17:47:10 +01:00
scrawl
9f729667fb Remove debug output 2016-02-09 21:16:11 +01:00
scrawl
0865cea211 Preload terrain 2016-02-09 21:16:11 +01:00
scrawl
1457a0de78 Use the UnrefQueue to delete BulletShapeInstances 2016-02-09 19:04:59 +01:00
scrawl
e28dc3e72f Preload instances in SceneManager 2016-02-09 18:35:26 +01:00
scrawl
f6f9eff9a6 Preload levelled creatures 2016-02-09 03:06:00 +01:00
scrawl
6806741d9b Add settings for disabling the individual preloading types 2016-02-09 01:58:33 +01:00
scrawl
10a3e270a3 Preload fast travel destinations 2016-02-09 01:52:02 +01:00
scrawl
f9082502f8 Move construction of WorkQueue to RenderingManager 2016-02-09 01:02:40 +01:00
scrawl
c8054424c9 Preload items equipped by NPCs 2016-02-07 22:37:52 +01:00
scrawl
a81b10b415 Make the cache expiryDelay configurable 2016-02-07 19:05:55 +01:00
scrawl
5efaa9817c Add preloading settings 2016-02-07 18:01:14 +01:00
scrawl
610257cd3a Preload the exterior cell grid 2016-02-07 07:37:56 -08:00
scrawl
8592166eeb Preload surrounding cells when preloading an exterior cell destination 2016-02-07 05:27:19 -08:00
scrawl
023c87b215 Preload cell when the player goes near a teleport door. It works! 2016-02-07 05:13:46 -08:00
scrawl
d855a13b44 Clear the resource cache from the worker thread 2016-02-07 00:36:31 +01:00
scrawl
6ef848b7c5 Remove TextureManager::getTexture2D
Instead use getImage and let the caller create the Texture. Sharing of textures is then handled in post by the SharedStateManager.

This is closer to what the OSG serializer does.

Streamlines the TextureManager and will make it easier to multithread.
2016-02-05 23:01:11 +01:00
scrawl
c9a67ab423 Do not add scripts from levelled creatures twice (Bug #2806)
Do not insert objects from within a CellStore visitor
2016-02-05 18:29:33 +01:00