1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-16 16:10:58 +00:00
OpenMW/apps/openmw/mwphysics
fredzio 31d8ce266b Close a race between main and physics threads when actor is positioned by scripts.
When a position is forced, the actor position in physics subsystem is
overriden. The background physics thread is not made aware of this,
its result are simply discarded.

There is a short window where this doesn't work (in this
example, actor is at A and script moves it to B)
1) actor position is set to B. (among others, Actor::mPosition is set to B)
2) physics thread reset Actor::mPosition with stale value (around A)
3) main thread read simulation result, reset Actor::mSkipSimulation flag => actor is at B
4) physics thread fetch latest Actor::mPosition value, which is around A
5) main thread read simulation result, actor is around A

To avoid this situation, do not perform 2) until after 3) occurs. This
way, at 4) starts the simulation with up-to-date Actor::mPosition
2021-03-06 10:41:55 +01:00
..
actor.cpp Close a race between main and physics threads when actor is positioned by scripts. 2021-03-06 10:41:55 +01:00
actor.hpp Revert "Remove physics dependency on basenode" 2021-01-29 16:51:13 +04:00
actorconvexcallback.cpp
actorconvexcallback.hpp
closestnotmerayresultcallback.cpp
closestnotmerayresultcallback.hpp
collisiontype.hpp
constants.hpp
contacttestresultcallback.cpp
contacttestresultcallback.hpp
contacttestwrapper.cpp
contacttestwrapper.h
deepestnotmecontacttestresultcallback.cpp
deepestnotmecontacttestresultcallback.hpp
hasspherecollisioncallback.hpp
heightfield.cpp heightfield: Only buildAccelerator on Bullet 2.89+ 2021-03-01 08:27:24 +00:00
heightfield.hpp
movementsolver.cpp Ignore projectiles inside of MovementSolver::unstuck. It is normal for actors to be inside of a 2021-02-07 18:32:03 +01:00
movementsolver.hpp
mtphysics.cpp
mtphysics.hpp
object.cpp Revert "Remove physics dependency on basenode" 2021-01-29 16:51:13 +04:00
object.hpp Revert "Remove physics dependency on basenode" 2021-01-29 16:51:13 +04:00
physicssystem.cpp Merge branch 'boltsize' into 'master' 2021-02-15 08:40:30 +00:00
physicssystem.hpp Merge branch 'boltsize' into 'master' 2021-02-15 08:40:30 +00:00
projectile.cpp
projectile.hpp
projectileconvexcallback.cpp
projectileconvexcallback.hpp
ptrholder.hpp
raycasting.hpp
stepper.cpp
stepper.hpp
trace.cpp
trace.h