mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-15 23:42:20 +00:00
Don't use getTerrainHeightAt(pos)
when adjusting position in ESM4 cell because this function is currently specific to ESM3.
This commit is contained in:
parent
c8056f6561
commit
169859025c
@ -1361,10 +1361,9 @@ namespace MWWorld
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const float terrainHeight
|
if (ptr.getCell()->isExterior() && !ptr.getCell()->getCell()->isEsm4())
|
||||||
= ptr.getCell()->isExterior() ? getTerrainHeightAt(pos) : -std::numeric_limits<float>::max();
|
pos.z() = std::max(pos.z(), getTerrainHeightAt(pos));
|
||||||
pos.z() = std::max(pos.z(), terrainHeight)
|
pos.z() += 20; // place slightly above terrain. will snap down to ground with code below
|
||||||
+ 20; // place slightly above terrain. will snap down to ground with code below
|
|
||||||
|
|
||||||
// We still should trace down dead persistent actors - they do not use the "swimdeath" animation.
|
// We still should trace down dead persistent actors - they do not use the "swimdeath" animation.
|
||||||
bool swims = ptr.getClass().isActor() && isSwimming(ptr)
|
bool swims = ptr.getClass().isActor() && isSwimming(ptr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user