Commit Graph

203 Commits (master)

Author SHA1 Message Date
elsid ed89126828
Fix warning implicit conversion changes singedness 6 years ago
Andrei Kortunov e06f0b797a Replace all NULLs to nullptr 6 years ago
Andrei Kortunov 8af021d729 Restore dynamic stats for actors in inactive cells (bug #1875) 6 years ago
Capostrophic 7ef6fa9f61 Remove deprecated GMST get* functions 6 years ago
Andrei Kortunov 5a4d0cec3a Use new logging system for game itself 6 years ago
David Cernat d5d3c0937f [Client] Adjust log level for actor transfers in CellStore 7 years ago
David Cernat 09da24f1ea [General] Rename all instances of refNumIndex into refNum
This creates symmetry with mpNum and should cause less confusion in the future.
7 years ago
David Cernat a236ffc4be Merge pull request #456 from OpenMW/master while resolving conflicts
# Conflicts:
#	.travis.yml
#	README.md
#	apps/openmw/mwgui/quickkeysmenu.cpp
#	apps/openmw/mwmechanics/actors.cpp
#	apps/openmw/mwmechanics/combat.cpp
7 years ago
Andrei Kortunov 977a27ecb7 Do not clear corpses until end of death animation (bug #4307) 7 years ago
David Cernat 9e5ddeac50
Merge pull request #408 from OpenMW/master
Add OpenMW commits up to 18 Apr 2018
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
David Cernat 22521578eb
Merge pull request #349 from OpenMW/master
Add OpenMW commits up to 28 Nov 2017
7 years ago
scrawl c50b18b3bb
Move PathgridGraph out of CellStore
By definition this is not 'Mutable state of a cell' and does not belong in CellStore.

This change should improve startup times (graph is now loaded on demand) and edits to 'pathgrid.hpp' no longer cause the entirety of OpenMW to be rebuilt.
7 years ago
Andrei Kortunov 9943bd4d74 AiWander fast forwarding improvements (bug #3638) 7 years ago
David Cernat f6d36d5d80 [Client] Ensure that objects searched for have a valid reference number 7 years ago
Koncord aa1f5c3cd3 [Client] Change pointer type to reference 8 years ago
David Cernat 75a60a4700 [Client] Update debug in CellStore 8 years ago
David Cernat 7177d56cfb [Client] Only require refNumIndex & mpNum for CellStore::searchExact() 8 years ago
David Cernat bdc8b7f863 [Client] Send level creatures in ObjectPlace reply to ActorList request 8 years ago
David Cernat 8d41a0c53b [Client] Make LocalActor initialization include newly spawned Actors 8 years ago
David Cernat ebf9df3fe2 [Client] Add getMergedRefs() method to CellStore 8 years ago
David Cernat 9b58973929 [Client] Remove variable added by tes3mp to CellStore that is not used 8 years ago
David Cernat bb9ea6ccd4 [Client] Also include list of creatures in reply to ActorList 8 years ago
David Cernat ca92be14a5 [Client] Reply to ActorList request with list of NPCs 8 years ago
David Cernat 4644235cf6 [Client] Use mpNum in exact searches for objects 8 years ago
David Cernat e5cf632e1d [Client] Stop creating new reference numbers for placed/spawned objects 8 years ago
David Cernat df051a777a Merge pull request #181 from OpenMW/master
Add OpenMW commits up to 4 Mar 2017
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
Koncord b0ebad8b83 [Client] Fix crash on Linux 8 years ago
David Cernat 88f891b5bd [Client] Make it possible to easily iterate through container items 8 years ago
David Cernat 59c3dbe6af Merge pull request #120 from OpenMW/master while resolving conflicts
# Conflicts:
#	README.md
8 years ago
MiroslavR 87fd011a28 Clean-up saves by dropping references with invalid RefNums (Fixes #1956) 8 years ago
Koncord 6e6237541a Fix "comparison between signed and unsigned integer expressions" 8 years ago
David Cernat a4647de048 Break away from OpenMW by giving RefNum indexes to new created objects 8 years ago
David Cernat 1f982e4dc7 Find objects from world packets using both ID and reference number 8 years ago
David Cernat 47ebd24b4a Merge pull request #79 from OpenMW/master while resolving conflicts
# Conflicts:
#	.travis.yml
#	apps/openmw/mwinput/inputmanagerimp.cpp
8 years ago
David Cernat a6fa0073a0 Find items by mRefNum.mIndex instead of mRefNum for WorldPackets 8 years ago
David Cernat 40f1db2d86 Create SearchByRefNumCustomVisitor in CellStore that returns entire Ptr 8 years ago
David Cernat cc98a25dcf Add searchByRefNum method to OpenMW's CellStore 8 years ago
scrawl a7d4928593 Properly handle moved references in respawning code (Fixes #3600) 8 years ago
David Cernat 8686b9cc12 Merge pull request #29 from OpenMW/master
Add OpenMW commits from end of July
9 years ago
MiroslavR 4a3529488b Fix possible reference duplication when the refID is modified by a plugin (Bug #3471) 9 years ago
MiroslavR d790747389 Implement deletion of moved references (Bug #3471) 9 years ago
davidcernat ab309180c2 Add useful debug info for cell changes 9 years ago
Aesylwinn b4a000913c Merge remote-tracking branch 'yar/master' into Even
# Conflicts:
#	CMakeLists.txt
#	apps/openmw/mwdialogue/filter.cpp
#	apps/openmw/mwmechanics/character.cpp
#	apps/openmw/mwworld/localscripts.cpp
#	components/CMakeLists.txt
#	components/compiler/exprparser.cpp
#	components/sceneutil/workqueue.cpp
9 years ago
davidcernat 7bf08e5e5a Fix transition between exterior cells for non-local players
Make the local player send a packet whenever moving from one exterior cell to another, don't require objects to have RefNums to be moved correctly between exterior cells, and increase the packet priority for cell changes.
9 years ago
scrawl 0720a19fc0 Add support for placing BodyParts in a cell (Bug #3118) 9 years ago
Bret Curtis 2c90b0b78d fix a few spelling mistakes 9 years ago
scrawl 3e6cf17665 Warn about cellrefs with an empty refId (Bug #3238) 9 years ago
scrawl d0aba0d9ee Catch exceptions thrown during reference loading (Bug #3238) 9 years ago
scrawl 2821f46a18 Corpse clearing fix 9 years ago
scrawl f2f601b958 Implement corpse clearing (Fixes #2363) 9 years ago
scrawl c3ef387208 Vanilla-compatible creature/NPC respawning (Fixes #2369, Fixes #2467) 9 years ago
scrawl 6f9ca0f68f Add basic cell preloader class
Not properly in use yet, but seems to be working.
9 years ago
scrawl 69c2c4fcc1 updateMergedRefs before reading MVRF tags (Fixes #3161) 9 years ago
scrawl 1905f0bf2d Add support for placing BodyParts in a cell (Bug #3118) 9 years ago
scrawl e5d9ee30f4 Add count argument to copyObjectToCell
Fixes the gold bug introduced in c9ca5bc946
9 years ago
scrawl a344183247 Comment fix 9 years ago
scrawl 19d87c78f2 Add CellStore::forEachConst 9 years ago
scrawl 2fe2f53b02 Set the changed flag in CellStore::search (Fixes #3089) 9 years ago
scrawl d6bcb7906d Fix crash in a warning message 9 years ago
scrawl 359b0b3772 Rename for clarity 9 years ago
scrawl bdae572264 Merge pull request #840 from scrawl/movedrefs
Object movement between cells
9 years ago
scrawl 07b064f616 Rename to lowerCaseInPlace 9 years ago
scrawl 621347b20f Remove moved ref handling from listRefs()
Not needed since we now load cells when a reference is moved there.
9 years ago
scrawl 4b0ecaa0a0 Fix physics bug 9 years ago
scrawl 0af33b5abd Throw exception if moveTo() is passed an object not part of *this 9 years ago
scrawl 176a3c16f4 Resolve moved references loaded from a save game 9 years ago
scrawl 671561ea37 Write moved references to the save game file (not resolved on loading yet) 9 years ago
scrawl 2219231230 Missing updateMergedRefs() 9 years ago
scrawl 138957c49a Special case objects with no refnum 9 years ago
scrawl 5e99a3eda6 Rename CellStore Functor to Visitor 9 years ago
scrawl 2301080c63 Load CellStore when an object is moved there 9 years ago
scrawl 811df1e97b Pass the ESM reader list to CellStore constructor 9 years ago
scrawl 3dcefd17fc Fix CellStore::count() 9 years ago
scrawl 3aa53f3cb4 Object cell movement tracker works. Savegame handling is still missing and some game functionality is still stubbed out. 9 years ago
scrawl 64b4926127 Add reference moving logic - untested 9 years ago
scrawl d0c6b407b4 Fix isUnderwater checks being off by one for exterior cells 9 years ago
Stanislav Bas 67c8f95c4e Load/read methods (for ESM records) accept a deleted flag in OpenMW 10 years ago
Stanislav Bas e8a9567be3 Move DELE handling to CellRef record 10 years ago
Alexander "Ace" Olofsson 3655ef16af Explicitly instantiate ESM::StatState 10 years ago
scrawl 19988d5e45 Remove RefData::getHandle 10 years ago
scrawl e3f1cb8305 Remove "loading cell" message
This spams the log too much, in particular when loading a savegame.
10 years ago
scrawl d13335ba40 Ensure the item can be equipped in the given slot when loading inventory 10 years ago
scrawl c65f9cb3c0 Revert "Change save format to store relative equipment index"
This reverts commit 89d9649b50.
10 years ago
scrawl 89d9649b50 Change save format to store relative equipment index
Store the index for the allowedSlots vector instead of the absolute slot index. This will more gracefully handle edge cases like the available slots for an item having changed when loading the game, or the "allows stacking" property having changed. However the main reason this was done is to ease work on the essimporter.
10 years ago
scrawl 9014dc48ee Don't require the object type id for reading references from savegames
This is redundant, since we can look it up from the RefID.
10 years ago
scrawl 235683e449 Remove LightState from openmw save format to streamline inventory loading 10 years ago
dteviot 7aa0f887c0 Minor changes to ESM::RefNum
1. Changed mIndex to unsigned, to solve potential implementation defined behavior with right shift.
2. Refactoring to minimize use of magic number -1 to indicate "no Content File".
10 years ago
scrawl 0fe7500f74 Work around pathgrid record limitation (Fixes #2195) 10 years ago
scrawl 48d5789aeb Use a separate flag for references deleted by a content file (Fixes #2018)
The flag must be separate so as to not contaminate the user's savegame.

Fixes the following use cases that were broken before:

 - Content file edits a reference that was already deleted by a previously loaded content file -> reference must stay deleted
 - Changed or new content file deletes a reference that is already present in the user's savegame -> reference must be deleted
 - Said content file is disabled again - reference must be undeleted
10 years ago
scrawl 7afd2ca614 Consider moved references in CellStore::listRefs 11 years ago
scrawl 395f98e476 Fix triggering changed flag for all references when cell is visited
The InsertFunctor for cells was calling localRotateObject() for all references which set the mChanged flag in RefData to true.

Also clean up RefData interface slightly.
11 years ago
scrawl 039398c8ae Basic RefData and CellRef change tracking
Wrapped item charge handling in getItemHealth function
11 years ago
Emanuel Guevel 1e4a854433 Remove static method MWWorld::Class::get(&Ptr)
It was just adding a level of indirection to Ptr.getClass().
All the call were replaced by that instead. The number of lines changed
is important, but the change itself is trivial, so everything should be
fine. :)
11 years ago
scrawl ae66d28c87 Feature #32: Implement respawn for containers, creatures and NPCs 11 years ago
scrawl 6de7e16550 Fix searchPtrViaActorId not skipping over deleted references
Fixes an issue when an actor has moved cell: searchPtrViaActorId would randomly return the deleted Ptr from the old cell.
11 years ago
scrawl a76e391ad0 Savegame: store door movement state (Closes #747) 11 years ago
scrawl 471bbd0021 Savegame: store levelled creature state and move to actorIds
(Closes #1332)
11 years ago