Don't allow resting on water with water walking

pull/103/head
Allofich 8 years ago
parent f0d5cf7afb
commit fee39afe38

@ -2183,7 +2183,7 @@ namespace MWWorld
if (!actor)
throw std::runtime_error("can't find player");
if ((actor->getCollisionMode() && !mPhysics->isOnSolidGround(player)) || isUnderwater(currentCell, playerPos))
if ((actor->getCollisionMode() && !mPhysics->isOnSolidGround(player)) || isUnderwater(currentCell, playerPos) || isWalkingOnWater(player))
return 2;
if((currentCell->getCell()->mData.mFlags&ESM::Cell::NoSleep) || player.getClass().getNpcStats(player).isWerewolf())

Loading…
Cancel
Save