Evil Eye
b91be1e803
Catch exceptions in ResolutionListener
2021-04-11 14:12:31 +02:00
psi29a
301411c5c5
Merge branch 'esm_variant' into 'master'
...
Use std::variant for ESM::Variant implementation
See merge request OpenMW/openmw!719
2021-04-10 12:53:11 +00:00
psi29a
603e4206fd
Merge branch 'teleport_here_not_there' into 'master'
...
Fix #5919 (and another bug)
Closes #5919
See merge request OpenMW/openmw!722
2021-04-10 12:51:42 +00:00
Andrei Kortunov
f984e96b34
Use conventional names for atan2 arguments
2021-04-10 12:23:03 +04:00
Andrei Kortunov
1db369f418
Do not use unchecked value in calculations
2021-04-10 11:26:54 +04:00
Andrei Kortunov
903b89a0ff
Add bound for UI scale factor, as it specified in docs
2021-04-10 11:21:53 +04:00
Andrei Kortunov
c989fac67b
Add bound for pointers cache size, as it specified in docs
2021-04-10 11:20:12 +04:00
Andrei Kortunov
124a33d8a3
Fix uninitialized variables
2021-04-10 10:58:00 +04:00
Andrei Kortunov
b96929f3fc
Avoid division by zero
2021-04-10 09:52:46 +04:00
fredzio
8874a5be22
Change (again) the way SetPos behave.
...
Instead of registering the desired change of position and rely on
physics simulation to apply it to the world, immediately change the
position in the world without reset the simulation.
2021-04-09 23:34:03 +02:00
fredzio
6e1c67a9ae
Account for waterwalking when updating position. Otherwise we might
...
trace down the actor at waterlevel at the wrong coordinate.
Triggered by multimark mod with waterwalking effect.
2021-04-09 23:33:21 +02:00
psi29a
484c46cb58
Merge branch 'hrtf-setting' into 'master'
...
Add Audio settings to openmw-launcher
See merge request OpenMW/openmw!692
2021-04-09 19:28:08 +00:00
Simon Meulenbeek
75b4871bab
Add Audio settings to openmw-launcher
2021-04-09 19:28:08 +00:00
Jonas Tobias Hopusch
799cf16f31
Attempt to fix #5942
...
Closes OpenMW/openmw#5942
This is an attempt to apply the fix suggested by @Capostrophic
2021-04-09 18:16:05 +02:00
psi29a
fe2a97ee39
Merge branch 'wizard-link' into 'master'
...
Implement #3983 - Add page to the wizard with links to buy morrowind
Closes #3983
See merge request OpenMW/openmw!693
2021-04-08 20:57:50 +00:00
tess
6f7e8d9f59
Implement #3983 - Add page to the wizard with links to buy morrowind
2021-04-08 20:57:50 +00:00
psi29a
4f86eddc96
Merge branch 'CreateBsaAddFileToBsa' into 'master'
...
Create BSA, add file to existing BSA
See merge request OpenMW/openmw!718
2021-04-08 20:00:15 +00:00
elsid
8e1c92d9af
Use std::variant for ESM::Variant implementation
2021-04-08 19:39:31 +02:00
elsid
7f577f5f08
Do not compare hash in tests
...
Different std libraries have different implementation that produce different
results for the same values.
2021-04-08 19:39:30 +02:00
psi29a
a16387df61
Merge branch 'sky-dehardcode' into 'master'
...
De-hardcode references to mesh files used by the sky.
See merge request OpenMW/openmw!704
2021-04-08 16:32:39 +00:00
Matjaž Lamut
2cb4b62b83
De-hardcode references to mesh files used by the sky.
2021-04-08 16:32:38 +00:00
CedricMocquillon
d617d66a87
Add file to BSA
2021-04-08 18:08:28 +02:00
psi29a
8cb3681c12
Merge branch 'esm_variant_tests' into 'master'
...
Add tests for ESM::Variant
See merge request OpenMW/openmw!712
2021-04-08 13:32:07 +00:00
Evil Eye
44f2cb0923
Fix targeted scripts losing their targets when rearranging your load order
2021-04-07 17:30:21 +02:00
Andrei Kortunov
59720aea9a
Restore old aiming for melee combat
2021-04-07 12:07:03 +04:00
psi29a
9aa5aef2c6
Merge branch 'my_other_mr_is_larger' into 'master'
...
Make AddItem's quantity overflow on negative numbers
Closes #5934
See merge request OpenMW/openmw!713
2021-04-05 11:45:31 +00:00
elsid
bd33fa76b6
Use CRTP to define CustomData clone function
2021-04-05 11:53:07 +02:00
elsid
e380470558
Add move ctor and assignment operator to RefData
2021-04-05 11:53:07 +02:00
elsid
045bb7cbd7
Store CustomData and ContainerStore as unique_ptr
2021-04-05 11:52:52 +02:00
Evil Eye
ecde3932e2
Make AddItem's quantity overflow on negative numbers
2021-04-05 09:43:37 +02:00
elsid
dae3f022ba
Add tests for ESM::Variant
2021-04-04 23:09:50 +02:00
fredzio
9cae7882dd
Fix a bug that was triggered with multi mark mod.
...
When a script calls SetPos for x,y,z in sequence on an actor, we need to make sure
that the actor will not spawn under ground at x,y coordinates.
Now that change of coordinates are cumulated and applied all at once, we
need to account for the whole offset.
To this end move the terrain height check inside of Actor class.
2021-03-31 19:34:06 +02:00
fredzio
0fac172413
Remove wrong line that slipped in yesterday.
2021-03-29 21:46:08 +02:00
Andrei Kortunov
50352daf90
Rework knockdown and knockout animations fallbacks
2021-03-29 14:45:07 +04:00
Evil Eye
582f1503c1
Merge branch 'setpos' into 'master'
...
Unbreak SetPos and the mods using it (#5919 )
See merge request OpenMW/openmw!696
2021-03-28 20:14:17 +00:00
fredzio
7a67492d81
Unbreak SetPos and the mods using it.
...
To make SetPos works with async physics, it was modified to register a
position offset that would be applied to the real position during the
simulation.
A common pattern to teleport NPC in scripts is a sequence of SetPos/Disable/Enable in the same frame.
Since Disable/Enable creates a new physics actor using last known
RefData::Position, the registered offset never get a chance to be applied.
Modify disable() to call moveObject with the offset applied, so that the newly created physics actor will have up-to-date position
2021-03-28 21:19:14 +02:00
fredzio
b58244ac26
Guard the Bullet drawing method with a read lock on the
...
btCollisionWorld. It closes a race on the collision shapes coordinates.
2021-03-26 23:49:31 +01:00
fredzio
dbd6e3bfee
Replace pointless usage of shared_ptr by unique_ptr / non-owning raw
...
pointer for btCollisionWorld.
2021-03-26 23:49:31 +01:00
fredzio
ccd3cbc69a
Use saved actor position instead of reading again RefData in unstuck. It
...
is a race condition to do so.
2021-03-26 23:49:31 +01:00
Andrei Kortunov
5fce5b12f4
Merge branch 'drop_the_bird' into 'master'
...
Disallow inserting containers, creatures, and npcs from the save game not present in content files
Closes #5884
See merge request OpenMW/openmw!683
2021-03-26 15:48:17 +00:00
Andrei Kortunov
b61337643e
Merge branch 'issue-5680' into 'master'
...
change aim calculation
See merge request OpenMW/openmw!685
2021-03-26 11:43:20 +00:00
Max
2cd96e56d5
create constant and use constant in other parts of the code base
2021-03-24 14:54:46 -07:00
Max
e56efdd562
change aim calculation
2021-03-24 14:54:46 -07:00
elsid
453e94ea9f
Use half extents for destination distance tolerance in AiEscort
...
For actors moving in water destination may be located at such z coordinate
that they can't reach.
2021-03-24 00:07:28 +01:00
elsid
f32e1790bc
Add half extents to AiEscord max distance
...
For actors with big bounding box given constants may not work properly like
it's not possible to get close enough to actor from a given angle to make it
move.
2021-03-23 23:49:57 +01:00
elsid
39c0ce9ddf
Build limited path for far destinations
...
When distance between start and end point is greater than max radius of area
possibly covered by navmesh there is no way to find path via navmesh. Also if
distance is greater than cell size navmesh might not exists withing mentioned
area because cell is not loaded therefore navmesh is not generated. So minumum
of these values is used to limit max path distance. Assuming that path
actually exists it's possible to build path to the edge of a circle. When
actor reaches initial edge path is built further. However it will not be
optimal.
2021-03-23 23:23:12 +01:00
Evil Eye
cf5a93d712
Also run NPC validation for modified base records
2021-03-23 21:07:57 +01:00
Evil Eye
e79036f4e0
Don't erase the player
2021-03-23 20:43:52 +01:00
psi29a
1af50b7e23
Merge branch 'sound_cleanup' into 'master'
...
Sound cleanup
See merge request OpenMW/openmw!567
2021-03-22 21:42:01 +00:00
psi29a
415591b7ed
Merge branch 'ai_reaction_deviation' into 'master'
...
Distribute AI reactions and engage combat calls over time
See merge request OpenMW/openmw!674
2021-03-22 21:37:09 +00:00
Evil Eye
5e1960a76a
Disallow inserting containers, creatures, and npcs from the save game not present in content files
2021-03-22 22:29:10 +01:00
Evil Eye
8e9bd5c0bd
Don't throw an exception when equipping a bound item fails
2021-03-22 20:44:13 +01:00
Evil Eye
580fa78034
Don't purge summon effects with invalid creature ids
2021-03-22 20:43:34 +01:00
wareya
63f01d8c5f
Prevent physics death spiral by falling back to true delta time when needed
2021-03-21 20:45:46 +00:00
psi29a
86bd173d69
Merge branch 'refactoring' into 'master'
...
"static const" -> "static constexpr" in headers
See merge request OpenMW/openmw!676
2021-03-21 15:43:47 +00:00
Petr Mikheev
7bbbe40abe
"static const" -> "static constexpr" in headers
2021-03-21 13:57:54 +01:00
wareya
e722c99e62
forgot to initialize these variables
2021-03-21 08:57:15 -04:00
wareya
40265bf118
make unstucking slightly smarter (can turn itself off, also acts like flat ground)
2021-03-20 21:14:56 -04:00
elsid
62c0ecbbd0
Separate engage combat timer for each actor
...
Use DeviatingPeriodicTimer to distribute calls over time. This reduces
stuttering and make AI more natural.
2021-03-20 14:50:56 +01:00
elsid
675c0ab72f
Apply uniform random deviation to AI reaction timer
...
This allows to distribute AI reaction calls over time.
Before this change actors appearing at the same frame will react in the same
frame over and over because AI reaction period is constant. It creates a
non-uniform CPU usage over frames. If a single frame has too many AI reactions
it may cause stuttering when there are too many actors on a scene for current
system.
Another concern is a synchronization of actions between creatures and NPC.
They start to go or hit at the same frame that is unnatural.
2021-03-20 14:47:54 +01:00
Andrei Kortunov
54daa234bd
Reset watched stats upon reload or new game start
2021-03-19 11:56:14 +04:00
wareya
1471ef003a
fix async physics interpolation
2021-03-18 13:53:00 -04:00
AnyOldName3
162b25c180
Fix sunglare on Mesa
...
The sunglare works by comparing an occlusion query with depth testing on
against one with depth testing off to determine if there's anything
closer to the camera than the maximum depth buffer value. For the depth-
tested query, the depth range is set from 1 to 1 so it's always drawn at
the maximum distance. Originally, we had the depth function set to LESS,
meaning that the query would always fail as 1 is not less than 1, but
also glPolygonOffset was used to move the query by "the smallest value
that is guaranteed to produce a resolvable offset for a given
implementation" closer to the camera. While other driver and hardware
combinations do that, Mesa seems to be clamping to the depth range, so
still failing.
Instead, it's simpler to just get rid of the polygon offset and change
the depth test to LEQUAL as 1 *is* less than or equal to 1, but not than
any other possible depth buffer value.
2021-03-17 01:46:04 +00:00
Evil Eye
d1e8c6b223
Merge branch 'magical_rat' into 'master'
...
Register copied Spells with SpellList
See merge request OpenMW/openmw!662
2021-03-16 19:50:15 +00:00
AnyOldName3
ba74fbf30e
Fix MyGUI log
...
Also actually print an error to the regular log when the MyGUI log can't
be opened so we notice if we kill it again in under five years.
2021-03-15 22:35:13 +00:00
Bret Curtis
40c989d732
allman style
2021-03-14 22:11:18 +01:00
Evil Eye
c2580d60e9
Register copied Spells with SpellList
2021-03-14 19:32:03 +01:00
Bret Curtis
9fc0649fb6
a better check to avoid the mCell assertion, so compariing nullptr to current cell will refurn false anyway
2021-03-14 18:08:52 +01:00
Bret Curtis
49545e6d29
add comments as to why we need to check that the player is grounded or not; only run once during initial cell loading
2021-03-14 18:02:48 +01:00
Bret Curtis
fff1df9ee4
revert some blank lines
2021-03-14 18:02:48 +01:00
Bret Curtis
c067782814
proper fix that traces down the player when a cell is loaded; we also only run once if the current cell being loaded is the one that the player is in.
2021-03-14 18:02:48 +01:00
Bret Curtis
1479f98793
hacky solution with debug; seems that player is added before cell so tracing down will not find anything
2021-03-14 18:02:48 +01:00
Bret Curtis
19ad7d7f0c
Resolve #5895 by setting the initial mOnGround state to false; we do this because the movement solver runs one frame behind so when we run through the loop the first time we assume we are on the ground even though we may be 400 units in the air.
2021-03-14 18:02:48 +01:00
psi29a
514a55ed4c
Merge branch 'fix_5846' into 'master'
...
Fix #5846 (headtracking)
Closes #5846
See merge request OpenMW/openmw!652
2021-03-14 01:56:07 +00:00
glassmancody.info
6255b0492b
Resolve crashes on exit with visible MyGUI widgets
2021-03-13 15:43:46 -08:00
Petr Mikheev
447c3b9489
Fix 5846
2021-03-13 21:54:49 +01:00
elsid
9275dd2dcb
Avoid virtual dispatch in SoundManager dtor
2021-03-13 18:25:56 +01:00
elsid
b0311ce9f1
Remove DEFAULT_OUTPUT macros
2021-03-13 18:25:56 +01:00
elsid
e30a59772c
Remove DEFAULT_DECODER macros
2021-03-13 18:25:48 +01:00
Evil Eye
4db2f79a3c
Merge branch 'setpos' into 'master'
...
Use relative movement inside of SetPos
See merge request OpenMW/openmw!649
2021-03-13 12:58:48 +00:00
fredzio
cb39f8fb01
Use moveObjectBy in SetPos
2021-03-13 09:53:21 +01:00
fredzio
03b86c232b
Apply the position offset even if the simulation is not performed
...
because we're too fast.
2021-03-13 09:52:05 +01:00
psi29a
311b497491
Merge branch 'bullet-heightfield-floats' into 'master'
...
Avoid heightfield conversion in newer Bullet
See merge request OpenMW/openmw!647
2021-03-13 08:32:01 +00:00
psi29a
cc6f08930b
Merge branch 'alpha-meddling' into 'master'
...
Replace deprecated alpha test in shader visitor
Closes #4899
See merge request OpenMW/openmw!473
2021-03-13 08:13:19 +00:00
AnyOldName3
0431ba4c87
Merge branch 'alpha-meddling-shader-side-mip-meddling' into alpha-meddling
2021-03-13 01:23:30 +00:00
AnyOldName3
f09b0fc1bd
Put groundcover alphafunc where shader visitor can see it
...
I'd already made this change so don't know why it disappeared instead of
being included in b8ee32e3
2021-03-12 17:21:36 +00:00
Gleb Mazovetskiy
351d11449b
Avoid heightfield conversion in newer Bullet
...
Takes advantage of the direct `float` support implemented in
https://github.com/bulletphysics/bullet3/pull/3293
2021-03-11 23:52:12 +00:00
Andrei Kortunov
39b7260ab4
Fix a crash during new game
2021-03-11 11:46:44 +04:00
AnyOldName3
64ddb4c1b0
Fix linking on MacOS
2021-03-11 01:01:55 +00:00
psi29a
9f47190411
Merge branch 'now-it-blends' into 'master'
...
Convert blending factors properly for the character preview
See merge request OpenMW/openmw!644
2021-03-10 23:27:04 +00:00
AnyOldName3
cb2cbb4181
Convert blending factors properly for the character preview
2021-03-10 22:07:14 +00:00
Chris Djali
9bfe941d4b
Merge pull request #3050 from akortunov/master
...
Double-buffer shader water stateset
2021-03-10 15:56:40 +00:00
Andrei Kortunov
38679013fe
Give meaningful name to the mEffectFade
2021-03-10 19:10:17 +04:00
Gleb Mazovetskiy
1db7d2ec4e
Restore compatibility with FFMpeg < 57.80.100
...
This should fix macOS Travis build broken by 58d33aa95b
2021-03-08 19:29:34 +00:00
AnyOldName3
deb184cdce
Merge branch 'fix-build' into 'master'
...
Fix linking with `-DOPENMW_USE_SYSTEM_OSG=ON -DOSG_STATIC=ON`
See merge request OpenMW/openmw!640
2021-03-08 19:01:02 +00:00
psi29a
611a63acc6
Merge branch 'threesacharm' into 'master'
...
Attempt to fix restocking items in old saves
Closes #5823
See merge request OpenMW/openmw!580
2021-03-08 10:45:13 +00:00
psi29a
194875dec1
Merge branch 'fix-video-arm' into 'master'
...
osg-ffmpeg-videoplayer: Fix crash on ARM
Closes #5807
See merge request OpenMW/openmw!564
2021-03-08 08:05:25 +00:00
Andrei Kortunov
d805886de7
Double-buffer shader water stateset (bug #5026 )
2021-03-08 10:58:51 +04:00
Gleb Mazovetskiy
58d33aa95b
AV: Fix all memory leaks
...
The most substantial memory leak came from `PacketQueue::get`
not unreferencing its argument packet.
Other leaks came from using `av_free` instead of type-specific free
functions.
Also modifies `PacketQueue::put` for readability.
2021-03-08 03:16:55 +00:00
Chris Djali
213525c372
Merge pull request #3049 from akortunov/master
...
Use correct mCursorActive flag initial value
2021-03-07 15:35:38 +00:00