Commit Graph

17796 Commits (4ff5a04e9b3470847dd77efe3261e43c047c2b4f)

Author SHA1 Message Date
jvoisin a6b1e38eab Don't use comma where there is no need to. 3 years ago
Evil Eye b4486992f0 Allow Rieklings and Goblins to attack again 3 years ago
psi29a 66f028c4a1 Merge branch 'correctcommandimplementation' into 'master'
Don't do storage in constructors of the commands

See merge request OpenMW/openmw!1126
3 years ago
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
3 years ago
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
3 years ago
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
3 years ago
psi29a b585aad81e Merge branch 'offset-bullet-debug' into 'master'
glPolygonOffset for Bullet debug geometry

See merge request OpenMW/openmw!684
3 years ago
unelsson de3497d291 Fix undo-redo crash 3 years ago
unelsson 890ce1eefb Reverse action order for redo and undo 3 years ago
unelsson 0cfabd6f3b Move mapToSource back to constructor 3 years ago
unelsson b2fe591590 Don't do any storing in the constructor 3 years ago
unelsson 45549da0f5 For most commands, set mOld in redo, not in constructor 3 years ago
psi29a 716eebe616 Merge branch 'terrainselectioncrashfix' into 'openmw-47'
Fix terrain selection crash

See merge request OpenMW/openmw!1165

(cherry picked from commit ec4e3b04a7)

b84e41bd Avoid storing ref, dynamic cast worldspacewidget for safety
d62ddc00 Use QPointer to detect object existence, less verbose debug messages
cb42b528 Remove friend, make getEditMode public to allow editmode testing.
4b148180 Restucture code
08f7c73e Fix text
3 years ago
psi29a 855f491196 Merge branch 'splintercell' into 'master'
Clean up text key extraction

See merge request OpenMW/openmw!1163
3 years ago
Alexei Dobrohotov 0922d0b105 Clean up text key extraction 3 years ago
Petr Mikheev 3771e523f1 More object bindings 3 years ago
Alexei Dobrohotov 31e70f2ecc Merge branch 'minor_factorisation' into 'master'
Minor factorisation in apps/openmw/mwmechanics/actors.cpp

See merge request OpenMW/openmw!1143
3 years ago
cc9cii 28ad139464 Check if deleted, just in case. 3 years ago
psi29a d09c807a40 Merge branch 'fixbadcast' into 'master'
Fix std::bad_cast

Closes #6217

See merge request OpenMW/openmw!1130
3 years ago
unelsson 7801f42005 Don't do mapToSource at executeModify 3 years ago
psi29a 9751717b35 Merge branch 'components_qt' into 'master'
Do no link binaries with Qt where it's not used

See merge request OpenMW/openmw!1157
3 years ago
elsid e9b8933b2f
Do no link binaries with Qt where it's not used
Define components_qt static library with all qt dependent components that also
depends on other components. Link only cs, wizard and launcher with qt
dependent components.
3 years ago
psi29a 77e58abf0d Merge branch 'lua_input' into 'master'
Lua package 'openmw.input'

See merge request OpenMW/openmw!1073
3 years ago
elsid 193be0d5d1 Merge branch 'some_small_changes' into 'master'
Fix coverity warning and build on some osg

See merge request OpenMW/openmw!1153
3 years ago
cc9cii bd3ef506cd Empty Pathgrid record is considered as the modder's intention to delete any existing record. 3 years ago
cc9cii 802a202455 Remove warning log messages as they are more suitable for OpenCS. 3 years ago
cc9cii 8244ba8957 Erase old record instead (i.e. assume an empty Pathgrid record was placed in purpose) 3 years ago
cc9cii 1d925154f2 Do not store (or worse, overwrite) empty PGRD records. Should resolve Issue #6209. 3 years ago
glassmancody.info a6c7fcd436 don't pingpong depth function on character preview update 3 years ago
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.
3 years ago
elsid 9112c65afc
Use pathgrid path when destination is closer to different graph component node
Partially revert d863267d5c to restore 0.46
behaviour for pathgrid based pathfinding.
3 years ago
glassmancody.info d63eb3325f fix coverity warning and build on some osg 3 years ago
psi29a 6595c731f7 Merge branch 'fix_rc_poly_mesh_flags_length' into 'master'
Fix flags length for rcPolyMesh

See merge request OpenMW/openmw!1134
3 years ago
psi29a faa3e04494 Merge branch 'const_reff' into 'master'
Sprinkle some const-ref

See merge request OpenMW/openmw!1145
3 years ago
cc9cii b1fb3e2313 Add missing includes. 3 years ago
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.
3 years ago
jvoisin 39cd679ca9 Minor factorisation in apps/openmw/mwmechanics/actors.cpp 3 years ago
Alexei Dobrohotov 6c1ac9ed9f Merge branch 'init_sky' into 'master'
Use an initialization list in WrapAroundOperator's constructor

See merge request OpenMW/openmw!1146
3 years ago
Alexei Dobrohotov 7665ebfa67 Merge branch 'another_fix' into 'master'
Fix #6219

Closes #6219

See merge request OpenMW/openmw!1137
3 years ago
Alexei Dobrohotov 873e16ae93 Merge branch 'emp' into 'master'
Use an emplace instead of an insert

See merge request OpenMW/openmw!1144
3 years ago
elsid f966fdb65e Merge branch 'noweak' into 'master'
use shared_ptr inside the physics simulation to simplify the code

See merge request OpenMW/openmw!1141
3 years ago
jvoisin ff2a51a484 Use an initialization list in WrapAroundOperator's constructor 3 years ago
jvoisin 7a015d24c6 Sprinkle some const-ref 3 years ago
jvoisin 0792bb212a Use an emplace instead of an insert 3 years ago
glassmancody.info ed72f3335b silence compiler warning 3 years ago
fredzio ec871e6bf7 Use shared_ptr instead of weak_ptr for actors handle inside the
simulation

The purpose of weak_ptr is to avoid performing the simulation on deleted
Actor by promoting it to a shared_ptr via a lock() call. This clutter
the code with a lot of branches, whereas the overwhelmingly common case is for the call to succeed.
Since the simulation is decoupled from the engine state, we can use a shared_ptr instead of a weak_ptr.
This allow us to ignore (ie not handle) the rarer case where the actor is delete from the scene. This means that the simulation
will run for one frame more than before for each actor, whereas the rest of the engine
will be ignorant of this.
3 years ago
AnyOldName3 7400050b38 Merge branch 'character_preview_alpha_fix' into 'master'
Fix transparent objects being invisible in character doll

See merge request OpenMW/openmw!1140
3 years ago
glassmancody.info 6cc71745ac ensure character preview is using standard depth 3 years ago
Mads Buvik Sandvei d40c18234a Double buffering the water's node position uniform 3 years ago
fredzio 713f612bdb Partially revert !1046: the player is added before the scene exists, so we need to check again the grounded state, as it correctly was. 3 years ago
jvoisin b01ef2629c Fix two Wreorder clang warnings 3 years ago
Alexei Dobrohotov 839cf36bdd Merge branch 'hidden_markers' into 'master'
Use common implementation to filter hidden markers

See merge request OpenMW/openmw!1132
3 years ago
elsid 54a676f2e3
Add functions to get length of recast type arrays
To avoid duplicating same formulas in multiple places.
3 years ago
elsid 05258ed644
Remove redundant TileCachedRecastMeshManager::hasTile function
It's used only for tests. getMesh is a valid replacement.
3 years ago
elsid 3caf45807f
Use common implementation to filter hidden markers 3 years ago
Cédric Mocquillon b0b60b05b8 Do not update doors markers at each frame, only when needed 3 years ago
unelsson 298db2ef76 Initialize and check pointer. 3 years ago
unelsson f1d05a93bf Get index and model from proxy 3 years ago
jvoisin bcdd0f55da Merge branch 'bc_refnum' into 'master'
Always print object refnum

See merge request OpenMW/openmw!1123
3 years ago
elsid e84a177a91
Always print object refnum
Also print content file index even when it's negative. To be able to identify
the object unambiguously.
3 years ago
fredzio de9ee2f196 Revert "Calls directly MovementSolver::traceDown instead of"
This reverts commit c1e50f530b.
3 years ago
Petr Mikheev 0e6fbbc126 Lua package 'openmw.input' 3 years ago
psi29a 45b45b3560 Merge branch 'fix_op_bzzt_whoopsie' into 'master'
resolve issue of OP meshes that cross boundaries

See merge request OpenMW/openmw!1117
3 years ago
Bret Curtis c99bddc8dc Revert "Move reference to the right cell according to its geographical position"
This reverts commit d0677c3f07.
3 years ago
Bret Curtis 7dfaef7644 resolve issue of meshes that cross boundaries; should only be calculating the maxBound, not the minBound of y; also fix it in groundcover as it was copied blindly over; 3 years ago
Cédric Mocquillon bfc9ea9e32 Fix warning on MSVC convertion from double to float 3 years ago
Cédric Mocquillon b0e30e4bb6 Change setting to clamp the local viewing distance to fix value (instead of coeff) 3 years ago
Cédric Mocquillon b27de8f188 Disable zooming when setting is off 3 years ago
Alexei Dobrohotov 73e83fd3d8 Merge branch 'dontcrash' into 'master'
Fix #6208 (hopefully)

Closes #6208

See merge request OpenMW/openmw!1113
3 years ago
fredzio 8e3984ae5a Clear mActors when reseting the simulation. Otherwise during next run we can try to read past the end of mActorsFrameData. 3 years ago
jvoisin 586d8684d0 Fix two coverity issues about uninitialised variables 3 years ago
psi29a cb7a4d20dd Merge branch 'killmutex' into 'master'
Remove mutex from PtrHolder

See merge request OpenMW/openmw!1110
3 years ago
psi29a 3afa9829b3 Merge branch 'tracedown' into 'master'
Correct calls to traceDown in addActor

See merge request OpenMW/openmw!1109
3 years ago
fredzio c1e50f530b Calls directly MovementSolver::traceDown instead of
PhysicsSystem::traceDown before inserting into mActors.

The latter does nothing until the actor is inserted into mActors.
We can't move the call after the insertion either because then
the actor is part of the simulation, and we'd have a race.
3 years ago
AnyOldName3 8d93748f87 Fix rebase issue 3 years ago
AnyOldName3 cf15803e67 Disable triangle detection workaround when Bullet actually uses triangles 3 years ago
AnyOldName3 8b4c2d205d WIP-ish glPolygonOffset for Bullet debug geometry 3 years ago
fredzio b4dd9e6b4d Avoid division by zero in movementsolver when an actor is immobile and
in a storm
3 years ago
fredzio ee09f3095f At last kill PtrHolder mutex 3 years ago
fredzio 07fa1803f7 Use btCollisionObject* instead of MWWorld::Ptr inside of Projectile
collision handling and castRay() to avoid calling getPtr(). It is a step forward
removing the mutex inside of PtrHolder.

Do the same for DeepestNotMeContactTestResultCallback. It is used
only for not-ranged combat for now, but do it anyway for parity with all
other callback. This way, once the PtrHolder mutex is gone one will not
have to worry about wether it is safe to use the callback in a specific
context.

To avoid use-after-free with projectile / projectile collision, defer deletion of projectile.
Since instead of storing a copy of target Ptr we have a pointer to its collision object,
we can't delete projectiles until after we finished iterating over the loops.
3 years ago
fredzio e88b94d0b0 Move btCollisionObject* into PtrHolder
Remove unused function
3 years ago
psi29a 8ad3d3d792 Merge branch 'freezeandcool' into 'master'
Don't use FreezeOnCull for any particle system (#4744)

Closes #4744

See merge request OpenMW/openmw!1103
3 years ago
psi29a 8c81191d09 Merge branch 'schneller' into 'master'
Optimize actors physics simulation

See merge request OpenMW/openmw!1048
3 years ago
Alexei Dobrohotov 1fc7cb8191 Don't use FreezeOnCull for any particle system (#4744) 3 years ago
fredzio 5fc3b80406 Don't query actor halfextent in a tight loop, use the already existing
variable. These repeated calls become costly with > 150 actors.
3 years ago
fredzio 7dd5e715d7 Compute and store actor half extents. This is faster for 2 reasons:
- half extents changes when actor scale is modified, which is very rare
- we don't need to protect them by the actor mutex.
3 years ago
fredzio bcd6541d3e Reorganize ActorFrameData members:
- constify all read-only variables
- order them so that all variables modified as aprt of the simulation
  fits in one cache line
3 years ago
fredzio 0c5cf6ec19 Store the btCollisionObject* of the object we're standing on instead of
MWWorld::Ptr:
- they are equivalent
- btCollisionObject* is readily available from the simulation, it saves
  a call to a mutex
- btCollisionObject* is smaller
3 years ago
fredzio 26d9052b8c Move the weak_ptr<Actor> outside of ActorFrameData. 3 years ago
fredzio f68273c3c0 Remove Actor* from ActorFrameData 3 years ago
fredzio 9e911cc8b5 Introduce helper function to write back updated values inside parent Actor class 3 years ago
fredzio b04c958410 Modify the way swimming is handled:
- compute the swimming state instead of storing it, it changes as part of the simulation and was not updated, so it was wrong anyway.
- store the swim level in ActorFrameData, it is constant per Actor so no need to compute it inside the simulation
3 years ago
fredzio 6e51a9a512 Simplify a bit the solver 3 years ago
fredzio 51514e44cc Handle jump as part of the simulation preparation (inside of
PhysicsSystem) instead of inside the simulaiton.
For mechanics, we don't care how the jump is handled, just that it will be.
3 years ago
fredzio 1bfaf353be Explicitely store all the potential states an Actor can have into the
ActActorFrameData structure. It makes it easier to reason about the
simulation (and hopefully simplify it).
Remove atomics from Actor class as a side effect.

Rename mFloatToSurface to mInert to make is explicit what it represent, not what it is used for
Store the Actor rotation (1 Vec2) instead of the whole ESM::Position (2 Vec3)
3 years ago
fredzio 9472728fa4 Do not generate data for immobile actors instead of early out from the solver 3 years ago
Evil Eye 29921bf9fa Don't stack cast packages 3 years ago
psi29a b770373491 Merge branch 'OpenCS-enforce-str-length' into 'master'
OpenCS - Disallow entry of strings longer than the lengths allowed by the file format (#3066)

See merge request OpenMW/openmw!1088
3 years ago
glassmancody.info 09e03fde2e refactor and fix wobbly shores 3 years ago
glassmancody.info cad0b151cb enable shaders path and dehardcode depth formats 3 years ago