1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 21:35:24 +00:00

13388 Commits

Author SHA1 Message Date
Bo Svensson
c284d0cf5c
actoranimation.cpp faster getbonebyname (#3099) 2021-09-09 23:04:38 +02:00
Bo Svensson
147ed39900
This PR solves a crash with Robert's bodies logged on your bugtracker. (#3095)
* attach.cpp [ci skip]

* attach.cpp [ci skip]

* attach.cpp [ci skip]

* npcanimation.cpp [ci skip]

* attach.hpp [ci skip]

* attach.cpp [ci skip]

* creatureanimation.cpp [ci skip]

* creatureanimation.cpp [ci skip]

* cellpreloader.cpp

* npcanimation.cpp

* attach.cpp

* make android adk happy

* make android adk happy

* changelog.md [ci skip]

* authors.md [ci skip]
2021-09-09 22:56:57 +02:00
elsid
6b7434ca69
Pass std::string_view instead of const std::string&
* Starting with Actor::getBodyPartMesh and ending with
  Misc::StringUtils::ciEqual.
* Add tests for Misc::StringUtils::ciEqual.
2021-09-09 18:39:50 +02:00
psi29a
149241daae Merge branch 'dead_animation_code_removal' into 'master'
Dead animation code removal

Closes #6264

See merge request OpenMW/openmw!1198
2021-09-08 10:07:54 +00:00
JanuarySnow
bdbc6c0cba Dead animation code removal 2021-09-08 10:07:54 +00:00
psi29a
4bf22f3ca0 Merge branch 'fix_pathgrid_path' into 'master'
Use pathgrid path when destination is closer to different graph component node

See merge request OpenMW/openmw!1155
2021-09-08 09:55:42 +00:00
elsid
605cb8db7c
Make sync terrain preloading sleep free
This reduces average time spent on in. 5 milliseconds as a base precision is
quite a lot considering that for 60 FPS frame time is 1000/16 = ~16.67 ms
when it's a cell loading frame and there is more important work to do rather
than sleeping.
2021-09-07 14:52:42 +02:00
psi29a
aef6ec464c Merge branch 'optimize_add_item' into 'master'
Optimize ContainerStore::stacks (attempt #2)

See merge request OpenMW/openmw!1200
2021-09-07 08:40:02 +00:00
elsid
403f0a72f0
Do not copy RefId when need to compare
Makes ContainerStore::stacks ~4x times faster when adding 4k different items
in a single frame.
2021-09-06 22:52:09 +02:00
elsid
e910dd7a25
Rename CellRef::getRefIdPtr -> getRefIdRef and return reference
Return value can't be nullptr. Pointer complicates the code because has to be
dereferenced.

Also move function definition to hpp to make it easier for compiler to optimize
calls.
2021-09-06 22:52:08 +02:00
elsid
b0f772af40
Define dependency to OSG plugins in one place
Each binary depending on components library requires OSG plugins to be linked.
Duplicating dependecies for each binary does not give benefits and brings
problems when new binary is added.
2021-09-06 22:44:52 +02:00
Frederic Chardon
7b26058fa5 moveObject() has side effects that might invalidate iterators from mActors. Instead of iterating over mActors, make a copy of needed data and iterate over the copies. 2021-09-06 12:51:25 +02:00
Petr Mikheev
76320aae45 Merge branch 'const_ret_val' into 'master'
Don't use `const` for objects returned by value.

See merge request OpenMW/openmw!1183
2021-09-04 12:41:52 +00:00
fredzio
d20730458d Replace std::map with std::unordered_map for mActors and mObjects.
Use Ptr.mRef as a key instead of Ptr: it is constant for the lifetime of
the object.
2021-09-03 13:14:05 +02:00
fredzio
0bce6c09e1 Change projectile behaviour to be like in vanilla wrt. water plane:
- enchanted arrow explode upon hit the water plane
- non enchanted arrow disappear (or more accurately, they hit nothingness)
- enchanted arrow shot underwater explode immediately
- non enchanted arrow disappear immediately

Also, solve a bug that occured previously and could theoritically still happens where we use the last tested collision position for instead of the last registered hit:
Use the hit position as saved inside Projectile::hit() instead of the last position saved inside the callback.
If a projectile collides with several objects (bottom of the sea and water surface for instance), the last collision tested won't necessarily be the impact position as we have no control over the order in which the tests are performed.
2021-09-03 10:24:05 +02:00
jvoisin
d4e3575f1d Don't use const for objects returned by value.
This prevents the usage of std::move semantics,
and makes clang-tidy sad.
2021-09-01 22:23:50 +02:00
fredzio
d1a5bc207b Iterate over mInactiveCells when unloading cells in TestCells / TestInteriorCells. Otherwise we dereference an invalid iterator after deactiveCell(). 2021-08-31 16:53:52 +02:00
elsid
0daf6f5d0b Merge branch 'comma' into 'master'
Don't use comma where there is no need to.

See merge request OpenMW/openmw!1179
2021-08-31 12:33:15 +00:00
Evil Eye
18f51e1026 Merge branch 'nonull' into 'master'
Don't pass a nullptr to a std::string constructor

See merge request OpenMW/openmw!1178
2021-08-30 18:59:06 +00:00
Evil Eye
06e1b17cc1 Merge branch 'unnecessary_copy' into 'master'
Dont copy-construct from a const-ref when used only as a const-ref

See merge request OpenMW/openmw!1184
2021-08-29 19:39:51 +00:00
jvoisin
db4fe11a44 Don't pass a nullptr to a std::string constructor
This is undefined behaviour.
2021-08-29 20:41:15 +02:00
jvoisin
deb2af6acc Dont copy-construct from a const-ref when used only as a const-ref
This also makes clang-tiny a bit happier
2021-08-29 20:22:34 +02:00
jvoisin
a15cca5763 Use reserve on vectors for fixed loops
This is a bit useless, but has the merit of appeasing clang-tiday
2021-08-29 20:18:49 +02:00
jvoisin
a6b1e38eab Don't use comma where there is no need to. 2021-08-29 14:12:14 +02:00
Evil Eye
b4486992f0 Allow Rieklings and Goblins to attack again 2021-08-28 10:45:00 +02:00
psi29a
d852b10227 Merge branch 'Map-door-markers-flicker-in-some-cells' into 'master'
Do not update doors markers at each frame, only when needed

Closes #6214

See merge request OpenMW/openmw!1168
2021-08-26 15:06:38 +00:00
psi29a
fff35dcb03 Merge branch 'Ignore-empty-pgrd' into 'master'
Do not store empty PGRD records.  Should resolve Issue #6209.

See merge request OpenMW/openmw!1121
2021-08-26 14:29:49 +00:00
psi29a
e8057d9fd1 Merge branch 'aipursue_path' into 'master'
Make AiPursue path destination to be as close as possible to target (#6211)

Closes #6211

See merge request OpenMW/openmw!1154
2021-08-26 07:55:12 +00:00
psi29a
b585aad81e Merge branch 'offset-bullet-debug' into 'master'
glPolygonOffset for Bullet debug geometry

See merge request OpenMW/openmw!684
2021-08-25 07:26:21 +00:00
psi29a
855f491196 Merge branch 'splintercell' into 'master'
Clean up text key extraction

See merge request OpenMW/openmw!1163
2021-08-22 14:51:54 +00:00
Alexei Dobrohotov
0922d0b105 Clean up text key extraction 2021-08-22 05:56:30 +03:00
Petr Mikheev
3771e523f1 More object bindings 2021-08-21 17:18:11 +02:00
Alexei Dobrohotov
31e70f2ecc Merge branch 'minor_factorisation' into 'master'
Minor factorisation in apps/openmw/mwmechanics/actors.cpp

See merge request OpenMW/openmw!1143
2021-08-21 06:22:17 +00:00
cc9cii
28ad139464 Check if deleted, just in case. 2021-08-21 07:20:10 +10:00
psi29a
77e58abf0d Merge branch 'lua_input' into 'master'
Lua package 'openmw.input'

See merge request OpenMW/openmw!1073
2021-08-20 11:44:42 +00:00
elsid
193be0d5d1 Merge branch 'some_small_changes' into 'master'
Fix coverity warning and build on some osg

See merge request OpenMW/openmw!1153
2021-08-19 23:40:14 +00:00
cc9cii
802a202455 Remove warning log messages as they are more suitable for OpenCS. 2021-08-19 12:45:09 +10:00
cc9cii
8244ba8957 Erase old record instead (i.e. assume an empty Pathgrid record was placed in purpose) 2021-08-19 12:31:49 +10:00
cc9cii
1d925154f2 Do not store (or worse, overwrite) empty PGRD records. Should resolve Issue #6209. 2021-08-19 12:31:49 +10:00
glassmancody.info
a6c7fcd436 don't pingpong depth function on character preview update 2021-08-18 15:46:25 -07:00
elsid
fea4fb6e69
Make AiPursue path destination to be as close as possible to target
Even when target is not reachable actor will try to run there either because
target navmesh polygon is selected within extended area or because partial path
is built to the closest possible polygon.
2021-08-18 23:44:36 +02:00
elsid
9112c65afc
Use pathgrid path when destination is closer to different graph component node
Partially revert d863267d5cb5f4062937f86c37af3b0c8f9479cf to restore 0.46
behaviour for pathgrid based pathfinding.
2021-08-18 19:52:10 +02:00
glassmancody.info
d63eb3325f fix coverity warning and build on some osg 2021-08-17 17:45:50 -07:00
psi29a
faa3e04494 Merge branch 'const_reff' into 'master'
Sprinkle some const-ref

See merge request OpenMW/openmw!1145
2021-08-17 08:20:13 +00:00
cc9cii
b1fb3e2313 Add missing includes. 2021-08-17 13:53:14 +10:00
cc9cii
47a841d3b7 Fix/workaround for Issue #3246
OpenMW save file assumes the presence of NPC/Creature data but the vanilla save file provides only the delta changes in most situations.  The base data are not available without loading all the relevant dependency content files.  Duplicating that code in the ESSImporter is not desirable.

Ideally a flag should be set but that will mean a change in the save file format.  For a minor change such as this doing so seems like an overkill.  So a temporary workaround is introduced where the gold carried by the NPC/Creature is used as an indicator as the lack of ACDT data.
2021-08-17 12:29:28 +10:00
jvoisin
39cd679ca9 Minor factorisation in apps/openmw/mwmechanics/actors.cpp 2021-08-16 13:13:44 +02:00
Alexei Dobrohotov
6c1ac9ed9f Merge branch 'init_sky' into 'master'
Use an initialization list in WrapAroundOperator's constructor

See merge request OpenMW/openmw!1146
2021-08-16 01:19:28 +00:00
Alexei Dobrohotov
7665ebfa67 Merge branch 'another_fix' into 'master'
Fix #6219

Closes #6219

See merge request OpenMW/openmw!1137
2021-08-16 01:15:52 +00:00
Alexei Dobrohotov
873e16ae93 Merge branch 'emp' into 'master'
Use an emplace instead of an insert

See merge request OpenMW/openmw!1144
2021-08-16 01:14:36 +00:00