1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-12-01 08:04:31 +00:00
Commit graph

36942 commits

Author SHA1 Message Date
Alexei Kotov
3c3fdda8a0 Merge branch 'sunlightpos' into 'master'
Expose sunlight direction to post-processing (#8826)

Closes #8826

See merge request OpenMW/openmw!5020
2025-12-01 01:45:28 +03:00
Alexei Kotov
20d14b57c1 Expose sunlight direction to post-processing (#8826) 2025-11-29 20:27:34 +03:00
Alexei Kotov
35e27504ee Merge branch 'teal-link-fix' into 'master'
Fix dead links to Teal documentation

See merge request OpenMW/openmw!5016
2025-11-29 03:34:18 +03:00
Alexei Kotov
96565e9afb Merge branch 'fix_clang_tidy_warnings' into 'master'
Fix clang tidy warnings (version 21.1.6)

See merge request OpenMW/openmw!5015
2025-11-27 01:16:51 +03:00
Alexei Kotov
c31b4efc01 Merge branch 'globaltargetnumberone' into 'master'
Improve support for global script targets

Closes #2316, #7830, and #2311

See merge request OpenMW/openmw!4812
2025-11-27 01:16:25 +03:00
uramer
47721e7939 Fix dead links to Teal documentation 2025-11-26 14:54:11 +00:00
Alexei Kotov
a00ede3595 Merge branch 'master' into 'master'
Fix 'Show Controller Tooltips By Default' option being ignored

Closes #8799

See merge request OpenMW/openmw!5003
2025-11-26 16:41:45 +03:00
Andy Lanzone
94caf98ece Fix 'Show Controller Tooltips By Default' option being ignored 2025-11-26 16:41:45 +03:00
elsid
feb9cc004c
Fix portability-avoid-pragma-once warnings
components/misc/helpviewer.hpp:1:1: error: avoid 'pragma once' directive; use include guards instead [portability-avoid-pragma-once,-warnings-as-errors]
    1 | #pragma once
      | ^

apps/opencs/view/world/tableheadermouseeventhandler.hpp:1:1: error: avoid 'pragma once' directive; use include guards instead [portability-avoid-pragma-once,-warnings-as-errors]
    1 | #pragma once
      | ^
2025-11-25 21:16:50 +01:00
elsid
4186ca6ceb
Fix clang-analyzer-security.ArrayBound warning
Size of an array is not a valid index.

components/esm4/reader.cpp:925:15: error: Out of bound access to memory after the end of 'sGroupType' [clang-analyzer-security.ArrayBound,-warnings-as-errors]
  925 |         ss << sGroupType[std::min<std::size_t>(type, std::size(sGroupType))]; // avoid out of range
      |               ^
components/esm4/reader.cpp:627:13: note: Assuming field 'groupSize' is equal to field 'recHeaderSize'
  627 |         if (mCtx.recordHeader.group.groupSize == (std::uint32_t)mCtx.recHeaderSize)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:627:9: note: Taking true branch
  627 |         if (mCtx.recordHeader.group.groupSize == (std::uint32_t)mCtx.recHeaderSize)
      |         ^
components/esm4/reader.cpp:634:17: note: Assuming the condition is true
  634 |             if (!mCtx.groupStack.empty()) // top group may be empty (e.g. HAIR in Skyrim)
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:634:13: note: Taking true branch
  634 |             if (!mCtx.groupStack.empty()) // top group may be empty (e.g. HAIR in Skyrim)
      |             ^
components/esm4/reader.cpp:638:17: note: Calling 'Reader::exitGroupCheck'
  638 |                 exitGroupCheck();
      |                 ^~~~~~~~~~~~~~~~
components/esm4/reader.cpp:650:13: note: Assuming the condition is false
  650 |         if (mCtx.groupStack.empty())
      |             ^~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:650:9: note: Taking false branch
  650 |         if (mCtx.groupStack.empty())
      |         ^
components/esm4/reader.cpp:655:16: note: Assuming 'lastGroupSize' is <= field 'second'
  655 |         while (mCtx.groupStack.back().second >= lastGroupSize)
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:655:9: note: Loop condition is true.  Entering loop body
  655 |         while (mCtx.groupStack.back().second >= lastGroupSize)
      |         ^
components/esm4/reader.cpp:663:17: note: Assuming 'overshoot' is <= 0
  663 |             if (overshoot > 0)
      |                 ^~~~~~~~~~~~~
components/esm4/reader.cpp:663:13: note: Taking false branch
  663 |             if (overshoot > 0)
      |             ^
components/esm4/reader.cpp:676:17: note: Assuming the condition is false
  676 |             if (mCtx.groupStack.empty())
      |                 ^~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:676:13: note: Taking false branch
  676 |             if (mCtx.groupStack.empty())
      |             ^
components/esm4/reader.cpp:682:17: note: Assuming 'lastGroupSize' is >= field 'second'
  682 |             if (lastGroupSize < mCtx.groupStack.back().second)
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:682:13: note: Taking false branch
  682 |             if (lastGroupSize < mCtx.groupStack.back().second)
      |             ^
components/esm4/reader.cpp:686:17: note: Assuming 'lastGroupSize' is < field 'second'
  686 |             if (mCtx.groupStack.back().second > lastGroupSize) // FIXME: debugging only
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:686:13: note: Taking true branch
  686 |             if (mCtx.groupStack.back().second > lastGroupSize) // FIXME: debugging only
      |             ^
components/esm4/reader.cpp:687:30: note: Calling 'printLabel'
  687 |                 std::cerr << printLabel(mCtx.groupStack.back().first.label, mCtx.groupStack.back().first.type)
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
components/esm4/reader.cpp:925:15: note: Access of 'sGroupType' at index 12, while it holds only 12 'class std::basic_string_view<char>' elements
  925 |         ss << sGroupType[std::min<std::size_t>(type, std::size(sGroupType))]; // avoid out of range
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2025-11-25 00:03:39 +01:00
jvoisin
472240526d Merge branch 'fix_niftest_afl_findings' into 'master'
Fix AFL findings in niftest

See merge request OpenMW/openmw!4988
2025-11-24 21:41:46 +00:00
Alexei Kotov
93c4424f91 Merge branch 'werewolf-lua-api' into 'master'
Add Lua API for werewolf state management

See merge request OpenMW/openmw!4940
2025-11-24 23:48:23 +03:00
Alexei Kotov
1918c81e4d Bump Lua API revision 2025-11-24 23:46:48 +03:00
Nova
87dc3cd0e8 Enforced local scripts can only modify self.
Updated documentation to use self and player in examples.
2025-11-24 23:45:53 +03:00
Nova
5a76783616 Added documentation. 2025-11-24 23:45:53 +03:00
Nova
dcbda0cbaa Forgot the luamanagerimp.hpp include. 2025-11-24 23:45:53 +03:00
Nova
96ab0752db Add Lua API for werewolf state management
Adds a new function to force the player or NPCS to turn into a werewolf.
- setWerewolf(bool): Transform a PC or NPC into/out of werewolf form

This enables modders to control werewolf transformations

Useage Example:

-- Turn player into werewolf
types.NPC.setWerewolf(self, true)
2025-11-24 23:45:52 +03:00
Alexei Kotov
0d4bff8ad6 Merge branch 'data-mw' into 'master'
Move Morrowind mechanics to data-mw

See merge request OpenMW/openmw!4937
2025-11-24 21:24:10 +03:00
Alexei Kotov
f0b7fec7bb Bump Lua API revision 2025-11-24 21:22:40 +03:00
Evil Eye
b4018b1962 Absorb changes from !4996 2025-11-24 17:59:50 +01:00
Evil Eye
dcde01dee9 Note that getArmorSkill can return nil 2025-11-24 17:45:07 +01:00
Evil Eye
f8ef80c522 Rename builtin template 2025-11-24 17:45:07 +01:00
Evil Eye
a501e1ad1c Workaround a cmake/ninja issue 2025-11-24 17:45:07 +01:00
Evil Eye
e66d43c083 Reduce the diff 2025-11-24 17:45:07 +01:00
Evil Eye
10c96ff68d Use configure_file substitution 2025-11-24 17:45:07 +01:00
Evil Eye
c6c515f770 Make ATTACK_SOURCE_TYPES read only 2025-11-24 17:45:07 +01:00
Evil Eye
189eff7a49 Use cmake to create vfs-mw/builtin.omwscripts 2025-11-24 17:45:07 +01:00
Evil Eye
e978c230dc Override functions by shallow copying the interface instead of overriding files 2025-11-24 17:45:07 +01:00
Evil Eye
7928930435 Move Morrowind mechanics to data-mw 2025-11-24 17:45:05 +01:00
Evil Eye
2a63ec6af6 Merge branch 'lua-docs-grammar-fixes' into 'master'
Lua docs: minor grammar fixes (mostly missing articles)

See merge request OpenMW/openmw!4996
2025-11-24 16:40:28 +00:00
Johannes Dickenson
dfc1345a63 Lua docs: minor grammar fixes (mostly missing articles) 2025-11-24 16:40:27 +00:00
Alexei Kotov
422e1135e9 Merge branch 'master' into 'master'
Update file events.rst

See merge request OpenMW/openmw!5014
2025-11-24 13:27:16 +03:00
Evil Eye
f8374f2ff0 Merge branch 'fix-8705' into 'master'
Feature #8705: Use texture-based LUT for moddable global map colors

See merge request OpenMW/openmw!4932
2025-11-23 20:54:11 +00:00
Andrzej Głuszak
1bc95605ce Feature #8705: Use texture-based LUT for moddable global map colors 2025-11-23 20:54:11 +00:00
Alexei Kotov
c687a21ccb Merge branch 'enum_naming' into 'master'
Fix and enforce enum naming (#8424)

See merge request OpenMW/openmw!4986
2025-11-23 22:36:23 +03:00
Alexei Kotov
b571835695 Merge branch 'fix_nif_bhk_ragdoll_template' into 'master'
Use proper type for bhkRagdollTemplate::mBones

See merge request OpenMW/openmw!5013
2025-11-23 22:17:12 +03:00
ComeBESNIER
ec81e3b4a6 Edit events.rst
Add a space between `amount` and `=` for stylistical reasons.
2025-11-23 13:42:05 +00:00
elsid
7e1c1e8625
Use proper type for bhkRagdollTemplate::mBones 2025-11-23 13:21:41 +01:00
elsid
246759ecd2
Only reserve capacity when reading collections
But do not initialize. If the meta information is invalid and has a big
value, initialization will take significant amount of time but there
might be no actual data in the file because it's too small.
2025-11-23 13:17:00 +01:00
elsid
434f450778
Check Nif::RecordPtrT in debug builds
To verify class invariant.
2025-11-23 13:17:00 +01:00
elsid
0c2164330b
Use at instead of operator[] to access nif record types
To fix crash on out of bounds access.
2025-11-23 13:17:00 +01:00
elsid
20c388a410
Replace asserts by exceptions in RecordPtrT
It's possible to fail when reading nif file.
2025-11-23 13:17:00 +01:00
elsid
aa4caae2bf
Use proper naming for Nif::RecordPtrT index 2025-11-23 13:16:59 +01:00
elsid
e882c1c722
Check if nif stream has requested amount of data
Memory allocation with initialization may take significat amount of time
if meta information does not match actual content.
2025-11-23 13:16:59 +01:00
elsid
1ae0aadfed
Use fail function to verify nif stream state
If there is a failure to read the file like incomplete read, bad returns
false, but fail returns true. This is important for reading number of
items more than the file actually has.
2025-11-23 13:16:59 +01:00
Alexei Kotov
b49b048f72 Merge branch 'warn-baby-warn-warning-inferno' into 'master'
Warning inferno - fix warnings, then fix warnings

Closes #8674

See merge request OpenMW/openmw!4927
2025-11-23 15:01:53 +03:00
Alexei Kotov
46e0369fee Merge branch 'fix_benchmark_distribution' into 'master'
Use uniform_real_distribution for agent half extents

See merge request OpenMW/openmw!5005
2025-11-23 15:00:08 +03:00
Alexei Kotov
3abc719aa6 Merge branch 'fix_msvc_warnings' into 'master'
Fix C4244 in navmeshtilescache benchmark

See merge request OpenMW/openmw!5011
2025-11-23 14:48:19 +03:00
ComeBESNIER
ac7cc4c9ea Update file events.rst 2025-11-23 09:16:55 +00:00
elsid
d4ce5a2ac6
Fix and enforce enum naming 2025-11-22 11:19:18 +01:00