forked from teamnwah/openmw-tes3coop
Merge remote branch 'scrawl/water'
This commit is contained in:
commit
a90c3b9f23
2 changed files with 10 additions and 4 deletions
|
@ -142,8 +142,8 @@ namespace MWScript
|
|||
InterpreterContext& context
|
||||
= static_cast<InterpreterContext&> (runtime.getContext());
|
||||
|
||||
const ESM::Cell *cell = context.getWorld().getPlayer().getPlayer().getCell()->cell;
|
||||
runtime.push (cell->water);
|
||||
MWWorld::Ptr::CellStore *cell = context.getWorld().getPlayer().getPlayer().getCell();
|
||||
runtime.push (cell->mWaterLevel);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -21,8 +21,14 @@ void Cell::load(ESMReader &esm)
|
|||
if (data.flags & Interior)
|
||||
{
|
||||
// Interior cells
|
||||
|
||||
esm.getHNT(water, "WHGT", 4);
|
||||
if (esm.isNextSub("INTV"))
|
||||
{
|
||||
int waterl;
|
||||
esm.getHT(waterl);
|
||||
water = (float) waterl;
|
||||
}
|
||||
else if (esm.isNextSub("WHGT"))
|
||||
esm.getHT(water);
|
||||
|
||||
// Quasi-exterior cells have a region (which determines the
|
||||
// weather), pure interior cells have ambient lighting
|
||||
|
|
Loading…
Reference in a new issue