mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-30 16:20:21 +00:00
Do not generate data for immobile actors instead of early out from the solver
This commit is contained in:
parent
b8878cb5f9
commit
9472728fa4
@ -120,13 +120,6 @@ namespace MWPhysics
|
|||||||
{
|
{
|
||||||
auto* physicActor = actor.mActorRaw;
|
auto* physicActor = actor.mActorRaw;
|
||||||
const ESM::Position& refpos = actor.mRefpos;
|
const ESM::Position& refpos = actor.mRefpos;
|
||||||
// Early-out for totally static creatures
|
|
||||||
// (Not sure if gravity should still apply?)
|
|
||||||
{
|
|
||||||
const auto ptr = physicActor->getPtr();
|
|
||||||
if (!ptr.getClass().isMobile(ptr))
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Reset per-frame data
|
// Reset per-frame data
|
||||||
physicActor->setWalkingOnWater(false);
|
physicActor->setWalkingOnWater(false);
|
||||||
@ -432,10 +425,6 @@ namespace MWPhysics
|
|||||||
|
|
||||||
void MovementSolver::unstuck(ActorFrameData& actor, const btCollisionWorld* collisionWorld)
|
void MovementSolver::unstuck(ActorFrameData& actor, const btCollisionWorld* collisionWorld)
|
||||||
{
|
{
|
||||||
const auto& ptr = actor.mActorRaw->getPtr();
|
|
||||||
if (!ptr.getClass().isMobile(ptr))
|
|
||||||
return;
|
|
||||||
|
|
||||||
auto* physicActor = actor.mActorRaw;
|
auto* physicActor = actor.mActorRaw;
|
||||||
if(!physicActor->getCollisionMode() || actor.mSkipCollisionDetection) // noclipping/tcl
|
if(!physicActor->getCollisionMode() || actor.mSkipCollisionDetection) // noclipping/tcl
|
||||||
return;
|
return;
|
||||||
|
@ -757,6 +757,8 @@ namespace MWPhysics
|
|||||||
const MWBase::World *world = MWBase::Environment::get().getWorld();
|
const MWBase::World *world = MWBase::Environment::get().getWorld();
|
||||||
for (const auto& [ptr, physicActor] : mActors)
|
for (const auto& [ptr, physicActor] : mActors)
|
||||||
{
|
{
|
||||||
|
if (!ptr.getClass().isMobile(physicActor->getPtr()))
|
||||||
|
continue;
|
||||||
float waterlevel = -std::numeric_limits<float>::max();
|
float waterlevel = -std::numeric_limits<float>::max();
|
||||||
const MWWorld::CellStore *cell = ptr.getCell();
|
const MWWorld::CellStore *cell = ptr.getCell();
|
||||||
if(cell->getCell()->hasWater())
|
if(cell->getCell()->hasWater())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user