mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-28 23:06:41 +00:00
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.
This commit is contained in:
parent
8ad3d3d792
commit
c1e50f530b
1 changed files with 1 additions and 2 deletions
|
@ -725,8 +725,7 @@ namespace MWPhysics
|
|||
auto actor = std::make_shared<Actor>(ptr, shape, mTaskScheduler.get(), canWaterWalk);
|
||||
|
||||
// check if Actor is on the ground or in the air
|
||||
traceDown(ptr, ptr.getRefData().getPosition().asVec3(), 10.f);
|
||||
|
||||
MovementSolver::traceDown(ptr, ptr.getRefData().getPosition().asVec3(), actor.get(), mCollisionWorld.get(), 10);
|
||||
mActors.emplace(ptr, std::move(actor));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue