mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 21:49:55 +00:00
Fix race conditions in terrain loader caused by static variables
This commit is contained in:
parent
d1e86d22ca
commit
d3e1dbe920
1 changed files with 3 additions and 3 deletions
|
@ -51,7 +51,7 @@ namespace ESM
|
|||
esm.writeHNT("VCLR", mColours, 3*LAND_NUM_VERTS);
|
||||
}
|
||||
if (mDataTypes & Land::DATA_VTEX) {
|
||||
static uint16_t vtex[LAND_NUM_TEXTURES];
|
||||
uint16_t vtex[LAND_NUM_TEXTURES];
|
||||
transposeTextureData(mTextures, vtex);
|
||||
esm.writeHNT("VTEX", vtex, sizeof(vtex));
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ namespace ESM
|
|||
}
|
||||
|
||||
if (reader.isNextSub("VHGT")) {
|
||||
static VHGT vhgt;
|
||||
VHGT vhgt;
|
||||
if (condLoad(reader, flags, DATA_VHGT, &vhgt, sizeof(vhgt))) {
|
||||
float rowOffset = vhgt.mHeightOffset;
|
||||
for (int y = 0; y < LAND_SIZE; y++) {
|
||||
|
@ -227,7 +227,7 @@ namespace ESM
|
|||
if (reader.isNextSub("VCLR"))
|
||||
condLoad(reader, flags, DATA_VCLR, mLandData->mColours, 3 * LAND_NUM_VERTS);
|
||||
if (reader.isNextSub("VTEX")) {
|
||||
static uint16_t vtex[LAND_NUM_TEXTURES];
|
||||
uint16_t vtex[LAND_NUM_TEXTURES];
|
||||
if (condLoad(reader, flags, DATA_VTEX, vtex, sizeof(vtex))) {
|
||||
LandData::transposeTextureData(vtex, mLandData->mTextures);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue