1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-31 21:45:33 +00:00

Get rid of a hack

This commit is contained in:
scrawl 2014-01-07 20:43:08 +01:00
parent 0285d18fc2
commit 03b6334ceb
2 changed files with 2 additions and 8 deletions

View file

@ -19,7 +19,6 @@
#include <openengine/bullet/physic.hpp>
#include <components/esm/loadstat.hpp>
#include <components/settings/settings.hpp>
#include <components/terrain/world.hpp>
@ -407,12 +406,7 @@ void RenderingManager::postRenderTargetUpdate(const RenderTargetEvent &evt)
void RenderingManager::waterAdded (MWWorld::Ptr::CellStore *store)
{
const MWWorld::Store<ESM::Land> &lands =
MWBase::Environment::get().getWorld()->getStore().get<ESM::Land>();
if(store->mCell->mData.mFlags & ESM::Cell::HasWater
|| ((store->mCell->isExterior())
&& !lands.search(store->mCell->getGridX(),store->mCell->getGridY()) )) // always use water, if the cell does not have land.
if(store->mCell->mData.mFlags & ESM::Cell::HasWater)
{
mWater->changeCell(store->mCell);
mWater->setActive(true);

View file

@ -79,7 +79,7 @@ MWWorld::Ptr::CellStore *MWWorld::Cells::getExterior (int x, int y)
// Cell isn't predefined. Make one on the fly.
ESM::Cell record;
record.mData.mFlags = 0;
record.mData.mFlags = ESM::Cell::HasWater;
record.mData.mX = x;
record.mData.mY = y;
record.mWater = 0;