psi29a
45b45b3560
Merge branch 'fix_op_bzzt_whoopsie' into 'master'
...
resolve issue of OP meshes that cross boundaries
See merge request OpenMW/openmw!1117
2021-08-10 15:50:33 +00:00
Bret Curtis
c99bddc8dc
Revert "Move reference to the right cell according to its geographical position"
...
This reverts commit d0677c3f07678a5eb351572c4eb9b14b0e1f03e4.
2021-08-09 22:11:00 +02:00
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;
2021-08-09 22:05:12 +02:00
Cédric Mocquillon
bfc9ea9e32
Fix warning on MSVC convertion from double to float
2021-08-09 19:43:35 +02:00
Cédric Mocquillon
b0e30e4bb6
Change setting to clamp the local viewing distance to fix value (instead of coeff)
2021-08-09 19:43:34 +02:00
Cédric Mocquillon
b27de8f188
Disable zooming when setting is off
2021-08-09 19:43:34 +02:00
Alexei Dobrohotov
73e83fd3d8
Merge branch 'dontcrash' into 'master'
...
Fix #6208 (hopefully)
Closes #6208
See merge request OpenMW/openmw!1113
2021-08-09 17:10:11 +00:00
fredzio
8e3984ae5a
Clear mActors when reseting the simulation. Otherwise during next run we can try to read past the end of mActorsFrameData.
2021-08-09 14:46:41 +02:00
jvoisin
586d8684d0
Fix two coverity issues about uninitialised variables
2021-08-09 12:43:30 +02:00
psi29a
cb7a4d20dd
Merge branch 'killmutex' into 'master'
...
Remove mutex from PtrHolder
See merge request OpenMW/openmw!1110
2021-08-08 19:45:16 +00:00
psi29a
3afa9829b3
Merge branch 'tracedown' into 'master'
...
Correct calls to traceDown in addActor
See merge request OpenMW/openmw!1109
2021-08-08 19:41:53 +00:00
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.
2021-08-08 18:26:35 +02:00
fredzio
b4dd9e6b4d
Avoid division by zero in movementsolver when an actor is immobile and
...
in a storm
2021-08-08 17:19:18 +02:00
fredzio
ee09f3095f
At last kill PtrHolder mutex
2021-08-08 15:05:07 +02:00
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.
2021-08-08 15:05:07 +02:00
fredzio
e88b94d0b0
Move btCollisionObject* into PtrHolder
...
Remove unused function
2021-08-08 15:05:07 +02:00
psi29a
8ad3d3d792
Merge branch 'freezeandcool' into 'master'
...
Don't use FreezeOnCull for any particle system (#4744 )
Closes #4744
See merge request OpenMW/openmw!1103
2021-08-08 12:35:26 +00:00
psi29a
8c81191d09
Merge branch 'schneller' into 'master'
...
Optimize actors physics simulation
See merge request OpenMW/openmw!1048
2021-08-08 12:27:53 +00:00
Alexei Dobrohotov
1fc7cb8191
Don't use FreezeOnCull for any particle system ( #4744 )
2021-08-08 03:36:35 +03:00
fredzio
5fc3b80406
Don't query actor halfextent in a tight loop, use the already existing
...
variable. These repeated calls become costly with > 150 actors.
2021-08-07 13:38:24 +02:00
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.
2021-08-07 13:38:24 +02:00
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
2021-08-07 13:38:24 +02:00
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
2021-08-07 13:38:24 +02:00
fredzio
26d9052b8c
Move the weak_ptr<Actor> outside of ActorFrameData.
2021-08-07 13:38:24 +02:00
fredzio
f68273c3c0
Remove Actor* from ActorFrameData
2021-08-07 13:38:24 +02:00
fredzio
9e911cc8b5
Introduce helper function to write back updated values inside parent Actor class
2021-08-07 13:38:24 +02:00
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
2021-08-07 13:38:24 +02:00
fredzio
6e51a9a512
Simplify a bit the solver
2021-08-07 13:38:24 +02:00
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.
2021-08-07 13:38:24 +02:00
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)
2021-08-07 13:38:24 +02:00
fredzio
9472728fa4
Do not generate data for immobile actors instead of early out from the solver
2021-08-07 13:38:24 +02:00
Evil Eye
29921bf9fa
Don't stack cast packages
2021-08-07 10:06:56 +02:00
glassmancody.info
09e03fde2e
refactor and fix wobbly shores
2021-08-04 17:49:57 -07:00
glassmancody.info
cad0b151cb
enable shaders path and dehardcode depth formats
2021-08-04 17:39:11 -07:00
glassmancody.info
d89e37d689
add framebuffer extension check and fix issues with manual screenshots
2021-08-04 17:39:11 -07:00
glassmancody.info
70fac33940
initial reverse-z depth implementation
2021-08-04 17:39:11 -07:00
Petr Mikheev
a94072243b
Lua command core.quit
2021-08-04 19:14:24 +03:00
psi29a
e10e9c0005
Merge branch 'navmesh_reduce_lock_wait' into 'master'
...
Reduce waiting duration on locks when updating navmesh object in the main thread (#6193 )
Closes #6193
See merge request OpenMW/openmw!1079
2021-08-03 23:05:39 +00:00
Petr Mikheev
0f7f5ce140
Remove Lua command "self:setDirectControl"
2021-08-03 14:36:51 +03:00
elsid
c8987bda2f
Store reference to BulletShapeInstance for btCollisionShape
...
To keep btCollisionShape lifetime.
2021-08-03 12:21:56 +02:00
psi29a
bd1bf4ec73
Merge branch 'donoteraseme' into 'master'
...
#6192 : Stop crashing in moveActors()
See merge request OpenMW/openmw!1085
2021-08-03 07:53:13 +00:00
fredzio
bc738c5640
Use extract/insert instead of erase/emplace
...
When we call moveObject(), we might trigger a change of cell for the
actor, which in turn triggers updatePtr(). The erase/emplace
construct invalidate references, whereas extract/insert do not.
The reason is was working before !1075 is because we were always
"refreshing" the reference by a call to getActor().
2021-08-03 07:00:42 +02:00
AnyOldName3
04e9b6d242
Abort on duplicate content file
2021-08-01 03:04:12 +01:00
AnyOldName3
4727ae4b3b
Make it possible to opt out of composing variables
2021-08-01 02:47:10 +01:00
psi29a
547bc4a252
Merge branch 'notonlyactors' into 'master'
...
Refactor the physics simulation to make it not actor centric.
See merge request OpenMW/openmw!1075
2021-07-31 23:39:22 +00:00
psi29a
a3a079acc1
Merge branch 'projstats' into 'master'
...
Add projectiles number to the resources stats
See merge request OpenMW/openmw!1074
2021-07-31 23:12:14 +00:00
psi29a
4c5e6beb75
Merge branch 'canyouseeme' into 'master'
...
Solve actor awareness check without async physics
See merge request OpenMW/openmw!1071
2021-07-31 22:18:35 +00:00
fredzio
35928cf4d3
Refactor a bit the physics simulation to make it not actor centric:
...
- inline PhysicsSystem::applyQueuedMovements() into PhysicsSystem::stepSimulation()
- rename PhysicsTaskScheduler::moveActors() to PhysicsTaskScheduler::applyQueuedMovements()
- move the actor movement code from World::doPhysics() to
PhysicsSystem::moveActors() (analogically to the projectile manager)
2021-07-31 23:39:04 +02:00
fredzio
c76387162b
Add projectiles number to the resources stats
2021-07-31 23:08:50 +02:00
psi29a
ca011927f3
Merge branch 'ObjectPagingDisappearingTexture' into 'master'
...
Move reference to the right cell according to its geographical position
See merge request OpenMW/openmw!1065
2021-07-31 10:58:20 +00:00