Commit Graph

18661 Commits (8179a097f837a9593d738a8567d95f9f40aaa1b3)

Author SHA1 Message Date
ζeh Matt 151770ccf1
Separate global vs world rng functions and use custom prng 3 years ago
ζeh Matt 08fae7be6e
Pass the prng from world where appropriate 3 years ago
ζeh Matt b502dc12f0
Add prng to World instance and serialize state in Save 3 years ago
jvoisin eb46bde75e Merge branch 'lua_records' into 'master'
Lua bindings for ESM::Door and ESM::Weapon records

See merge request OpenMW/openmw!1717
3 years ago
Petr Mikheev 1b1e81b90e Lua bindings for ESM::Door and ESM::Weapon records 3 years ago
Petr Mikheev d185cb6dce Add Lua function `ui.screenSize()` 3 years ago
Evil Eye d7d1a85143 Restore dialogue autocompletion in the console 3 years ago
elsid 5b9dd10cbe
Limit max navmeshdb file size
Use "pragma max_page_count" to define max allowed file size in combination with
"pragma page_size" based on a new setting "max navmeshdb file size".

* Stop navmeshtool on the first db error.
* Disable writes to db in the engine on first "database or disk is full"
  SQLite3 error. There is no special error code for this error.
* Change default "write to navmeshdb" to true.
* Use time intervals for transaction duration instead of number of changes.
3 years ago
Petr Mikheev fa115418eb [Lua] Remove queries 3 years ago
Petr Mikheev 0f84bfde51 [Lua] Replace cell.selectObjects with cell.getAll 3 years ago
Petr Mikheev 43bed7f0d2 [Lua] Split obj.inventory into Actor.inventory(obj) and Container.content(obj) 3 years ago
Petr Mikheev d251c4e2a1 [Lua] Change behavior of `obj.type` 3 years ago
Petr Mikheev af93ebf433 [Lua] Move class-specific functions to `openmw.types` 3 years ago
AnyOldName3 696be1cc39 Merge branch 'fix_6589' into 'master'
Add default value for `user-data` in openmw.cfg

Closes #6589

See merge request OpenMW/openmw!1632
3 years ago
duncanspumpkin 3a117cac22 Switch to a constexpr for FourCC constant
Add static asssert on wrong size
3 years ago
jvoisin 8a182c130a Merge branch 'refactor/prng' into 'master'
Refactor and rename some things around Misc::Rng

See merge request OpenMW/openmw!1710
3 years ago
Matt 54e114d83e Avoid string copies for ESM::Variant::getString 3 years ago
ζeh Matt d83a381f79
Refactor and rename some things around Misc::Rng 3 years ago
Petr Mikheev 696c2135ef Merge branch 'FixSettingsLoaderForEditor' into 'master'
Make settings loader differentiate between engine and editor (fixes #6658).

Closes #6658

See merge request OpenMW/openmw!1706
3 years ago
Martin Otto 96e48e5492 Make settings loader differentiate between engine and editor (fixes #6658). 3 years ago
Petr Mikheev df41b4080d Merge branch 'refactor/headtracking' into 'master'
Small improvement for headtracking

See merge request OpenMW/openmw!1683
3 years ago
Matt 0b528d3bfb Small improvement for headtracking 3 years ago
ζeh Matt 129d68e299
Fix #6660: Crash during intro video when closing the game 3 years ago
psi29a 3afa46b25e Merge branch 'CPP20_support' into 'master'
Support C++20

See merge request OpenMW/openmw!1705
3 years ago
Bret Curtis 32fd6f297a static_cast bitwise operation between different enumeration types 3 years ago
Bret Curtis 1927b1c6d9 use static cast to handle: deprecated between enumerations of different types 3 years ago
Bret Curtis ad11cc8d8a reinstall fontconfig as needed; const an imbigious == operator 3 years ago
Bret Curtis 4b742dd461 explicit capture for lamda 3 years ago
psi29a 3558196098 Merge branch 'Newer-Bsa-formats-no-longer-load' into 'master'
#6651 Newer bsa formats no longer load

Closes #6651

See merge request OpenMW/openmw!1703
3 years ago
Evil Eye 25feea9b16 Prevent write to empty vector element 3 years ago
psi29a ceae2d664d Merge branch 'refactor/stdlist' into 'master'
Use std::vector instead of std::list for some functions

See merge request OpenMW/openmw!1699
3 years ago
Cédric Mocquillon ff7ad93bac Avoid missusing of CompressedBSAFile with private inheritance 3 years ago
uramer 6845d681f2 Update hardcoded layers (hotfix for https://gitlab.com/OpenMW/openmw/-/merge_requests/1681) 3 years ago
psi29a 2d4e9b38ae Merge branch 'lua_ui_image' into 'master'
Document the Lua Image widget, add UI texture resources

See merge request OpenMW/openmw!1637
3 years ago
uramer 67879bac55 MR feedack 3 years ago
Petr Mikheev 6afafbbe30 Merge branch 'refactor_layers' into 'master'
Refactor UI layers

See merge request OpenMW/openmw!1681
3 years ago
uramer 21a363d96f Refactor UI layers 3 years ago
uramer fc50724f5c Render text and images correctly in templates with slots 3 years ago
uramer e092ee2624 Document the Lua Image widget, add UI texture resources 3 years ago
jvoisin 7f3058d501 Use toStringView in esmtool instead of toString 3 years ago
ζeh Matt eca405e5c7
Use std::vector instead of std::list 3 years ago
elsid 42d6032c8b
Support compilation with c++20 3 years ago
psi29a 7e4e78b1a7 Merge branch 'engarde' into 'master'
Always reduce weapon condition by the raw damage (bug #6559)

Closes #6559

See merge request OpenMW/openmw!1694
3 years ago
Alexei Dobrohotov fdd9e6a793 Always reduce weapon condition by the raw damage (bug #6559) 3 years ago
psi29a 34be9329eb Merge branch 'ascivilaspossible' into 'master'
Increase the base actor angular velocity to 900°/sec (#5192)

Closes #5192

See merge request OpenMW/openmw!1690
3 years ago
psi29a dd281e1e93 Merge branch 'fix_collision_boxes' into 'master'
Fix #6616: Fix incorrect collision box calculations

Closes #6616

See merge request OpenMW/openmw!1687
3 years ago
Alexei Kotov 38a0659b7f Merge branch 'weak_ptr' into 'master'
Store std::weak_ptr into mUpdateAabb.

See merge request OpenMW/openmw!1578
3 years ago
Alexei Kotov 4a3d7a1ff7 Merge branch 'esm3_ai_package' into 'master'
Use unique_ptr to manage AiPackage lifetime

See merge request OpenMW/openmw!1691
3 years ago
Alexei Kotov 087084abdc Merge branch 'projectilefix' into 'master'
Fix for projectile movement simulation (#6526 and probably #6434)

See merge request OpenMW/openmw!1518
3 years ago
elsid 595c2e0a8e
Use unique_ptr to manage AiPackage lifetime 3 years ago
Alexei Dobrohotov 1a15ad216d Increase the base angular velocity to 900°/sec (#5192) 3 years ago
Abdu Sharif de3092f014 Revert "Merge branch 'offset_the_deads' into 'master'"
This reverts commit 7dd02076f5
3 years ago
Petr Mikheev ff7ac7192b Merge branch 'ui_pairs' into 'master'
Implement pairs and ipairs for ui.content and ui.layers. Document all iterable types in a uniform way.

See merge request OpenMW/openmw!1643
3 years ago
uramer a1abc84f59 Implement pairs and ipairs for ui.content and ui.layers. Document all iterable types in a uniform way. 3 years ago
uramer cc6dce5443 Support controller touchpads (Resolves https://gitlab.com/OpenMW/openmw/-/issues/6639) 3 years ago
jvoisin a55f1ad103 Merge branch 'bullet_object_tool' into 'master'
Add a tool to load and print information about all bullet objects in all cells

See merge request OpenMW/openmw!1627
3 years ago
elsid 6fd251e8f7
Avoid starting async png writing when overlay image is null 3 years ago
psi29a b03f9e430c Merge branch 'navmesh_disk_rm_unused_tiles' into 'master'
Add navmeshtool flag to remove unused tiles from navmesh disk cache

See merge request OpenMW/openmw!1671
3 years ago
psi29a 85c0d93274 Merge branch 'fix-6633' into 'master'
Fix #6633: AiSequence packages being removed incorrectly

Closes #6633

See merge request OpenMW/openmw!1678
3 years ago
ζeh Matt b997e28e57
Fix #6633: AiSequence packages being removed incorrectly 3 years ago
psi29a 1c1581bdab Merge branch 'check_esm4_compilation' into 'master'
Check ESM4 compilation

See merge request OpenMW/openmw!1677
3 years ago
elsid 57c1f2e231
Make sure everything compiles in ESM4 3 years ago
elsid a7e76c6f3d
Remove redundant include 3 years ago
elsid ab1a6e034e
Add navmeshtool flag to remove unused tiles from navmesh disk cache
* Remove tiles outside processing range. Useful when new content profile map
  has different bounds.
* Remove ignored tiles. For a case when content profile maps have intersection
  but there is no more data for navmesh.
* Remove older tiles at the same worldspace position. If navmesh tile data has
  changed with new content, the old ones unlikely to be used.
* Vacuum the database when there are modifications. SQLite leaves empty pages
  in the file on database modification. Vacuum cleans up unused pages reducing
  the file size.
3 years ago
elsid 67741402b5
Replace reference to const std::string by std::string_view for navmeshdb related arguments 3 years ago
elsid 9584cb7ac2
Use fixed size types for serialization 3 years ago
elsid de7f9f6439
Replace raw for loop by algorithm
To fix compilation error with -D_GLIBCXX_DEBUG:
/home/elsid/dev/openmw/apps/openmw/mwdialogue/dialoguemanagerimp.cpp: In member function ‘virtual void MWDialogue::DialogueManager::write(ESM::ESMWriter&, Loading::Listener&) const’:
/home/elsid/dev/openmw/apps/openmw/mwdialogue/dialoguemanagerimp.cpp:679:78: error: no matching function for call to ‘__gnu_debug::_Safe_iterator<std::_Rb_tree_const_iterator<std::__cxx11::basic_string<char> >, std::__debug::set<std::__cxx11::basic_string<char> >, std::bidirectional_iterator_tag>::_Safe_iterator(std::__debug::set<std::__cxx11::basic_string<char>, Misc::StringUtils::CiComp>::const_iterator)’
  679 |         for (std::set<std::string>::const_iterator iter (mKnownTopics.begin());
      |                                                                              ^
3 years ago
psi29a 4a2302ff2b Merge branch 'hand_to_nixhound' into 'master'
Disallow non-bipedal hand-to-hand refreshes

See merge request OpenMW/openmw!1667
3 years ago
Alexei Kotov 4fdf55601c Merge branch 'bigboi' into 'master'
Force a scale update when changing view modes

Closes #6623

See merge request OpenMW/openmw!1662
3 years ago
psi29a 8da1cc3dd2 Merge branch 'fix-6618' into 'master'
Fix #6618

Closes #6618

See merge request OpenMW/openmw!1666
3 years ago
psi29a cc8d05bd9a Merge branch 'async_save_map' into 'master'
Write png image of the global map for save asynchronously

See merge request OpenMW/openmw!1656
3 years ago
Evil Eye 7bd4971e0c Disallow non-bipedal hand-to-hand refreshes 3 years ago
psi29a b73eaadf20 Merge branch 'use_utf8_string_view' into 'master'
Avoid extra copy for Utf8Encoder::getUtf8 result

See merge request OpenMW/openmw!1661
3 years ago
ζeh Matt 0ce29a6131
Simplify logic in AiSequence::execute 3 years ago
ζeh Matt e60e0b55eb
Fix potential another crash 3 years ago
ζeh Matt 83be3826ff
Fix #6618: Crash due to iterator invalidation 3 years ago
psi29a d680870e8f Merge branch 'fix_aabb' into 'master'
Fix btAABB initialization (#6489)

Closes #6489

See merge request OpenMW/openmw!1664
3 years ago
elsid 2e38f0b641
Fix btAABB initialization 3 years ago
elsid 875d9dcead
Fix buffer resizing by StatelessUtf8Encoder 3 years ago
Evil Eye f9da792386 Force a scale update when changing view modes 3 years ago
psi29a 8a0fb4d633 Merge branch 'stateless_utf8_encoder' into 'master'
Add StatelessUtf8Encoder to support caller provided buffer for output

See merge request OpenMW/openmw!1660
3 years ago
psi29a 776b286286 Merge branch 'esm_name' into 'master'
Use ESM::NAME instead of const char* and std::string as argument type

See merge request OpenMW/openmw!1659
3 years ago
elsid 3305b400dc
Use ESM::NAME instead of const char* and std::string as argument type 3 years ago
elsid c044bef6a7
Add StatelessUtf8Encoder to support caller provided buffer for output 3 years ago
elsid fbbf871067
Avoid extra copy for Utf8Encoder::getUtf8 result 3 years ago
Evil Eye 649c2f8286 Fix stats not working right for saves started before version 17 3 years ago
psi29a 149ef56b60 Merge branch 'utf8_encoder_tests' into 'master'
Add tests for Utf8Encoder

See merge request OpenMW/openmw!1654
3 years ago
elsid a4d7b72511
Write png image of the global map for save asynchronously
Write global map to the save file last to give more time for async job to
finish.
3 years ago
elsid b43eb29465
Log duration of writing save game file 3 years ago
elsid 7884a01026
Add tests for Utf8Encoder 3 years ago
psi29a bd8c75daee Merge branch 'quest_redo' into 'master'
Restart all quests with the same name when a quest is restarted

Closes #6606

See merge request OpenMW/openmw!1651
3 years ago
Petr Mikheev d8127fdad2 Merge branch 'refactor/aisequence-2' into 'master'
#6091: Optimize isInCombat

See merge request OpenMW/openmw!1636
3 years ago
Matt 367bdcf0cc #6091: Optimize isInCombat 3 years ago
Alexei Kotov 14a9af15ab Merge branch 'dagoth_wave' into 'master'
Remove weaponless, non-biped distinction

Closes #5054

See merge request OpenMW/openmw!1517
3 years ago
Alexei Kotov 380823d0ee Merge branch 'always-use-best-attack-rounding-fix' into 'master'
Fix always-use-best-attack rounding

See merge request OpenMW/openmw!1647
3 years ago
Evil Eye c382910c1f Restart all quests with the same name when a quest is restarted 3 years ago
Evil Eye fdfde836fe Expect recent saves to store the modified value 3 years ago
Niek Wilting 6cd12823e8 Fix always-use-best-attack rounding 3 years ago
psi29a 2a7d28712f Merge branch 'stats' into 'master'
Remove weirdness surrounding AI- and Dynamic stats

Closes #6599

See merge request OpenMW/openmw!1645
3 years ago
Evil Eye 054d8babc4 Add getRatio method 3 years ago
Evil Eye 6b203892fc Fix mod not increasing fortified values 3 years ago
uramer ede9d27437 Element-wise multiplication and division of Lua vectors 3 years ago
Evil Eye dc495a685a Remove a member variable that doesn't get saved and remove fortify maximum health code 3 years ago
Evil Eye 4e52c96cf5 Make Set/Mod[DynamicStat] work with negative values as in vanilla 3 years ago
Evil Eye 5aef14eccd Prevent division by 0 3 years ago
psi29a 01e8ae8981 Merge branch 'peace_love_and_stencils' into 'master'
Support morrowind stenciling (#6443)

Closes #6443

See merge request OpenMW/openmw!1635
3 years ago
glassmancody.info 8c2c322d92 add stencil to water RTTs, reword some comments 3 years ago
glassmancody.info bbc9c53423 support morrowind stenciling 3 years ago
psi29a 2a6392fe5c Merge branch 'fix_6590' into 'master'
Fix #6590

Closes #6590

See merge request OpenMW/openmw!1633
3 years ago
uramer 643c1d6aeb Merge branch 'lua_ai' into 'master'
Control AI packages from Lua

See merge request OpenMW/openmw!1604
3 years ago
Evil Eye 7a7a95407a Merge branch 'lua_pairs' into 'master'
Proper support of `pairs` and `ipairs` in Lua; fix bug in `makeReadOnly`.

See merge request OpenMW/openmw!1628
3 years ago
Petr Mikheev a294adcdaf Proper support of `pairs` and `ipairs` in Lua; fix bug in `makeReadOnly`. 3 years ago
Petr Mikheev 8e330653c7 Fix #6590 3 years ago
uramer 581c3f4882 Update and document Lua Text and TextEdit widget types, fix some issues with Lua UI 3 years ago
Petr Mikheev ac5cd6c80a Add default value for `user-data` in openmw.cfg 3 years ago
Petr Mikheev 6c56436809 Control AI packages from Lua 3 years ago
psi29a 7f4d4c0d70 Merge branch 'refactor/system-ownership' into 'master'
Make ownership explicit in Engine and Environment

See merge request OpenMW/openmw!1605
3 years ago
Evil Eye 4657060d2c Extend swish and strength changes to all random attacks 3 years ago
Evil Eye 020e0b2ea5 Don't allow non-bipedal actors to play hand-to-hand animations 3 years ago
unknown 5ebcd37da1 Rename method and restore swish sounds 3 years ago
ζeh Matt a383d9dfdf
Make ownership explicit in Environment 3 years ago
elsid e7f3524924
Add a tool to load and print information about all bullet objects in all cells 3 years ago
psi29a becffef142 Merge branch 'cull_navmesh_objects' into 'master'
Cull navmesh objects by scene bounds (#5858)

Closes #5858

See merge request OpenMW/openmw!1625
3 years ago
AnyOldName3 9d8853442b Merge branch 'portable' into 'master'
Make OpenMW "portable"

Closes #2491

See merge request OpenMW/openmw!1555
3 years ago
psi29a c3e07619a4 Merge branch 'lua' into 'master'
Replace `inventory:get<Type>()` with `inventory:getAll(<Type>)`

See merge request OpenMW/openmw!1624
3 years ago
elsid 3caeda7299
Consider animated object unchanged if no transform updates done 3 years ago
elsid 832ab103cb
Filter out unchanged animated objects for navigator update 3 years ago
elsid 05b54cbfb8
Cull navmesh objects by scene bounds
If object is too big iteration over all tiles covering it can take too much
time. Limit bounds to a square around a player position to cover only tiles
that will be present in navmesh based on max tiles number option.

Each object is associated with a set of tiles its present in. Culling can
reduce this set but it has to be update when bounds change position. Do this
in TileCachedRecastMeshManager::setBounds updating the set and adding/removing
objects to the corresponding CachedRecastMeshManagers.
3 years ago
elsid 1b2954f2db
Remove unused z coordinate 3 years ago
elsid 783411fa1f
Use new player position when updating navigator on cell loading 3 years ago
elsid 542717394a
Remove objects, water and heightfields when no longer required 3 years ago
Petr Mikheev 6e4f628866 Replace `inventory:get<Type>()` with `inventory:getAll(<Type>)` 3 years ago
elsid 16cfdfec19
Avoid unnecessary computation
And fix UBSAN error:

/home/elsid/dev/openmw/apps/openmw/mwrender/renderingmanager.cpp:659:81: runtime error: division by zero
    #0 0x556eac16f4dc in MWRender::RenderingManager::configureAmbient(ESM::Cell const*) /home/elsid/dev/openmw/apps/openmw/mwrender/renderingmanager.cpp:659
    #1 0x556eadfd3d60 in MWWorld::Scene::loadCell(MWWorld::CellStore*, Loading::Listener*, bool, osg::Vec3f const&) /home/elsid/dev/openmw/apps/openmw/mwworld/scene.cpp:467
    #2 0x556eadfe3047 in MWWorld::Scene::changeToInteriorCell(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ESM::Position const&, bool, bool) /home/elsid/dev/openmw/apps/openmw/mwworld/scene.cpp:830
    #3 0x556eadeb8fb3 in MWWorld::World::changeToInteriorCell(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ESM::Position const&, bool, bool) /home/elsid/dev/openmw/apps/openmw/mwworld/worldimp.cpp:978
    #4 0x556eadeba5f1 in MWWorld::World::changeToCell(ESM::CellId const&, ESM::Position const&, bool, bool) /home/elsid/dev/openmw/apps/openmw/mwworld/worldimp.cpp:1008
    #5 0x556eaeb852dd in MWState::StateManager::loadGame(MWState::Character const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/elsid/dev/openmw/apps/openmw/mwstate/statemanagerimp.cpp:533
    #6 0x556eaeb81674 in MWState::StateManager::loadGame(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/elsid/dev/openmw/apps/openmw/mwstate/statemanagerimp.cpp:366
    #7 0x556eaebd2aae in OMW::Engine::go() /home/elsid/dev/openmw/apps/openmw/engine.cpp:1025
    #8 0x556eaeba810a in runApplication(int, char**) /home/elsid/dev/openmw/apps/openmw/main.cpp:221
    #9 0x556eaf865e9a in wrapApplication(int (*)(int, char**), int, char**, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) /home/elsid/dev/openmw/components/debug/debugging.cpp:205
    #10 0x556eaeba8368 in main /home/elsid/dev/openmw/apps/openmw/main.cpp:233
    #11 0x7f89773b3b24 in __libc_start_main (/usr/lib/libc.so.6+0x27b24)
    #12 0x556eac13c09d in _start (/home/elsid/dev/openmw/build/gcc/ubsan/openmw+0x669c09d)
3 years ago
Petr Mikheev a453e5c198 Reuse the same code to load settings in apps/openmw, apps/launcher, apps/opencs 3 years ago
Petr Mikheev 1bcc4a8bcc Read settings.cfg from all active config dirs 3 years ago
Petr Mikheev 5ca56a4f8a New option "config" for specifying additional config directories. 3 years ago
Petr Mikheev dd5ba5c57b Redirect log only after parsing configuration 3 years ago
psi29a bb6b031afd Merge branch 'fix_simulation_crash' into 'master'
Fix use after free and possible deadlock on exit (#6577)

Closes #6577

See merge request OpenMW/openmw!1601
3 years ago
psi29a cf8d49bb9a Merge branch 'lua_settings_ui' into 'master'
Lua settings UI

Closes #6454

See merge request OpenMW/openmw!1595
3 years ago
uramer 946b8b804c MR feedback 3 years ago
Alexei Dobrohotov 142b6fdf2f Fix double precision bound issues in std::max/std::clamp 3 years ago
Petr Mikheev 47c37e5849 Lua command `object:activateBy(actor)` and handler `onActivate` 3 years ago
uramer f68c0c41a9 Prioritize setting pages with hits in the name when searching 3 years ago
Evil Eye 8752f78fa4 Remove weaponless, non-biped distinction 3 years ago
uramer ef1e72dc17 Revert from settings description to searchHints 3 years ago
uramer 01d65a14f1 Implement more advanced search, sort script setting pages by alphabet and filter match quality 3 years ago
uramer 67641dcdb7 Fix compile errors 3 years ago
uramer 086a7d9bc5 Wrap Lua settings widgets into an Adapter widget 3 years ago
uramer db9e734a6a Fix warning 3 years ago
uramer 1455aa3e02 Allow changing script settings pages after registering them 3 years ago