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

137 commits

Author SHA1 Message Date
scrawl
4b0ecaa0a0 Fix physics bug 2015-12-06 22:10:01 +01:00
scrawl
0af33b5abd Throw exception if moveTo() is passed an object not part of *this 2015-12-06 20:05:13 +01:00
scrawl
176a3c16f4 Resolve moved references loaded from a save game 2015-12-06 20:00:24 +01:00
scrawl
671561ea37 Write moved references to the save game file (not resolved on loading yet) 2015-12-06 19:11:25 +01:00
scrawl
2219231230 Missing updateMergedRefs() 2015-12-06 18:46:49 +01:00
scrawl
138957c49a Special case objects with no refnum 2015-12-06 18:43:52 +01:00
scrawl
5e99a3eda6 Rename CellStore Functor to Visitor 2015-12-06 18:13:04 +01:00
scrawl
2301080c63 Load CellStore when an object is moved there 2015-12-06 18:04:48 +01:00
scrawl
811df1e97b Pass the ESM reader list to CellStore constructor 2015-12-06 18:03:55 +01:00
scrawl
3dcefd17fc Fix CellStore::count() 2015-12-04 20:03:14 +01:00
scrawl
3aa53f3cb4 Object cell movement tracker works. Savegame handling is still missing and some game functionality is still stubbed out. 2015-12-04 19:46:02 +01:00
scrawl
64b4926127 Add reference moving logic - untested 2015-12-04 18:29:41 +01:00
scrawl
d0c6b407b4 Fix isUnderwater checks being off by one for exterior cells 2015-12-03 15:16:50 +01:00
Stanislav Bas
67c8f95c4e Load/read methods (for ESM records) accept a deleted flag in OpenMW 2015-07-22 22:15:37 +03:00
Stanislav Bas
e8a9567be3 Move DELE handling to CellRef record 2015-07-15 19:39:01 +03:00
Alexander "Ace" Olofsson
3655ef16af Explicitly instantiate ESM::StatState 2015-07-07 19:19:37 +02:00
scrawl
19988d5e45 Remove RefData::getHandle 2015-05-12 04:04:54 +02:00
scrawl
e3f1cb8305 Remove "loading cell" message
This spams the log too much, in particular when loading a savegame.
2015-03-02 21:12:21 +01:00
scrawl
d13335ba40 Ensure the item can be equipped in the given slot when loading inventory 2015-01-23 15:32:34 +01:00
scrawl
c65f9cb3c0 Revert "Change save format to store relative equipment index"
This reverts commit 89d9649b50.
2015-01-23 02:32:43 +01:00
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.
2015-01-20 23:55:26 +01:00
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.
2015-01-20 00:42:25 +01:00
scrawl
235683e449 Remove LightState from openmw save format to streamline inventory loading 2015-01-19 11:36:00 +01:00
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".
2015-01-11 12:20:22 +13:00
scrawl
0fe7500f74 Work around pathgrid record limitation (Fixes #2195) 2014-12-09 00:13:56 +01:00
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
2014-12-01 22:16:45 +01:00
scrawl
7afd2ca614 Consider moved references in CellStore::listRefs 2014-06-15 14:18:16 +02:00
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.
2014-06-15 14:18:16 +02:00
scrawl
039398c8ae Basic RefData and CellRef change tracking
Wrapped item charge handling in getItemHealth function
2014-05-25 14:30:07 +02:00
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. :)
2014-05-22 20:50:00 +02:00
scrawl
ae66d28c87 Feature #32: Implement respawn for containers, creatures and NPCs 2014-05-17 09:09:00 +02:00
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.
2014-05-15 09:57:09 +02:00
scrawl
a76e391ad0 Savegame: store door movement state (Closes #747) 2014-05-15 09:54:10 +02:00
scrawl
471bbd0021 Savegame: store levelled creature state and move to actorIds
(Closes #1332)
2014-05-15 09:54:04 +02:00
scrawl
3cdbcf3c28 Merge branch 'actorid' of https://github.com/OpenMW/openmw
Conflicts:
	apps/openmw/mwmechanics/creaturestats.cpp
2014-05-14 02:35:05 +02:00
scrawl
a4a9794417 Savegame: store fog of war (Closes #1177) 2014-05-11 02:07:58 +02:00
scrawl
136813a882 Bug #1319: Fix references not coming from a content file incorrectly overwriting each other 2014-05-10 00:01:30 +02:00
Marc Zinnschlag
f6a876bc3d added actor ID 2014-04-29 15:27:49 +02:00
Thoronador
1b8c975d5b minor performance improvements in apps/openmw
Checking for emptiness using size() might be inefficient, because
it can take linear time, while empty() is guaranteed to take only
constant time.

For non-primitive types, postfix ++ operators are inefficient
compared to prefix ++ operators, because post-increment usually
involves keeping a copy of the previous value around.
2014-04-27 19:10:23 +02:00
scrawl
cd1b4218e7 Fix dynamically placed objects being discarded when loading game 2014-04-26 05:01:26 +02:00
cc9cii
f59226265a Remove redundant parameter from aStarSearch. Also update some comments. 2014-04-04 18:10:06 +11:00
cc9cii
040d4f8fc4 Move PathgridGraph into separate files. 2014-04-04 06:13:47 +11:00
cc9cii
98f77714ce Per-cell pathgrid data and calculation moved off PathFinder. Now the edge cost calculations and strongly connected component searches are done only once per cell. Per-actor data and methods still remain with PathFinder.
This version still has debugging statements and needs cleaning up.
2014-04-03 21:43:44 +11:00
Marc Zinnschlag
9b18e01507 keep track of which cells have state that needs to be saved 2014-02-24 10:03:04 +01:00
Marc Zinnschlag
bfcd768078 various bits of cleanup 2014-02-23 21:39:18 +01:00
Marc Zinnschlag
83ded18af0 encapsulated reference collections 2014-02-23 21:21:27 +01:00
Marc Zinnschlag
f220867144 make Ptr a bit more pointer-like 2014-02-23 18:17:41 +01:00
Marc Zinnschlag
b72c1c2c58 encapsulated water level 2014-02-23 17:34:18 +01:00
Marc Zinnschlag
79e723ad06 encapsulated mIds 2014-02-23 16:46:07 +01:00
Marc Zinnschlag
8ea686c6c8 encapsulated mState 2014-02-23 14:26:36 +01:00
Marc Zinnschlag
7693f712bc started making CellStore into a proper class; encapsulated mCell member 2014-02-21 11:35:46 +01:00
Marc Zinnschlag
5b04c10e1d added creature/NPC state to saved games (only container/inventory for now) 2014-02-01 17:36:23 +01:00
Marc Zinnschlag
dd674566a2 store content of containers in saved game files 2014-01-31 13:25:32 +01:00
Marc Zinnschlag
900532a6ca store additional state of lights in saved game files 2014-01-30 12:37:33 +01:00
Marc Zinnschlag
29c3a288e3 load and save of reference in cells (without CustomData state) 2014-01-27 13:27:42 +01:00
Marc Zinnschlag
460089c0aa ignore deleted references that did not came from a content file 2014-01-23 12:53:55 +01:00
Marc Zinnschlag
419e3a7d30 write references in cells to saved game file 2014-01-23 12:51:42 +01:00
Marc Zinnschlag
22cb4784b5 store cell state in saved game files (no references yet) 2014-01-23 11:29:40 +01:00
Marc Zinnschlag
9025210965 Merge branch 'refnum' into savedgame
Conflicts:
	apps/openmw/mwworld/cellstore.cpp
	apps/openmw/mwworld/manualref.hpp
	components/esm/cellref.hpp
2014-01-12 16:58:06 +01:00
Marc Zinnschlag
43dd3b8ef2 removed redundant deletion flag from CellRef 2014-01-06 13:53:20 +01:00
Marc Zinnschlag
c22e38f825 removing 255 content file limitation 2013-12-17 21:19:05 +01:00
scrawl
3f8a69b4ad Don't crash when trying to delete a reference that doesn't exist anymore 2013-08-26 00:14:02 +02:00
Marc Zinnschlag
e94fcce622 accessing references via their ID now also works for references in containers in active cells 2013-08-15 14:45:13 +02:00
scrawl
7dc30a01cd Some changes suggested by cppcheck 2013-07-31 18:46:32 +02:00
Mark Siewert
eefbdde6de - For pull request: remove all instances of maps used to track refnumbers.
- new file: apps/openmw/mwworld/store.cpp, had to move reference merging method out of the header file to prevent three-way recursion/unresolved forward references in custom compare operators.
2013-02-09 13:00:57 +01:00
Mark Siewert
dca8dc4fdb Merge remote-tracking branch 'upstream/master' into multiple_esm_esp
Conflicts:
	apps/openmw/engine.cpp
	apps/openmw/mwworld/cellstore.cpp
	apps/openmw/mwworld/store.hpp
	apps/openmw/mwworld/worldimp.cpp
	apps/openmw/mwworld/worldimp.hpp
	components/esm/esmreader.hpp

- Quick hack: OMW::Engine::prepareEngine only loads translation data for the first master file.
2013-01-25 18:22:01 +01:00
Mark Siewert
a8e02779b2 - Add support for multiple plugins trying to modify the same reference
- Fix a small signed/unsigned warning
2013-01-19 23:33:18 +01:00
eduard
2dc0064cc2 more string lowercase 2013-01-09 20:51:52 +01:00
Mark Siewert
d6377fb2e3 - Support deleting references from a plugin
- Add preliminary support for loading some unique fields appearing only in savegames
- Add a few lines required for supporting respawning references. Incomplete.
2013-01-03 18:51:04 +01:00
Mark Siewert
049b0e66e0 - Restore ability to generate references in the same cell from multiple plugins
- Disable some code related to deleting entries in the store so that it builds again
2012-12-25 20:27:30 +01:00
Mark Siewert
b103426cf0 - Partially reimplement deleting objects defined in a parent esX file.
- Try to reimplement multiple esX files dropping references in the same file.
NOTE: None of these features works. Maybe the code itself does not build. Anyway, after 12 hours of hacking, I am just tired and want to get a snapshot of the code out.
2012-11-25 19:07:16 +01:00
Mark Siewert
896ab44d1e - Add some updated files missing from last commit.
- Move plugin dependency test from esmreader.cpp to esmstpre.cpp; fixes crash in omwlauncher.
2012-11-25 17:19:29 +01:00
Mark Siewert
8ea9f00e6f Merge remote-tracking branch 'upstream/master' into multiple_esm_esp
Conflicts:
	apps/openmw/mwrender/terrain.cpp
	apps/openmw/mwworld/cells.cpp
	apps/openmw/mwworld/cells.hpp
	apps/openmw/mwworld/cellstore.cpp
	apps/openmw/mwworld/cellstore.hpp
	apps/openmw/mwworld/containerstore.cpp
	apps/openmw/mwworld/localscripts.cpp
	apps/openmw/mwworld/scene.cpp
	apps/openmw/mwworld/worldimp.cpp
	apps/openmw/mwworld/worldimp.hpp
	components/esm_store/reclists.hpp
	components/esm_store/store.cpp
	extern/shiny

- Re-implement some patches that were broken by the removal of reclists.hpp and store.cpp/.hpp.
- NOTE: Not everything works as before, I'll have to test some more stuff before we are back to where we were.
2012-11-25 14:12:44 +01:00
Mark Siewert
31fb715bd7 - Add support for moving existing references by plugin files. No cell changing yet.
- Change CellRefList::list from list<> to map<int,> so we can identify live references by their Refnumber.
- Introduce ContainerRefList, a clone of the original CellRefList. It is now used for containers, which do not track Refnumbers.
- Many small tweaks so that the new CellRefList does not conflict with existing code.
2012-11-17 21:50:25 +01:00
Mark Siewert
42eefaf36f - Add support for loading references from multiple esm/esp files. Full reference ID mangling coming soon (currently, moved references are simply cloned).
- Reference loader now (partially) supports MVRF tag.
2012-11-10 21:43:41 +01:00
Mark Siewert
7f77bf76c7 - Add support for multiple esm contexts in cell store. This will allow to generate references from multiple esX files. Currently, only the first context is used.
- Add many TODOs to mark points where more work is required to fully implement this feature.
2012-11-06 22:13:19 +01:00
greye
0fd22ce4b0 CellRefList<X>::find(CellRef &, Y &list) -> ::load(CellRef &, ESMStore &) 2012-11-06 14:23:21 +04:00
greye
d205723a17 resolving m prefix/ESMStore movement 2012-11-05 18:02:47 +04:00
greye
2057f5619e move ESMStore to MWWorld 2012-11-05 17:18:01 +04:00
greye
3c2ce25f5f m prefix for mwworld/cellstore.hpp 2012-11-05 16:07:59 +04:00
greye
7606ebafd6 resolving conflicts, minor update 2012-09-17 11:37:50 +04:00
greye
e7666d3a7f move responsibility for cell changing from CellStore::insertObject to Class::moveToCell 2012-07-25 20:31:39 +04:00
greye
71253c64ab moving part 2, adding position parameter, stable 2012-07-25 20:31:39 +04:00
greye
61cb012ee7 moving Scene::insertObject to CellStore::insertObject, part 1 2012-07-25 20:31:39 +04:00
greye
b760225179 wrong branch
This reverts commit d36d6aacf4.
2012-07-24 00:00:10 +04:00
greye
d36d6aacf4 move Scene::insertObject to CellStore::insertObject, part 1 2012-07-23 23:56:20 +04:00
Marc Zinnschlag
7fcd41c69d Issue #107: Detemplateised CellStore; some include cleanup 2012-06-29 18:54:23 +02:00