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

13006 commits

Author SHA1 Message Date
Andrei Kortunov
651ad11ad8 Do not leave variables without initialization, even in execution paths where they are unused 2021-04-19 16:08:10 +04:00
Andrei Kortunov
9647b670e4 Do not declare unused variables 2021-04-19 15:43:00 +04:00
Andrei Kortunov
0cadc97fb3 Fix double -> float conversions 2021-04-19 15:36:58 +04:00
Bret Curtis
befa3f587f
Merge pull request #3068 from akortunov/master
Clean up MSVC warnings
2021-04-19 09:27:17 +02:00
AnyOldName3
ce3ed28403 Control stomping via settings. 2021-04-18 21:44:23 +01:00
Alexei Dobrohotov
b29e797b27 Merge branch 'seventh_time_is_the_charm' into 'master'
Unbreak again NPC teleport

See merge request OpenMW/openmw!760
2021-04-18 16:36:11 +00:00
Petr Mikheev
5fe10e8e7f Merge branch 'fix-headtracking' into 'master'
Fix headtracking while invisible

See merge request OpenMW/openmw!743
2021-04-18 10:54:57 +00:00
Jacob Turnbull
f49b9e3806 Fix headtracking while invisible 2021-04-18 10:54:56 +00:00
fredzio
36bb2d5f15 An actor needs not be in active cell. As such we can't use
PhysicsSystem::getActor() to determine that a ptr is not actor.
2021-04-18 08:45:43 +02:00
Andrei Kortunov
987b231fdd Fix an another portion of Coverity warnings 2021-04-18 07:09:44 +04:00
Andrei Kortunov
f308dde254 Clean up MSVC warnings 2021-04-17 12:14:50 +04:00
Andrei Kortunov
57b501ad13
Merge pull request #3067 from akortunov/master
Limit pointers cache size to avoid possible bad_alloc errors
2021-04-17 10:31:47 +04:00
psi29a
d0883f9a0d Merge branch 'light_settings_tweak' into 'master'
Lighting patch

Closes #5957 and #5959

See merge request OpenMW/openmw!752
2021-04-16 19:47:26 +00:00
glassmancody.info
16856d45c5 Lighting Patch
Fixes build errors with older OSG builds and some issues with 'shared' layout.
Bring back ambient in inventory through lightmodel instead of sun ambient, mirrors scene ambient/sunlight relationship.
Forces shaders when certain lighting methods are enabled and finalize settings.
Correctly override sun for localmap.
2021-04-16 11:55:40 -07:00
fredzio
f137b7341f Another fallout from MR 722: objects were treated like actors by
accident. Net effect was that calls to Move/MoveWorld didn't update
position of collision object.
2021-04-16 16:12:31 +02:00
Andrei Kortunov
5de72c94ab Limit pointers cache size to avoid possible bad_alloc errors 2021-04-16 08:10:31 +04:00
psi29a
af8bc7d120 Merge branch 'fixagainsetposforgoodthistimeitwillnotbreakanything' into 'master'
Fix #5961: Follow up MR 722: do not apply mPositionOffset twice when we teleport.

Closes #5961

See merge request OpenMW/openmw!744
2021-04-15 22:09:44 +00:00
fredzio
e31cf7e6ac Follow up MR 722: do not apply mPositionOffset twice when we teleport.
Previous MR change the meaning of mPositionOffset: it is now just a log
of relative movement that were already applied to allow the physics
simulation to catch up, instead of changes that needs to be applied. As
such, after a teleport we need to reset it. Also, since mWorldPosition
is already with the offset we should not update its value in
applyPositionOffset().
2021-04-15 22:32:42 +02:00
Andrei Kortunov
33b8233887 Validate GUI scaling and place it to the launcher 2021-04-15 15:18:32 +04:00
Andrei Kortunov
db1428de18 Move container unresolving to the separate method 2021-04-14 23:03:35 +04:00
fredzio
9d8fcec642 Remove bogus warning. It is a normal situation for projectiles to be
in-flight after the caster is gone.
2021-04-14 09:01:37 +02:00
elsid
0fae6d9a0a
Add walk and swim flags when corresponding speed is positive
This allows to avoid finding path over area that will should have infinite
cost (area_cost = area_cost_factor / area_speed).
2021-04-13 23:27:18 +02:00
elsid
3c4a9069ae
Do not use infinite area cost
Division by zero causes float value to be infinite. When infinite cost is
multiplied by zero distance the result is NaN. After this pathfinding algorithm
state is broken.
2021-04-13 23:27:18 +02:00
psi29a
f1cfdafd4d Merge branch 'why_are_the_christmas_lights_still_up' into 'master'
Remove 8 light limit and add configurable lighting enhancements

See merge request OpenMW/openmw!618
2021-04-13 19:15:08 +00:00
glassmancody.info
531a6e1979 Code review fixes, remove implicit GLSL casts 2021-04-13 11:09:54 -07:00
glassmancody.info
582f7b52cf Merge remote-tracking branch 'upstream/master' into why_are_the_christmas_lights_still_up 2021-04-13 11:09:52 -07:00
glassmancody.info
9e80091aff clear up force shaders and make it less convoluted 2021-04-13 11:09:49 -07:00
glassmancody.info
b7adb9d088 use true default settings 2021-04-13 11:09:49 -07:00
glassmancody.info
16f80ec6f3 Update settings when using fallback 2021-04-13 11:09:49 -07:00
glassmancody.info
4ba473b684 Finalize settings, torch fix 2021-04-13 11:09:49 -07:00
glassmancody.info
71c30a31df in-game settings, some require restart 2021-04-13 11:09:49 -07:00
glassmancody.info
3d713e8602 Fix incorrect minimum ambient 2021-04-13 11:09:49 -07:00
glassmancody.info
280fd2b162 Merge remote-tracking branch 'upstream/master' into why_are_the_christmas_lights_still_up 2021-04-13 11:09:35 -07:00
glassmancody.info
cc31e1eea1 Ambient luminance threshold setting 2021-04-13 11:09:35 -07:00
glassmancody.info
690995988b More formatting, OpenCS cells are unbroken 2021-04-13 11:09:35 -07:00
glassmancody.info
142c6d2993 Enable groundcover lighting for non FFP 2021-04-13 11:09:35 -07:00
glassmancody.info
328ec85757 Code review cleanup, add setting documentation 2021-04-13 11:09:35 -07:00
glassmancody.info
7370acdf54 Merge remote-tracking branch 'upstream/master' into why_are_the_christmas_lights_still_up 2021-04-13 11:09:19 -07:00
glassmancody.info
43ac32921c Rewrite, support different lighting methods 2021-04-13 11:09:19 -07:00
glassmancody.info
9d9074c244 Add shared UBO 2021-04-13 11:07:48 -07:00
glassmancody.info
c5ea966f24 Merge remote-tracking branch 'upstream/master' into why_are_the_christmas_lights_still_up 2021-04-13 11:06:16 -07:00
glassmancody.info
dda735c54a initial commit 2021-04-13 11:06:16 -07:00
psi29a
0a6ef9c1bd Merge branch 'swim_when_follow' into 'master'
Allow actors to find path over water surface (#5943)

See merge request OpenMW/openmw!731
2021-04-13 07:19:54 +00:00
Evil Eye
56ede535b5 Don't perform a hit test outside the page's bounds 2021-04-12 08:31:45 +02:00
psi29a
0818a10df2 Merge branch 'baby_dont_throw_me_no_more' into 'master'
Catch exceptions in ResolutionListener

Closes #5946

See merge request OpenMW/openmw!727
2021-04-12 06:12:19 +00:00
elsid
28fc21792e
Allow water walking actors to find path over water surface 2021-04-11 21:59:28 +02:00
elsid
634556be9d
Add setting to allow following creatures to find path over water surface 2021-04-11 21:59:28 +02:00
fredzio
32981bcd88 Constify a few things 2021-04-11 14:46:51 +02:00
fredzio
efb241f1de Use override instead of virtual 2021-04-11 14:46:51 +02:00
fredzio
fda639eb57 Remove unused forward declarations 2021-04-11 14:46:51 +02:00
Evil Eye
b91be1e803 Catch exceptions in ResolutionListener 2021-04-11 14:12:31 +02: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
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
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
Jacob Turnbull
d9376ee08e Trim down comment and change flag name 2021-04-07 16:57:06 -05: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
Jacob Turnbull
bc8db8b8f5 Fix for enchanted items being removed on item equip cycling when they are re-equipped 2021-04-06 20:12:51 -05: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
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