mirror of
https://github.com/OpenMW/openmw.git
synced 2025-05-30 04:41:32 +00:00
Merge branch 'region_size' into 'master'
Use subrecord size instead of version to load WEAT See merge request OpenMW/openmw!1814
This commit is contained in:
commit
5afe3fb8ae
1 changed files with 6 additions and 15 deletions
|
@ -29,25 +29,16 @@ namespace ESM
|
|||
case fourCC("WEAT"):
|
||||
{
|
||||
esm.getSubHeader();
|
||||
if (esm.getVer() == VER_12)
|
||||
{
|
||||
mData.mA = 0;
|
||||
mData.mB = 0;
|
||||
esm.getExact(&mData, sizeof(mData) - 2);
|
||||
}
|
||||
else if (esm.getVer() == VER_13)
|
||||
{
|
||||
// May include the additional two bytes (but not necessarily)
|
||||
if (esm.getSubSize() == sizeof(mData))
|
||||
{
|
||||
esm.getT(mData);
|
||||
}
|
||||
else
|
||||
else if (esm.getSubSize() == sizeof(mData) - 2)
|
||||
{
|
||||
mData.mA = 0;
|
||||
mData.mB = 0;
|
||||
esm.getExact(&mData, sizeof(mData)-2);
|
||||
}
|
||||
esm.getExact(&mData, sizeof(mData) - 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue