mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-04-01 10:06:42 +00:00
Moved local map update to LocalMap::updatePlayer to fix a brief desync on cell transitions due to sFogOfWarSkip
This commit is contained in:
parent
a4a9794417
commit
c98bea2a88
4 changed files with 8 additions and 13 deletions
|
@ -200,8 +200,8 @@ namespace MWBase
|
||||||
|
|
||||||
virtual bool getFullHelp() const = 0;
|
virtual bool getFullHelp() const = 0;
|
||||||
|
|
||||||
virtual void setInteriorMapTexture(const int x, const int y) = 0;
|
virtual void setActiveMap(int x, int y, bool interior) = 0;
|
||||||
///< set the index of the map texture that should be used (for interiors)
|
///< set the indices of the map texture that should be used
|
||||||
|
|
||||||
/// sets the visibility of the drowning bar
|
/// sets the visibility of the drowning bar
|
||||||
virtual void setDrowningBarVisibility(bool visible) = 0;
|
virtual void setDrowningBarVisibility(bool visible) = 0;
|
||||||
|
|
|
@ -766,8 +766,6 @@ namespace MWGui
|
||||||
|
|
||||||
mMap->setCellPrefix("Cell");
|
mMap->setCellPrefix("Cell");
|
||||||
mHud->setCellPrefix("Cell");
|
mHud->setCellPrefix("Cell");
|
||||||
mMap->setActiveCell (cell->getCell()->getGridX(), cell->getCell()->getGridY());
|
|
||||||
mHud->setActiveCell (cell->getCell()->getGridX(), cell->getCell()->getGridY());
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -783,10 +781,10 @@ namespace MWGui
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowManager::setInteriorMapTexture(const int x, const int y)
|
void WindowManager::setActiveMap(int x, int y, bool interior)
|
||||||
{
|
{
|
||||||
mMap->setActiveCell(x,y, true);
|
mMap->setActiveCell(x,y, interior);
|
||||||
mHud->setActiveCell(x,y, true);
|
mHud->setActiveCell(x,y, interior);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WindowManager::setPlayerPos(const float x, const float y)
|
void WindowManager::setPlayerPos(const float x, const float y)
|
||||||
|
|
|
@ -192,8 +192,8 @@ namespace MWGui
|
||||||
virtual void toggleFullHelp(); ///< show extra info in item tooltips (owner, script)
|
virtual void toggleFullHelp(); ///< show extra info in item tooltips (owner, script)
|
||||||
virtual bool getFullHelp() const;
|
virtual bool getFullHelp() const;
|
||||||
|
|
||||||
virtual void setInteriorMapTexture(const int x, const int y);
|
virtual void setActiveMap(int x, int y, bool interior);
|
||||||
///< set the index of the map texture that should be used (for interiors)
|
///< set the indices of the map texture that should be used
|
||||||
|
|
||||||
/// sets the visibility of the drowning bar
|
/// sets the visibility of the drowning bar
|
||||||
virtual void setDrowningBarVisibility(bool visible);
|
virtual void setDrowningBarVisibility(bool visible);
|
||||||
|
|
|
@ -466,10 +466,7 @@ void LocalMap::updatePlayer (const Ogre::Vector3& position, const Ogre::Quaterni
|
||||||
mCellX = x;
|
mCellX = x;
|
||||||
mCellY = y;
|
mCellY = y;
|
||||||
}
|
}
|
||||||
else
|
MWBase::Environment::get().getWindowManager()->setActiveMap(x,y,mInterior);
|
||||||
{
|
|
||||||
MWBase::Environment::get().getWindowManager()->setInteriorMapTexture(x,y);
|
|
||||||
}
|
|
||||||
|
|
||||||
// convert from world coordinates to texture UV coordinates
|
// convert from world coordinates to texture UV coordinates
|
||||||
std::string texBaseName;
|
std::string texBaseName;
|
||||||
|
|
Loading…
Reference in a new issue