mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 12:54:00 +00:00
getWaterLevel use CellStore ; attempted fix for morrowind without tribunal
This commit is contained in:
parent
79c2a2e465
commit
d5c49fa036
@ -142,8 +142,8 @@ namespace MWScript
|
|||||||
InterpreterContext& context
|
InterpreterContext& context
|
||||||
= static_cast<InterpreterContext&> (runtime.getContext());
|
= static_cast<InterpreterContext&> (runtime.getContext());
|
||||||
|
|
||||||
const ESM::Cell *cell = context.getWorld().getPlayer().getPlayer().getCell()->cell;
|
MWWorld::Ptr::CellStore *cell = context.getWorld().getPlayer().getPlayer().getCell();
|
||||||
runtime.push (cell->water);
|
runtime.push (cell->mWaterLevel);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -21,8 +21,14 @@ void Cell::load(ESMReader &esm)
|
|||||||
if (data.flags & Interior)
|
if (data.flags & Interior)
|
||||||
{
|
{
|
||||||
// Interior cells
|
// Interior cells
|
||||||
|
if (esm.isNextSub("INTV"))
|
||||||
esm.getHNT(water, "WHGT", 4);
|
{
|
||||||
|
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
|
// Quasi-exterior cells have a region (which determines the
|
||||||
// weather), pure interior cells have ambient lighting
|
// weather), pure interior cells have ambient lighting
|
||||||
|
Loading…
Reference in New Issue
Block a user