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

14104 commits

Author SHA1 Message Date
scrawl
b4cdb965dc Move rng to components
(cherry picked from commit 8c810e3620)

# Conflicts:
#	apps/openmw/engine.cpp
#	apps/openmw/mwclass/npc.cpp
#	components/misc/rng.cpp
#	components/sceneutil/lightcontroller.cpp
#	libs/openengine/CMakeLists.txt
2018-10-05 18:53:47 +10:00
dteviot
4b0aeb4066 consolidate random number logic
Note, I suspect Rng::rollClosedProbability() is not needed.  The only difference between it and rollProbability() is that one time in 37k (on Windows), it will give an output of 1.0.
On some versions of Linux, the value of 1.0 will occur about 1 time in 4 billion.

(cherry picked from commit 3f28634d1f)

# Conflicts:
#	apps/openmw/mwclass/creature.cpp
#	apps/openmw/mwclass/npc.cpp
#	apps/openmw/mwgui/pickpocketitemmodel.cpp
#	apps/openmw/mwgui/waitdialog.cpp
#	apps/openmw/mwmechanics/combat.cpp
#	apps/openmw/mwmechanics/mechanicsmanagerimp.cpp
#	components/CMakeLists.txt
#	libs/openengine/misc/rng.cpp
2018-10-05 18:45:57 +10:00
cc9cii
c9b07b5f72 Merge pull request #15 from cc9cii/bug-fixes
Bug fixes
2015-12-20 17:12:23 +11:00
cc9cii
c2ea682f0e Set editor limits on hard-coded string lengths (Bug #3066)
- See https://forum.openmw.org/viewtopic.php?f=2&t=3233 and https://bugs.openmw.org/issues/3066
2015-12-20 15:02:18 +11:00
cc9cii
258d98cddc Update README.md regarding the cc9cii fork. 2015-12-19 20:59:56 +11:00
cc9cii
60d5ea7ab6 Fix bug where new addons could not be created since commit ff072441fd. 2015-12-19 20:57:29 +11:00
cc9cii
40bacc04c5 Merge pull request #14 from cc9cii/minor-enhancements
Minor enhancements and performance improvements
2015-12-19 19:25:40 +11:00
cc9cii
90b76801f6 Reduce the call to tolower() for each character when the string is already in lower case.
- only a minor performance gain according to the MSVC profiler
2015-12-19 18:50:07 +11:00
cc9cii
abe6904a94 Minor performance gains on loading cell references.
- Use integers where possible
- Unfortunately many functions are simply duplicated for now, but over time the deprecated ones will be removed
2015-12-19 17:54:45 +11:00
cc9cii
003b0d48be Move resource names listing code out of CSMWorld::Resources ctor in order to avoid multiple scan of the same resources.
- The resources are still scanned twice, once when the archive/directory is added and another time when the names are listed.
2015-12-19 17:39:02 +11:00
cc9cii
06f9922822 Performance improvements for loading Info records.
- The order of info records with the same topic are maintained in Collection::mRecords
- The index lookup data structure are not ordered.  The topic string is hashed.  The infos for the topic are simply placed in a vector.
- The index values for appending or inserting a record takes prev/next values (if exist)
- FIXME: prev/next values are not adjusted for adding or removing records
- FIXME: undo after reordering does not reset the modified flag
2015-12-19 17:30:55 +11:00
cc9cii
edf4e6ff95 Fix crash when repeatedly performing delete/undo due to empty moved record.
- introduced in commit 23e7e3c165
2015-12-19 17:22:09 +11:00
cc9cii
226f7b6928 Suppress additional MSVC warnings after Update 1 2015-12-18 19:42:19 +11:00
cc9cii
76e9a03596 More efficient implementation of an earlier fix so that id is searched only once
- see commit 306bfcbdf2
2015-12-18 19:41:19 +11:00
cc9cii
477e0ee912 Convert std::to_string() calls to snprintf() for cell references.
- Profiling indicates snprintf() is more efficient when using MSVC (not tested with linux)
2015-12-18 19:39:40 +11:00
cc9cii
f6d6138f46 Minor formatting change. 2015-12-11 22:39:03 +11:00
cc9cii
de5ce7059e Use load message system for moved ref target cell error logging. 2015-12-11 22:20:21 +11:00
cc9cii
47b5fa9dae Convert some of ostringstream << operations to std::to_sting() calls.
- At least with MSVC the latter is more efficient.
- There are many more, but leave them until they show up during profiling (so far only loading was profiled, and mainly cell references)
2015-12-11 22:18:17 +11:00
cc9cii
86945d1912 Convert the CellRef record index lookup maps to use integer keys rather than strings.
- Morrowind load over 300,000 references, so even small inefficiencies add up to longer loading times.
- std::map is used, but should try others, std::unordered_map or even std::vector
2015-12-11 21:00:13 +11:00
cc9cii
0de223c637 Fix bug (#3067) where content file number was being ignored while searching for already loaded cell references.
- Introduced by commits 49884f54f7 and 896ab44d1e.
- Also see https://github.com/OpenMW/openmw/pull/557
2015-12-11 07:18:54 +11:00
cc9cii
306bfcbdf2 Fix exception when deleting a record while dialogue subview for that record is open. 2015-12-08 00:27:20 +11:00
cc9cii
68e16b6cee Convert RefNum index map to use find(). 2015-12-06 21:19:06 +11:00
cc9cii
a967418a5a Fix Preview and Unpaged World subviews not rendering. Not sure if this is related to a later version of Ogre being used. 2015-12-06 19:50:26 +11:00
cc9cii
ff072441fd Change the loader's top progress bar to show total number of records processed rather than the number of files. 2015-12-06 19:48:56 +11:00
cc9cii
65df15a89d Suppress MSVC 2015 warnings about hidden/deleted base class move constructors and move assignment operators. 2015-12-06 15:26:20 +11:00
cc9cii
19af94b73e Reduce copying further by adding move constructors and move assignment operators to CellRef structs. 2015-12-06 15:20:45 +11:00
cc9cii
23e7e3c165 Use std::unique_ptr to store records in collections, RefidCollection and RefIdData.
- std::move support required (C++11)
- MSVC 2013 or later should be fine
2015-12-06 15:14:05 +11:00
cc9cii
257126ed69 Call push_back() if inserting to the end of the vector. It seems MSVC may be generating different code compared to insert(). 2015-12-05 20:50:47 +11:00
cc9cii
77394fce99 Fix table being sorted twice (at least it appeared that way according to the sample profiler)
- Quoting Qt-4.8: "Note: . Setting the property to true with setSortingEnabled() immediately triggers a call to sortByColumn() with the current sort section and order."
2015-12-05 20:38:09 +11:00
cc9cii
f029682057 Merge branch 'cc9cii' into minor-enhancements
Conflicts:
	apps/opencs/model/doc/savingstages.cpp
	apps/opencs/model/world/refidcollection.cpp
2015-12-05 19:55:32 +11:00
cc9cii
91bf42874f Merge pull request #13 from cc9cii/master-cherry-pick-4
Merge master (cherry pick 4)
2015-12-05 19:35:39 +11:00
scrawl
3c02703876 Not found Land Textures are no longer a fatal error (Bug #3037)
Log warning message and show the default texture when encountering invalid ESM::LandTexture references.

(cherry picked from commit 35fa1f5865)
2015-12-05 18:14:55 +11:00
scrawl
a1939ae05f StringUtils: use the locale-unaware tolower function
There is no change in behaviour since we were using the C locale.

The locale-aware tolower is much slower than the locale-unaware one. At least on Linux/GCC it calls dynamic_cast's, and is overall slower by an order of magnitude.

(cherry picked from commit 27e669296e)
2015-12-05 18:11:21 +11:00
Marc Zinnschlag
ec00bd2c98 make initial size of script error panel configurable (Fixes #2996)
(cherry picked from commit 99500f4021)
2015-12-05 17:45:58 +11:00
Marc Zinnschlag
8c4d414635 remember script error panel height per scriptsubview
(cherry picked from commit f5c61ee616)
2015-12-05 17:45:45 +11:00
Marc Zinnschlag
8da783d877 do not adjust error panel height if panal was already open
(cherry picked from commit 26640d17eb)
2015-12-05 17:45:32 +11:00
Marc Zinnschlag
2c5f0bf6c5 hide script error list when there are no errors (Fixes #2867)
(cherry picked from commit 1093a53cf9)
2015-12-05 17:45:16 +11:00
Marc Zinnschlag
0366a05649 Removed validator for filenames in OpenMW-CS (Fixes #2918)
(cherry picked from commit b74b274ac0)
2015-12-05 17:44:59 +11:00
Marc Zinnschlag
30b28bfd07 adjusted startup warning message for recent improvements regarding loading/saving
(cherry picked from commit e0e9e7f8c2)
2015-12-05 17:44:40 +11:00
scrawl
0eca29eb62 Ignore Creature INDX subrecords
Found in some .ess files, not sure what they mean.

(cherry picked from commit 0bdfd1b0d7)
2015-12-05 17:42:58 +11:00
scrawl
ebf9ffd1da Fix double writing of Dialogue NAME in OpenCS
(cherry picked from commit af4923577b)
2015-12-05 17:33:13 +11:00
scrawl
d3caeaf898 Remove unused SOUND_INPUT_INCLUDES cmake variable.
(cherry picked from commit 0220e82259)

Conflicts:
	apps/openmw/CMakeLists.txt
2015-12-05 17:32:55 +11:00
Alexander "Ace" Olofsson
940e982d65 Add FFMPEG to include path for OpenMW
I'm a bit confused; `mwsound/ffmpeg_decoder.hpp/cpp` requires FFMPEG headers to compile, how did this work in the first place?
(cherry picked from commit d2a4175804)
2015-12-05 17:29:12 +11:00
cc9cii
1334091613 Resolve merge issues. 2015-12-05 17:28:32 +11:00
scrawl
33c0db1d9a Adjust tests to work with esm_rewrite branch.
(cherry picked from commit aae1aa3708)
2015-12-05 11:27:12 +11:00
scrawl
0d9ffe8119 Tests: add record overwrite test
(cherry picked from commit f91aae2350)
2015-12-05 11:27:00 +11:00
scrawl
d3ada38f01 Tests: add record deletion test
(cherry picked from commit 1e817a976f)
2015-12-05 11:26:49 +11:00
scrawl
c3031da20e Tests: add content_diagnostics_test (requires some data files)
(cherry picked from commit 771193bae8)
2015-12-05 11:26:37 +11:00
scrawl
c221be76dc Tests: add dialogue_merging_test (requires some data files)
(cherry picked from commit 38c155c579)
2015-12-05 11:26:24 +11:00
scrawl
f9e12d6fbd Delete empty test
(cherry picked from commit d0d8c2eded)
2015-12-05 11:26:11 +11:00