Merged pull request #1837

pull/469/head
Marc Zinnschlag 6 years ago
commit 452a706047

@ -20,6 +20,7 @@ namespace ESSImport
item.mId = contItem.mItem.toString();
item.mCount = contItem.mCount;
item.mRelativeEquipmentSlot = -1;
item.mLockLevel = 0;
unsigned int itemCount = std::abs(item.mCount);
bool separateStacks = false;

@ -198,6 +198,7 @@ OMW::Engine::Engine(Files::ConfigurationManager& configurationManager)
: mWindow(NULL)
, mEncoding(ToUTF8::WINDOWS_1252)
, mEncoder(NULL)
, mScreenCaptureOperation(nullptr)
, mSkipMenu (false)
, mUseSound (true)
, mCompileAll (false)

@ -52,7 +52,7 @@ namespace MWGui
void ContainerWindow::onItemSelected(int index)
{
if (mDragAndDrop->mIsOnDragAndDrop && mModel)
if (mDragAndDrop->mIsOnDragAndDrop)
{
dropItem();
return;
@ -88,6 +88,9 @@ namespace MWGui
void ContainerWindow::dragItem(MyGUI::Widget* sender, int count)
{
if (!mModel)
return;
if (!onTakeItem(mModel->getItem(mSelectedItem), count))
return;
@ -96,6 +99,9 @@ namespace MWGui
void ContainerWindow::dropItem()
{
if (!mModel)
return;
bool success = mModel->onDropItem(mDragAndDrop->mItem.mBase, mDragAndDrop->mDraggedCount);
if (success)
@ -104,7 +110,7 @@ namespace MWGui
void ContainerWindow::onBackgroundSelected()
{
if (mDragAndDrop->mIsOnDragAndDrop && mModel)
if (mDragAndDrop->mIsOnDragAndDrop)
dropItem();
}

@ -37,6 +37,7 @@ namespace MWGui
, mLastRenderTime(0.0)
, mLoadingOnTime(0.0)
, mImportantLabel(false)
, mVisible(false)
, mProgress(0)
, mShowWallpaper(true)
{

@ -161,6 +161,12 @@ namespace MWGui
}
}
assert(index != -1);
if (index < 0)
{
mSelected = nullptr;
return;
}
mSelected = &mKey[index];
// prevent reallocation of zero key from Type_HandToHand

@ -26,6 +26,7 @@ namespace MWGui
Spell()
: mType(Type_Spell)
, mCount(0)
, mSelected(false)
, mActive(false)
{

@ -898,7 +898,8 @@ namespace MWGui
mKeyboardNavigation->onFrame();
mMessageBoxManager->onFrame(frameDuration);
if (mMessageBoxManager)
mMessageBoxManager->onFrame(frameDuration);
mToolTips->onFrame(frameDuration);

@ -203,6 +203,7 @@ namespace MWRender
, mNightEyeFactor(0.f)
, mDistantFog(false)
, mDistantTerrain(false)
, mFieldOfViewOverridden(false)
, mFieldOfViewOverride(0.f)
, mBorders(false)
{
@ -691,9 +692,6 @@ namespace MWRender
int screenshotW = mViewer->getCamera()->getViewport()->width();
int screenshotH = mViewer->getCamera()->getViewport()->height();
int screenshotMapping = 0;
int cubeSize = screenshotMapping == 2 ?
screenshotW: // planet mapping needs higher resolution
screenshotW / 2;
std::vector<std::string> settingArgs;
boost::algorithm::split(settingArgs,settingStr,boost::is_any_of(" "));
@ -717,7 +715,10 @@ namespace MWRender
return false;
}
}
// planet mapping needs higher resolution
int cubeSize = screenshotMapping == 2 ? screenshotW : screenshotW / 2;
if (settingArgs.size() > 1)
screenshotW = std::min(10000,std::atoi(settingArgs[1].c_str()));

@ -1117,6 +1117,7 @@ SkyManager::SkyManager(osg::Group* parentNode, Resource::SceneManager* sceneMana
, mWindSpeed(0.f)
, mEnabled(true)
, mSunEnabled(true)
, mWeatherAlpha(0.f)
{
osg::ref_ptr<CameraRelativeTransform> skyroot (new CameraRelativeTransform);
skyroot->setName("Sky Root");

@ -1180,9 +1180,9 @@ namespace MWWorld
addContainerScripts (getPlayerPtr(), newCell);
newPtr = getPlayerPtr();
}
else
else if (currCell)
{
bool currCellActive = currCell && mWorldScene->isCellActive(*currCell);
bool currCellActive = mWorldScene->isCellActive(*currCell);
bool newCellActive = newCell && mWorldScene->isCellActive(*newCell);
if (!currCellActive && newCellActive)
{

@ -182,8 +182,10 @@ static void gdb_info(pid_t pid)
/* Error creating temp file */
if(fd >= 0)
{
close(fd);
remove(respfile);
if (close(fd) == 0)
remove(respfile);
else
std::cerr << "Warning: can not close and remove file '" << respfile << "': " << std::strerror(errno) << std::endl;
}
printf("!!! Could not create gdb command file\n");
}

@ -37,6 +37,8 @@ namespace ESMTerrain
}
LandObject::LandObject(const LandObject &copy, const osg::CopyOp &copyop)
: mLand(nullptr)
, mLoadFlags(0)
{
}

@ -1295,9 +1295,10 @@ const char* TiXmlUnknown::Parse( const char* p, TiXmlParsingData* data, TiXmlEnc
++p;
}
if ( !p )
if ( !p || !*p )
{
if ( document ) document->SetError( TIXML_ERROR_PARSING_UNKNOWN, 0, 0, encoding );
if ( document ) document->SetError( TIXML_ERROR_PARSING_UNKNOWN, 0, 0, encoding );
return 0;
}
if ( *p == '>' )
return p+1;

Loading…
Cancel
Save