Commit Graph

156 Commits (520e65f82205480a6286d6c51129c0715ec13149)

Author SHA1 Message Date
scrawl 99ffaafe30
Revert "Merge pull request #1701 from akortunov/standfix"
This reverts commit da47fc79f5, reversing
changes made to 7324bd368f.
7 years ago
Bret Curtis da47fc79f5
Merge pull request #1701 from akortunov/standfix
Do not apply queue movement for standing actors
7 years ago
Marc Zinnschlag 53b6ef6f8c minor code cleanup 7 years ago
Andrei Kortunov 3636cf2015 Do not apply queue movement for standing actors 7 years ago
tri4ng1e d310d36ea3
[Fix] Some PVS-Studio and cppcheck fixes 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
Daniel Vukelich 3bdd989a50 Remove numeric quicksave slot IDs
When multiple quicksaves occurred in quick succession, the numeric order
of the saves could not be guaranteed.  To prevent players from getting
confused as to why their saves appear out of order, don't number them.
7 years ago
Daniel Vukelich 3af8f63895 Use unsigned integer types for QuickSave indices 7 years ago
Daniel Vukelich f09fd6795c Follow openmw style guide 7 years ago
Daniel Vukelich 97924d97c7 Add the option for multiple quicksave slots
With more than 1 quicksave slot, slots will be created each time you
quicksave until the maximum number (configured in settings) of
quicksaves has been reached.  After that, the oldest quicksave slot will
be replaced each time you quicksave.  Saves are numbered sequentially,
unless the maximum number of slots is 1, in which case it is not numbered.
7 years ago
Andrei Kortunov 337f0f876d Fade screen in on a new game start 8 years ago
Allofich 42402976e3 Fixes for building in MSVC 8 years ago
Bret Curtis c781d1f8ed purge unnecessary imports
add fstream back

add fstream back

add fstream back

add fstream back

add fstream back

add fstream back

add fstream back
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
MiroslavR 301dd77efb Save controls state (Fixes #3598) 8 years ago
MiroslavR b65f379b7f Save scripted animation state (Fixes #1931, #2150, #3393) 9 years ago
Roman Proskuryakov d5dfa89060 Rewrite NAME_T into FIXED_STRING. 9 years ago
scrawl d784a77f4c Set the default player cell in the StateManager (Fixes #3269) 9 years ago
scrawl 5bd8ef247d Do not adjust the player position when loading a savegame (Fixes #2089) 9 years ago
scrawl 50acdf3e47 Move createCharacter inside the try block 9 years ago
scrawl a0cc9de088 Make the creation of save file directories even more explicit 9 years ago
scrawl b7b7c0612d Make getCurrentCharacter create argument explicit 9 years ago
scrawl 7463c0c353 Addition to last commit, don't create a save directory on death 9 years ago
scrawl 426a6fdcc2 Don't create the save directory on loading a game
This prevents empty directories being created when loading a save file outside of the saves directory with the --load-savegame switch.
9 years ago
scrawl c3ef387208 Vanilla-compatible creature/NPC respawning (Fixes #2369, Fixes #2467) 9 years ago
scrawl 7a2ca5580a Accept a ConstPtr in RippleSimulation 9 years ago
scrawl d5a2586f38 LoadingScreen: add support for important labels
Used in saveGame so the player can be sure whether or not the game was saved.

Fixes #3074
9 years ago
scrawl 66bcd2fd68 Write save games to a memory stream first
Two motivations for doing this:

- If the user chooses to overwrite existing save file, and there is an exception during the save process, the existing file will not be lost.
- Many small writes to a file are slow. Very slow. Writing to memory first then writing the completed file to disk appears to be ~500% faster.
9 years ago
scrawl fbee32729a Cache CellId
ESM::Cell::getCellId() was allocating a string on every call. This caused functions dealing with cellIds to be unnecessarily expensive.

For example, World::moveObject spent almost as much time comparing CellIds as it did updating Bullet's AABB after the move. OpGetDistance was by far the most expensive script instruction because it has to compare cellIds.

The total cost of getCellId() relative to the frame loop was about 0.3%.
9 years ago
Marc Zinnschlag a52b947efe Merge remote-tracking branch 'dteviot/MagicEffectsRefactorDraft3' 9 years ago
dteviot 77a1d947cc extracted MWMechanics::getPlayer() 9 years ago
scrawl af3b0cd883 Improve some error messages 9 years ago
scrawl 67bd6cd708 Remove empty line at the beginning of files
git ls-files -z | xargs -0 sed -i '1{/^$/d}'
10 years ago
Alexander "Ace" Olofsson b3b55a5842 Explicitly instantiate MWWorld::Store 10 years ago
scrawl 20d03c7e39 Refuse loading save games of unknown format 10 years ago
scrawl a081d402c5 Use the format field instead of version field 10 years ago
scrawl 4eaaa5e855 Increment save file version and mark it as used, will be used in next commit 10 years ago
scrawl 07937c741a Improve exception handling when starting a new game from the main menu 10 years ago
scrawl 2a85a22dba Write savegame screenshot 10 years ago
scrawl c811ac6afe Port fog of war
Not optimized yet, need to work on fog texture's DataVariance.
10 years ago
scrawl bea88c3643 Stolen item tracking overhaul part 2 (Fixes #2338) 10 years ago
scrawl 0c6e2170db Include cleanup 10 years ago
scrawl 8b5effe3e0 Fix wrong magic number for JOUR in openmw savegames 10 years ago
scrawl 714b19015c Fix unknown record error message 10 years ago
scrawl 82eaa9f1bc Fix loading crash (don't apply viewmode before player is set up) (Fixes #2272) 10 years ago
scrawl c3f3f8b3d0 Use only Cell records for saving progress bar (Fixes #2259) 10 years ago
scrawl 0ec018f7f1 More accurate savegame loading progress bar, uses position in the file (Bug #2259) 10 years ago
scrawl 716e14a37a Print missing savegame dependencies on the console 10 years ago
scrawl f9227beedd Add warning when loading a savegame that depends on non-existing content files (Fixes #2261) 10 years ago
scrawl 579f5d232f Move interactive messageBox to separate function 10 years ago