mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 07:32:00 -04:00
Merged pull request #1837
This commit is contained in:
commit
452a706047
@ -20,6 +20,7 @@ namespace ESSImport
|
|||||||
item.mId = contItem.mItem.toString();
|
item.mId = contItem.mItem.toString();
|
||||||
item.mCount = contItem.mCount;
|
item.mCount = contItem.mCount;
|
||||||
item.mRelativeEquipmentSlot = -1;
|
item.mRelativeEquipmentSlot = -1;
|
||||||
|
item.mLockLevel = 0;
|
||||||
|
|
||||||
unsigned int itemCount = std::abs(item.mCount);
|
unsigned int itemCount = std::abs(item.mCount);
|
||||||
bool separateStacks = false;
|
bool separateStacks = false;
|
||||||
|
@ -198,6 +198,7 @@ OMW::Engine::Engine(Files::ConfigurationManager& configurationManager)
|
|||||||
: mWindow(NULL)
|
: mWindow(NULL)
|
||||||
, mEncoding(ToUTF8::WINDOWS_1252)
|
, mEncoding(ToUTF8::WINDOWS_1252)
|
||||||
, mEncoder(NULL)
|
, mEncoder(NULL)
|
||||||
|
, mScreenCaptureOperation(nullptr)
|
||||||
, mSkipMenu (false)
|
, mSkipMenu (false)
|
||||||
, mUseSound (true)
|
, mUseSound (true)
|
||||||
, mCompileAll (false)
|
, mCompileAll (false)
|
||||||
|
@ -52,7 +52,7 @@ namespace MWGui
|
|||||||
|
|
||||||
void ContainerWindow::onItemSelected(int index)
|
void ContainerWindow::onItemSelected(int index)
|
||||||
{
|
{
|
||||||
if (mDragAndDrop->mIsOnDragAndDrop && mModel)
|
if (mDragAndDrop->mIsOnDragAndDrop)
|
||||||
{
|
{
|
||||||
dropItem();
|
dropItem();
|
||||||
return;
|
return;
|
||||||
@ -88,6 +88,9 @@ namespace MWGui
|
|||||||
|
|
||||||
void ContainerWindow::dragItem(MyGUI::Widget* sender, int count)
|
void ContainerWindow::dragItem(MyGUI::Widget* sender, int count)
|
||||||
{
|
{
|
||||||
|
if (!mModel)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!onTakeItem(mModel->getItem(mSelectedItem), count))
|
if (!onTakeItem(mModel->getItem(mSelectedItem), count))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -96,6 +99,9 @@ namespace MWGui
|
|||||||
|
|
||||||
void ContainerWindow::dropItem()
|
void ContainerWindow::dropItem()
|
||||||
{
|
{
|
||||||
|
if (!mModel)
|
||||||
|
return;
|
||||||
|
|
||||||
bool success = mModel->onDropItem(mDragAndDrop->mItem.mBase, mDragAndDrop->mDraggedCount);
|
bool success = mModel->onDropItem(mDragAndDrop->mItem.mBase, mDragAndDrop->mDraggedCount);
|
||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
@ -104,7 +110,7 @@ namespace MWGui
|
|||||||
|
|
||||||
void ContainerWindow::onBackgroundSelected()
|
void ContainerWindow::onBackgroundSelected()
|
||||||
{
|
{
|
||||||
if (mDragAndDrop->mIsOnDragAndDrop && mModel)
|
if (mDragAndDrop->mIsOnDragAndDrop)
|
||||||
dropItem();
|
dropItem();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ namespace MWGui
|
|||||||
, mLastRenderTime(0.0)
|
, mLastRenderTime(0.0)
|
||||||
, mLoadingOnTime(0.0)
|
, mLoadingOnTime(0.0)
|
||||||
, mImportantLabel(false)
|
, mImportantLabel(false)
|
||||||
|
, mVisible(false)
|
||||||
, mProgress(0)
|
, mProgress(0)
|
||||||
, mShowWallpaper(true)
|
, mShowWallpaper(true)
|
||||||
{
|
{
|
||||||
|
@ -161,6 +161,12 @@ namespace MWGui
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
assert(index != -1);
|
assert(index != -1);
|
||||||
|
if (index < 0)
|
||||||
|
{
|
||||||
|
mSelected = nullptr;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
mSelected = &mKey[index];
|
mSelected = &mKey[index];
|
||||||
|
|
||||||
// prevent reallocation of zero key from Type_HandToHand
|
// prevent reallocation of zero key from Type_HandToHand
|
||||||
|
@ -26,6 +26,7 @@ namespace MWGui
|
|||||||
|
|
||||||
Spell()
|
Spell()
|
||||||
: mType(Type_Spell)
|
: mType(Type_Spell)
|
||||||
|
, mCount(0)
|
||||||
, mSelected(false)
|
, mSelected(false)
|
||||||
, mActive(false)
|
, mActive(false)
|
||||||
{
|
{
|
||||||
|
@ -898,7 +898,8 @@ namespace MWGui
|
|||||||
|
|
||||||
mKeyboardNavigation->onFrame();
|
mKeyboardNavigation->onFrame();
|
||||||
|
|
||||||
mMessageBoxManager->onFrame(frameDuration);
|
if (mMessageBoxManager)
|
||||||
|
mMessageBoxManager->onFrame(frameDuration);
|
||||||
|
|
||||||
mToolTips->onFrame(frameDuration);
|
mToolTips->onFrame(frameDuration);
|
||||||
|
|
||||||
|
@ -203,6 +203,7 @@ namespace MWRender
|
|||||||
, mNightEyeFactor(0.f)
|
, mNightEyeFactor(0.f)
|
||||||
, mDistantFog(false)
|
, mDistantFog(false)
|
||||||
, mDistantTerrain(false)
|
, mDistantTerrain(false)
|
||||||
|
, mFieldOfViewOverridden(false)
|
||||||
, mFieldOfViewOverride(0.f)
|
, mFieldOfViewOverride(0.f)
|
||||||
, mBorders(false)
|
, mBorders(false)
|
||||||
{
|
{
|
||||||
@ -691,9 +692,6 @@ namespace MWRender
|
|||||||
int screenshotW = mViewer->getCamera()->getViewport()->width();
|
int screenshotW = mViewer->getCamera()->getViewport()->width();
|
||||||
int screenshotH = mViewer->getCamera()->getViewport()->height();
|
int screenshotH = mViewer->getCamera()->getViewport()->height();
|
||||||
int screenshotMapping = 0;
|
int screenshotMapping = 0;
|
||||||
int cubeSize = screenshotMapping == 2 ?
|
|
||||||
screenshotW: // planet mapping needs higher resolution
|
|
||||||
screenshotW / 2;
|
|
||||||
|
|
||||||
std::vector<std::string> settingArgs;
|
std::vector<std::string> settingArgs;
|
||||||
boost::algorithm::split(settingArgs,settingStr,boost::is_any_of(" "));
|
boost::algorithm::split(settingArgs,settingStr,boost::is_any_of(" "));
|
||||||
@ -718,6 +716,9 @@ namespace MWRender
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// planet mapping needs higher resolution
|
||||||
|
int cubeSize = screenshotMapping == 2 ? screenshotW : screenshotW / 2;
|
||||||
|
|
||||||
if (settingArgs.size() > 1)
|
if (settingArgs.size() > 1)
|
||||||
screenshotW = std::min(10000,std::atoi(settingArgs[1].c_str()));
|
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)
|
, mWindSpeed(0.f)
|
||||||
, mEnabled(true)
|
, mEnabled(true)
|
||||||
, mSunEnabled(true)
|
, mSunEnabled(true)
|
||||||
|
, mWeatherAlpha(0.f)
|
||||||
{
|
{
|
||||||
osg::ref_ptr<CameraRelativeTransform> skyroot (new CameraRelativeTransform);
|
osg::ref_ptr<CameraRelativeTransform> skyroot (new CameraRelativeTransform);
|
||||||
skyroot->setName("Sky Root");
|
skyroot->setName("Sky Root");
|
||||||
|
@ -1180,9 +1180,9 @@ namespace MWWorld
|
|||||||
addContainerScripts (getPlayerPtr(), newCell);
|
addContainerScripts (getPlayerPtr(), newCell);
|
||||||
newPtr = getPlayerPtr();
|
newPtr = getPlayerPtr();
|
||||||
}
|
}
|
||||||
else
|
else if (currCell)
|
||||||
{
|
{
|
||||||
bool currCellActive = currCell && mWorldScene->isCellActive(*currCell);
|
bool currCellActive = mWorldScene->isCellActive(*currCell);
|
||||||
bool newCellActive = newCell && mWorldScene->isCellActive(*newCell);
|
bool newCellActive = newCell && mWorldScene->isCellActive(*newCell);
|
||||||
if (!currCellActive && newCellActive)
|
if (!currCellActive && newCellActive)
|
||||||
{
|
{
|
||||||
|
@ -182,8 +182,10 @@ static void gdb_info(pid_t pid)
|
|||||||
/* Error creating temp file */
|
/* Error creating temp file */
|
||||||
if(fd >= 0)
|
if(fd >= 0)
|
||||||
{
|
{
|
||||||
close(fd);
|
if (close(fd) == 0)
|
||||||
remove(respfile);
|
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");
|
printf("!!! Could not create gdb command file\n");
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,8 @@ namespace ESMTerrain
|
|||||||
}
|
}
|
||||||
|
|
||||||
LandObject::LandObject(const LandObject ©, const osg::CopyOp ©op)
|
LandObject::LandObject(const LandObject ©, const osg::CopyOp ©op)
|
||||||
|
: mLand(nullptr)
|
||||||
|
, mLoadFlags(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
5
extern/oics/tinyxmlparser.cpp
vendored
5
extern/oics/tinyxmlparser.cpp
vendored
@ -1295,9 +1295,10 @@ const char* TiXmlUnknown::Parse( const char* p, TiXmlParsingData* data, TiXmlEnc
|
|||||||
++p;
|
++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 == '>' )
|
if ( *p == '>' )
|
||||||
return p+1;
|
return p+1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user