1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-27 04:40:26 +00:00

Merge pull request #2717 from akortunov/map_texture

Don't unnecessarily copy global map texture during savegame loading
This commit is contained in:
Chris Djali 2020-03-08 21:09:05 +00:00 committed by GitHub
commit d9f147272c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -204,6 +204,7 @@
Bug #5269: Editor: Cell lighting in resaved cleaned content files is corrupted Bug #5269: Editor: Cell lighting in resaved cleaned content files is corrupted
Bug #5278: Console command Show doesn't fall back to global variable after local var not found Bug #5278: Console command Show doesn't fall back to global variable after local var not found
Bug #5300: NPCs don't switch from torch to shield when starting combat Bug #5300: NPCs don't switch from torch to shield when starting combat
Bug #5308: World map copying makes save loading much slower
Feature #1774: Handle AvoidNode Feature #1774: Handle AvoidNode
Feature #2229: Improve pathfinding AI Feature #2229: Improve pathfinding AI
Feature #3025: Analogue gamepad movement controls Feature #3025: Analogue gamepad movement controls

View file

@ -457,7 +457,7 @@ namespace MWRender
if (map.mImageData.empty()) if (map.mImageData.empty())
return; return;
Files::IMemStream istream(&map.mImageData[0], map.mImageData.size()); Files::IMemStream istream(map.mImageData.data(), map.mImageData.size());
osgDB::ReaderWriter* readerwriter = osgDB::Registry::instance()->getReaderWriterForExtension("png"); osgDB::ReaderWriter* readerwriter = osgDB::Registry::instance()->getReaderWriterForExtension("png");
if (!readerwriter) if (!readerwriter)
@ -522,7 +522,7 @@ namespace MWRender
if (srcBox == destBox && imageWidth == mWidth && imageHeight == mHeight) if (srcBox == destBox && imageWidth == mWidth && imageHeight == mHeight)
{ {
mOverlayImage->copySubImage(0, 0, 0, image); mOverlayImage = image;
requestOverlayTextureUpdate(0, 0, mWidth, mHeight, texture, true, false); requestOverlayTextureUpdate(0, 0, mWidth, mHeight, texture, true, false);
} }