mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 16:29:55 +00:00
Empty refid check
This commit is contained in:
parent
64142dbd51
commit
6f7fff409c
1 changed files with 1 additions and 1 deletions
|
@ -594,7 +594,7 @@ namespace MWWorld
|
||||||
|
|
||||||
// Only teleport if that teleport point is > the lowest point, rare edge case
|
// Only teleport if that teleport point is > the lowest point, rare edge case
|
||||||
// also check that collision is enabled, which is opposite to Vanilla
|
// also check that collision is enabled, which is opposite to Vanilla
|
||||||
if (world->isActorCollisionEnabled(playerPtr) && newPos.pos[2] >= mLowestPoint - lowestPointAdjustment)
|
if (!refId.empty() && world->isActorCollisionEnabled(playerPtr) && newPos.pos[2] >= mLowestPoint - lowestPointAdjustment)
|
||||||
{
|
{
|
||||||
MWWorld::ActionTeleport(refId, newPos, false).execute(playerPtr);
|
MWWorld::ActionTeleport(refId, newPos, false).execute(playerPtr);
|
||||||
Log(Debug::Warning) << "Player position has been reset due to falling into the void";
|
Log(Debug::Warning) << "Player position has been reset due to falling into the void";
|
||||||
|
|
Loading…
Reference in a new issue