forked from mirror/openmw-tes3mp
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 void setInteriorMapTexture(const int x, const int y) = 0;
|
||||
///< set the index of the map texture that should be used (for interiors)
|
||||
virtual void setActiveMap(int x, int y, bool interior) = 0;
|
||||
///< set the indices of the map texture that should be used
|
||||
|
||||
/// sets the visibility of the drowning bar
|
||||
virtual void setDrowningBarVisibility(bool visible) = 0;
|
||||
|
|
|
@ -766,8 +766,6 @@ namespace MWGui
|
|||
|
||||
mMap->setCellPrefix("Cell");
|
||||
mHud->setCellPrefix("Cell");
|
||||
mMap->setActiveCell (cell->getCell()->getGridX(), cell->getCell()->getGridY());
|
||||
mHud->setActiveCell (cell->getCell()->getGridX(), cell->getCell()->getGridY());
|
||||
}
|
||||
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);
|
||||
mHud->setActiveCell(x,y, true);
|
||||
mMap->setActiveCell(x,y, interior);
|
||||
mHud->setActiveCell(x,y, interior);
|
||||
}
|
||||
|
||||
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 bool getFullHelp() const;
|
||||
|
||||
virtual void setInteriorMapTexture(const int x, const int y);
|
||||
///< set the index of the map texture that should be used (for interiors)
|
||||
virtual void setActiveMap(int x, int y, bool interior);
|
||||
///< set the indices of the map texture that should be used
|
||||
|
||||
/// sets the visibility of the drowning bar
|
||||
virtual void setDrowningBarVisibility(bool visible);
|
||||
|
|
|
@ -466,10 +466,7 @@ void LocalMap::updatePlayer (const Ogre::Vector3& position, const Ogre::Quaterni
|
|||
mCellX = x;
|
||||
mCellY = y;
|
||||
}
|
||||
else
|
||||
{
|
||||
MWBase::Environment::get().getWindowManager()->setInteriorMapTexture(x,y);
|
||||
}
|
||||
MWBase::Environment::get().getWindowManager()->setActiveMap(x,y,mInterior);
|
||||
|
||||
// convert from world coordinates to texture UV coordinates
|
||||
std::string texBaseName;
|
||||
|
|
Loading…
Reference in a new issue