mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Merge branch 'fix_initial_landing' into 'master'
Do not play landing animation for actors entering to scene without a reason (#6346 + #6513) Closes #6513 and #6346 See merge request OpenMW/openmw!1926
This commit is contained in:
commit
31c0c0cb58
@ -1596,15 +1596,6 @@ namespace MWMechanics
|
||||
world->setActorCollisionMode(actor.getPtr(), false, false);
|
||||
continue;
|
||||
}
|
||||
else if (!isPlayer)
|
||||
{
|
||||
actor.getPtr().getRefData().getBaseNode()->setNodeMask(MWRender::Mask_Actor);
|
||||
if (!actor.getPositionAdjusted())
|
||||
{
|
||||
actor.getPtr().getClass().adjustPosition(actor.getPtr(), false);
|
||||
actor.setPositionAdjusted(true);
|
||||
}
|
||||
}
|
||||
|
||||
const bool isDead = actor.getPtr().getClass().getCreatureStats(actor.getPtr()).isDead();
|
||||
if (!isDead && (!godmode || !isPlayer) && actor.getPtr().getClass().getCreatureStats(actor.getPtr()).isParalyzed())
|
||||
@ -1612,13 +1603,21 @@ namespace MWMechanics
|
||||
|
||||
// Handle player last, in case a cell transition occurs by casting a teleportation spell
|
||||
// (would invalidate the iterator)
|
||||
if (actor.getPtr() == getPlayer())
|
||||
if (isPlayer)
|
||||
{
|
||||
playerCharacter = &ctrl;
|
||||
continue;
|
||||
}
|
||||
|
||||
actor.getPtr().getRefData().getBaseNode()->setNodeMask(MWRender::Mask_Actor);
|
||||
world->setActorCollisionMode(actor.getPtr(), true, !actor.getPtr().getClass().getCreatureStats(actor.getPtr()).isDeathAnimationFinished());
|
||||
|
||||
if (!actor.getPositionAdjusted())
|
||||
{
|
||||
actor.getPtr().getClass().adjustPosition(actor.getPtr(), false);
|
||||
actor.setPositionAdjusted(true);
|
||||
}
|
||||
|
||||
ctrl.update(duration);
|
||||
|
||||
updateVisibility(actor.getPtr(), ctrl);
|
||||
|
@ -116,17 +116,11 @@ namespace MWPhysics
|
||||
|
||||
void setOnGround(bool grounded);
|
||||
|
||||
bool getOnGround() const
|
||||
{
|
||||
return mInternalCollisionMode && mOnGround;
|
||||
}
|
||||
bool getOnGround() const { return mOnGround; }
|
||||
|
||||
void setOnSlope(bool slope);
|
||||
|
||||
bool getOnSlope() const
|
||||
{
|
||||
return mInternalCollisionMode && mOnSlope;
|
||||
}
|
||||
bool getOnSlope() const { return mOnSlope; }
|
||||
|
||||
/// Sets whether this actor should be able to collide with the water surface
|
||||
void setCanWaterWalk(bool waterWalk);
|
||||
|
@ -176,7 +176,7 @@ namespace MWPhysics
|
||||
bool PhysicsSystem::isOnSolidGround (const MWWorld::Ptr& actor) const
|
||||
{
|
||||
const Actor* physactor = getActor(actor);
|
||||
if (!physactor || !physactor->getOnGround())
|
||||
if (!physactor || !physactor->getOnGround() || !physactor->getCollisionMode())
|
||||
return false;
|
||||
|
||||
const auto obj = physactor->getStandingOnPtr();
|
||||
@ -374,7 +374,7 @@ namespace MWPhysics
|
||||
bool PhysicsSystem::isOnGround(const MWWorld::Ptr &actor)
|
||||
{
|
||||
Actor* physactor = getActor(actor);
|
||||
return physactor && physactor->getOnGround();
|
||||
return physactor && physactor->getOnGround() && physactor->getCollisionMode();
|
||||
}
|
||||
|
||||
bool PhysicsSystem::canMoveToWaterSurface(const MWWorld::ConstPtr &actor, const float waterlevel)
|
||||
|
Loading…
x
Reference in New Issue
Block a user