mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +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;
|
||||
}
|
||||
|
||||
const float terrainHeight
|
||||
= ptr.getCell()->isExterior() ? getTerrainHeightAt(pos) : -std::numeric_limits<float>::max();
|
||||
pos.z() = std::max(pos.z(), terrainHeight)
|
||||
+ 20; // place slightly above terrain. will snap down to ground with code below
|
||||
if (ptr.getCell()->isExterior() && !ptr.getCell()->getCell()->isEsm4())
|
||||
pos.z() = std::max(pos.z(), getTerrainHeightAt(pos));
|
||||
pos.z() += 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.
|
||||
bool swims = ptr.getClass().isActor() && isSwimming(ptr)
|
||||
|
Loading…
x
Reference in New Issue
Block a user