Merge pull request #89 from OpenMW/master

Add OpenMW commits up to 30 Oct
coverity_scan^2
David Cernat 8 years ago committed by GitHub
commit cd798d5f23

@ -326,7 +326,7 @@ bool Launcher::MainDialog::setupGameSettings()
foreach (const QString &path, paths) {
qDebug() << "Loading config file:" << path.toUtf8().constData();
QFile file(path);
file.setFileName(path);
if (file.exists()) {
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
cfgError(tr("Error opening OpenMW configuration file"),

@ -184,7 +184,7 @@ void CSMTools::MergeLandTexturesStage::perform (int stage, CSMDoc::Messages& mes
CSMWorld::LandTexture texture =
mState.mSource.getData().getLandTextures().getRecord (index).get();
std::ostringstream stream;
stream.clear();
stream << mNext->second-1 << "_0";
texture.mIndex = mNext->second-1;

@ -1627,264 +1627,264 @@ const char * CSMWorld::DefaultGmsts::OptionalStrings[CSMWorld::DefaultGmsts::Opt
const float CSMWorld::DefaultGmsts::FloatsDefaultValues[CSMWorld::DefaultGmsts::FloatCount] =
{
0.3, // fAIFleeFleeMult
7.0, // fAIFleeHealthMult
3.0, // fAIMagicSpellMult
1.0, // fAIMeleeArmorMult
1.0, // fAIMeleeSummWeaponMult
2.0, // fAIMeleeWeaponMult
5.0, // fAIRangeMagicSpellMult
5.0, // fAIRangeMeleeWeaponMult
2000.0, // fAlarmRadius
1.0, // fAthleticsRunBonus
40.0, // fAudioDefaultMaxDistance
5.0, // fAudioDefaultMinDistance
50.0, // fAudioMaxDistanceMult
20.0, // fAudioMinDistanceMult
60.0, // fAudioVoiceDefaultMaxDistance
10.0, // fAudioVoiceDefaultMinDistance
50.0, // fAutoPCSpellChance
80.0, // fAutoSpellChance
50.0, // fBargainOfferBase
-4.0, // fBargainOfferMulti
24.0, // fBarterGoldResetDelay
1.75, // fBaseRunMultiplier
1.25, // fBlockStillBonus
150.0, // fBribe1000Mod
75.0, // fBribe100Mod
35.0, // fBribe10Mod
60.0, // fCombatAngleXY
60.0, // fCombatAngleZ
0.25, // fCombatArmorMinMult
-90.0, // fCombatBlockLeftAngle
30.0, // fCombatBlockRightAngle
4.0, // fCombatCriticalStrikeMult
0.1, // fCombatDelayCreature
0.1, // fCombatDelayNPC
128.0, // fCombatDistance
0.3, // fCombatDistanceWerewolfMod
30.0, // fCombatForceSideAngle
0.2, // fCombatInvisoMult
1.5, // fCombatKODamageMult
45.0, // fCombatTorsoSideAngle
0.3, // fCombatTorsoStartPercent
0.8, // fCombatTorsoStopPercent
15.0, // fConstantEffectMult
72.0, // fCorpseClearDelay
72.0, // fCorpseRespawnDelay
0.5, // fCrimeGoldDiscountMult
0.9, // fCrimeGoldTurnInMult
1.0, // fCrimeStealing
0.5, // fDamageStrengthBase
0.1, // fDamageStrengthMult
5.0, // fDifficultyMult
2.5, // fDiseaseXferChance
-10.0, // fDispAttacking
-1.0, // fDispBargainFailMod
1.0, // fDispBargainSuccessMod
0.0, // fDispCrimeMod
-10.0, // fDispDiseaseMod
3.0, // fDispFactionMod
1.0, // fDispFactionRankBase
0.5, // fDispFactionRankMult
1.0, // fDispositionMod
50.0, // fDispPersonalityBase
0.5, // fDispPersonalityMult
-25.0, // fDispPickPocketMod
5.0, // fDispRaceMod
-0.5, // fDispStealing
-5.0, // fDispWeaponDrawn
0.5, // fEffectCostMult
0.1, // fElementalShieldMult
3.0, // fEnchantmentChanceMult
0.5, // fEnchantmentConstantChanceMult
100.0, // fEnchantmentConstantDurationMult
0.1, // fEnchantmentMult
1000.0, // fEnchantmentValueMult
0.3, // fEncumberedMoveEffect
5.0, // fEncumbranceStrMult
0.04, // fEndFatigueMult
0.25, // fFallAcroBase
0.01, // fFallAcroMult
400.0, // fFallDamageDistanceMin
0.0, // fFallDistanceBase
0.07, // fFallDistanceMult
2.0, // fFatigueAttackBase
0.0, // fFatigueAttackMult
1.25, // fFatigueBase
4.0, // fFatigueBlockBase
0.0, // fFatigueBlockMult
5.0, // fFatigueJumpBase
0.0, // fFatigueJumpMult
0.5, // fFatigueMult
2.5, // fFatigueReturnBase
0.02, // fFatigueReturnMult
5.0, // fFatigueRunBase
2.0, // fFatigueRunMult
1.5, // fFatigueSneakBase
1.5, // fFatigueSneakMult
0.0, // fFatigueSpellBase
0.0, // fFatigueSpellCostMult
0.0, // fFatigueSpellMult
7.0, // fFatigueSwimRunBase
0.0, // fFatigueSwimRunMult
2.5, // fFatigueSwimWalkBase
0.0, // fFatigueSwimWalkMult
0.2, // fFightDispMult
0.005, // fFightDistanceMultiplier
50.0, // fFightStealing
3000.0, // fFleeDistance
512.0, // fGreetDistanceReset
0.1, // fHandtoHandHealthPer
1.0, // fHandToHandReach
0.5, // fHoldBreathEndMult
20.0, // fHoldBreathTime
0.75, // fIdleChanceMultiplier
1.0, // fIngredientMult
0.5, // fInteriorHeadTrackMult
128.0, // fJumpAcrobaticsBase
4.0, // fJumpAcroMultiplier
0.5, // fJumpEncumbranceBase
1.0, // fJumpEncumbranceMultiplier
0.5, // fJumpMoveBase
0.5, // fJumpMoveMult
1.0, // fJumpRunMultiplier
0.5, // fKnockDownMult
5.0, // fLevelMod
0.1, // fLevelUpHealthEndMult
0.6, // fLightMaxMod
10.0, // fLuckMod
10.0, // fMagesGuildTravel
1.5, // fMagicCreatureCastDelay
0.0167, // fMagicDetectRefreshRate
1.0, // fMagicItemConstantMult
1.0, // fMagicItemCostMult
1.0, // fMagicItemOnceMult
1.0, // fMagicItemPriceMult
0.05, // fMagicItemRechargePerSecond
1.0, // fMagicItemStrikeMult
1.0, // fMagicItemUsedMult
3.0, // fMagicStartIconBlink
0.5, // fMagicSunBlockedMult
0.75, // fMajorSkillBonus
300.0, // fMaxFlySpeed
0.5, // fMaxHandToHandMult
400.0, // fMaxHeadTrackDistance
200.0, // fMaxWalkSpeed
300.0, // fMaxWalkSpeedCreature
0.9, // fMedMaxMod
0.1, // fMessageTimePerChar
5.0, // fMinFlySpeed
0.1, // fMinHandToHandMult
1.0, // fMinorSkillBonus
100.0, // fMinWalkSpeed
5.0, // fMinWalkSpeedCreature
1.25, // fMiscSkillBonus
2.0, // fNPCbaseMagickaMult
0.5, // fNPCHealthBarFade
3.0, // fNPCHealthBarTime
1.0, // fPCbaseMagickaMult
0.3, // fPerDieRollMult
5.0, // fPersonalityMod
1.0, // fPerTempMult
-1.0, // fPickLockMult
0.3, // fPickPocketMod
20.0, // fPotionMinUsefulDuration
0.5, // fPotionStrengthMult
0.5, // fPotionT1DurMult
1.5, // fPotionT1MagMult
20.0, // fPotionT4BaseStrengthMult
12.0, // fPotionT4EquipStrengthMult
3000.0, // fProjectileMaxSpeed
400.0, // fProjectileMinSpeed
25.0, // fProjectileThrownStoreChance
3.0, // fRepairAmountMult
1.0, // fRepairMult
1.0, // fReputationMod
0.15, // fRestMagicMult
0.0, // fSeriousWoundMult
0.25, // fSleepRandMod
0.3, // fSleepRestMod
-1.0, // fSneakBootMult
0.5, // fSneakDistanceBase
0.002, // fSneakDistanceMultiplier
0.5, // fSneakNoViewMult
1.0, // fSneakSkillMult
0.75, // fSneakSpeedMultiplier
1.0, // fSneakUseDelay
500.0, // fSneakUseDist
1.5, // fSneakViewMult
3.0, // fSoulGemMult
0.8, // fSpecialSkillBonus
7.0, // fSpellMakingValueMult
2.0, // fSpellPriceMult
10.0, // fSpellValueMult
0.25, // fStromWalkMult
0.7, // fStromWindSpeed
3.0, // fSuffocationDamage
0.9, // fSwimHeightScale
0.1, // fSwimRunAthleticsMult
0.5, // fSwimRunBase
0.02, // fSwimWalkAthleticsMult
0.5, // fSwimWalkBase
1.0, // fSwingBlockBase
1.0, // fSwingBlockMult
1000.0, // fTargetSpellMaxSpeed
1000.0, // fThrownWeaponMaxSpeed
300.0, // fThrownWeaponMinSpeed
0.0, // fTrapCostMult
4000.0, // fTravelMult
16000.0,// fTravelTimeMult
0.1, // fUnarmoredBase1
0.065, // fUnarmoredBase2
30.0, // fVanityDelay
10.0, // fVoiceIdleOdds
0.0, // fWaterReflectUpdateAlways
10.0, // fWaterReflectUpdateSeldom
0.1, // fWeaponDamageMult
1.0, // fWeaponFatigueBlockMult
0.25, // fWeaponFatigueMult
150.0, // fWereWolfAcrobatics
150.0, // fWereWolfAgility
1.0, // fWereWolfAlchemy
1.0, // fWereWolfAlteration
1.0, // fWereWolfArmorer
150.0, // fWereWolfAthletics
1.0, // fWereWolfAxe
1.0, // fWereWolfBlock
1.0, // fWereWolfBluntWeapon
1.0, // fWereWolfConjuration
1.0, // fWereWolfDestruction
1.0, // fWereWolfEnchant
150.0, // fWereWolfEndurance
400.0, // fWereWolfFatigue
100.0, // fWereWolfHandtoHand
2.0, // fWereWolfHealth
1.0, // fWereWolfHeavyArmor
1.0, // fWereWolfIllusion
1.0, // fWereWolfIntellegence
1.0, // fWereWolfLightArmor
1.0, // fWereWolfLongBlade
1.0, // fWereWolfLuck
100.0, // fWereWolfMagicka
1.0, // fWereWolfMarksman
1.0, // fWereWolfMediumArmor
1.0, // fWereWolfMerchantile
1.0, // fWereWolfMysticism
1.0, // fWereWolfPersonality
1.0, // fWereWolfRestoration
1.5, // fWereWolfRunMult
1.0, // fWereWolfSecurity
1.0, // fWereWolfShortBlade
1.5, // fWereWolfSilverWeaponDamageMult
1.0, // fWereWolfSneak
1.0, // fWereWolfSpear
1.0, // fWereWolfSpeechcraft
150.0, // fWereWolfSpeed
150.0, // fWereWolfStrength
100.0, // fWereWolfUnarmored
1.0, // fWereWolfWillPower
15.0 // fWortChanceValue
0.3f, // fAIFleeFleeMult
7.0f, // fAIFleeHealthMult
3.0f, // fAIMagicSpellMult
1.0f, // fAIMeleeArmorMult
1.0f, // fAIMeleeSummWeaponMult
2.0f, // fAIMeleeWeaponMult
5.0f, // fAIRangeMagicSpellMult
5.0f, // fAIRangeMeleeWeaponMult
2000.0f, // fAlarmRadius
1.0f, // fAthleticsRunBonus
40.0f, // fAudioDefaultMaxDistance
5.0f, // fAudioDefaultMinDistance
50.0f, // fAudioMaxDistanceMult
20.0f, // fAudioMinDistanceMult
60.0f, // fAudioVoiceDefaultMaxDistance
10.0f, // fAudioVoiceDefaultMinDistance
50.0f, // fAutoPCSpellChance
80.0f, // fAutoSpellChance
50.0f, // fBargainOfferBase
-4.0f, // fBargainOfferMulti
24.0f, // fBarterGoldResetDelay
1.75f, // fBaseRunMultiplier
1.25f, // fBlockStillBonus
150.0f, // fBribe1000Mod
75.0f, // fBribe100Mod
35.0f, // fBribe10Mod
60.0f, // fCombatAngleXY
60.0f, // fCombatAngleZ
0.25f, // fCombatArmorMinMult
-90.0f, // fCombatBlockLeftAngle
30.0f, // fCombatBlockRightAngle
4.0f, // fCombatCriticalStrikeMult
0.1f, // fCombatDelayCreature
0.1f, // fCombatDelayNPC
128.0f, // fCombatDistance
0.3f, // fCombatDistanceWerewolfMod
30.0f, // fCombatForceSideAngle
0.2f, // fCombatInvisoMult
1.5f, // fCombatKODamageMult
45.0f, // fCombatTorsoSideAngle
0.3f, // fCombatTorsoStartPercent
0.8f, // fCombatTorsoStopPercent
15.0f, // fConstantEffectMult
72.0f, // fCorpseClearDelay
72.0f, // fCorpseRespawnDelay
0.5f, // fCrimeGoldDiscountMult
0.9f, // fCrimeGoldTurnInMult
1.0f, // fCrimeStealing
0.5f, // fDamageStrengthBase
0.1f, // fDamageStrengthMult
5.0f, // fDifficultyMult
2.5f, // fDiseaseXferChance
-10.0f, // fDispAttacking
-1.0f, // fDispBargainFailMod
1.0f, // fDispBargainSuccessMod
0.0f, // fDispCrimeMod
-10.0f, // fDispDiseaseMod
3.0f, // fDispFactionMod
1.0f, // fDispFactionRankBase
0.5f, // fDispFactionRankMult
1.0f, // fDispositionMod
50.0f, // fDispPersonalityBase
0.5f, // fDispPersonalityMult
-25.0f, // fDispPickPocketMod
5.0f, // fDispRaceMod
-0.5f, // fDispStealing
-5.0f, // fDispWeaponDrawn
0.5f, // fEffectCostMult
0.1f, // fElementalShieldMult
3.0f, // fEnchantmentChanceMult
0.5f, // fEnchantmentConstantChanceMult
100.0f, // fEnchantmentConstantDurationMult
0.1f, // fEnchantmentMult
1000.0f, // fEnchantmentValueMult
0.3f, // fEncumberedMoveEffect
5.0f, // fEncumbranceStrMult
0.04f, // fEndFatigueMult
0.25f, // fFallAcroBase
0.01f, // fFallAcroMult
400.0f, // fFallDamageDistanceMin
0.0f, // fFallDistanceBase
0.07f, // fFallDistanceMult
2.0f, // fFatigueAttackBase
0.0f, // fFatigueAttackMult
1.25f, // fFatigueBase
4.0f, // fFatigueBlockBase
0.0f, // fFatigueBlockMult
5.0f, // fFatigueJumpBase
0.0f, // fFatigueJumpMult
0.5f, // fFatigueMult
2.5f, // fFatigueReturnBase
0.02f, // fFatigueReturnMult
5.0f, // fFatigueRunBase
2.0f, // fFatigueRunMult
1.5f, // fFatigueSneakBase
1.5f, // fFatigueSneakMult
0.0f, // fFatigueSpellBase
0.0f, // fFatigueSpellCostMult
0.0f, // fFatigueSpellMult
7.0f, // fFatigueSwimRunBase
0.0f, // fFatigueSwimRunMult
2.5f, // fFatigueSwimWalkBase
0.0f, // fFatigueSwimWalkMult
0.2f, // fFightDispMult
0.005f, // fFightDistanceMultiplier
50.0f, // fFightStealing
3000.0f, // fFleeDistance
512.0f, // fGreetDistanceReset
0.1f, // fHandtoHandHealthPer
1.0f, // fHandToHandReach
0.5f, // fHoldBreathEndMult
20.0f, // fHoldBreathTime
0.75f, // fIdleChanceMultiplier
1.0f, // fIngredientMult
0.5f, // fInteriorHeadTrackMult
128.0f, // fJumpAcrobaticsBase
4.0f, // fJumpAcroMultiplier
0.5f, // fJumpEncumbranceBase
1.0f, // fJumpEncumbranceMultiplier
0.5f, // fJumpMoveBase
0.5f, // fJumpMoveMult
1.0f, // fJumpRunMultiplier
0.5f, // fKnockDownMult
5.0f, // fLevelMod
0.1f, // fLevelUpHealthEndMult
0.6f, // fLightMaxMod
10.0f, // fLuckMod
10.0f, // fMagesGuildTravel
1.5f, // fMagicCreatureCastDelay
0.0167f, // fMagicDetectRefreshRate
1.0f, // fMagicItemConstantMult
1.0f, // fMagicItemCostMult
1.0f, // fMagicItemOnceMult
1.0f, // fMagicItemPriceMult
0.05f, // fMagicItemRechargePerSecond
1.0f, // fMagicItemStrikeMult
1.0f, // fMagicItemUsedMult
3.0f, // fMagicStartIconBlink
0.5f, // fMagicSunBlockedMult
0.75f, // fMajorSkillBonus
300.0f, // fMaxFlySpeed
0.5f, // fMaxHandToHandMult
400.0f, // fMaxHeadTrackDistance
200.0f, // fMaxWalkSpeed
300.0f, // fMaxWalkSpeedCreature
0.9f, // fMedMaxMod
0.1f, // fMessageTimePerChar
5.0f, // fMinFlySpeed
0.1f, // fMinHandToHandMult
1.0f, // fMinorSkillBonus
100.0f, // fMinWalkSpeed
5.0f, // fMinWalkSpeedCreature
1.25f, // fMiscSkillBonus
2.0f, // fNPCbaseMagickaMult
0.5f, // fNPCHealthBarFade
3.0f, // fNPCHealthBarTime
1.0f, // fPCbaseMagickaMult
0.3f, // fPerDieRollMult
5.0f, // fPersonalityMod
1.0f, // fPerTempMult
-1.0f, // fPickLockMult
0.3f, // fPickPocketMod
20.0f, // fPotionMinUsefulDuration
0.5f, // fPotionStrengthMult
0.5f, // fPotionT1DurMult
1.5f, // fPotionT1MagMult
20.0f, // fPotionT4BaseStrengthMult
12.0f, // fPotionT4EquipStrengthMult
3000.0f, // fProjectileMaxSpeed
400.0f, // fProjectileMinSpeed
25.0f, // fProjectileThrownStoreChance
3.0f, // fRepairAmountMult
1.0f, // fRepairMult
1.0f, // fReputationMod
0.15f, // fRestMagicMult
0.0f, // fSeriousWoundMult
0.25f, // fSleepRandMod
0.3f, // fSleepRestMod
-1.0f, // fSneakBootMult
0.5f, // fSneakDistanceBase
0.002f, // fSneakDistanceMultiplier
0.5f, // fSneakNoViewMult
1.0f, // fSneakSkillMult
0.75f, // fSneakSpeedMultiplier
1.0f, // fSneakUseDelay
500.0f, // fSneakUseDist
1.5f, // fSneakViewMult
3.0f, // fSoulGemMult
0.8f, // fSpecialSkillBonus
7.0f, // fSpellMakingValueMult
2.0f, // fSpellPriceMult
10.0f, // fSpellValueMult
0.25f, // fStromWalkMult
0.7f, // fStromWindSpeed
3.0f, // fSuffocationDamage
0.9f, // fSwimHeightScale
0.1f, // fSwimRunAthleticsMult
0.5f, // fSwimRunBase
0.02f, // fSwimWalkAthleticsMult
0.5f, // fSwimWalkBase
1.0f, // fSwingBlockBase
1.0f, // fSwingBlockMult
1000.0f, // fTargetSpellMaxSpeed
1000.0f, // fThrownWeaponMaxSpeed
300.0f, // fThrownWeaponMinSpeed
0.0f, // fTrapCostMult
4000.0f, // fTravelMult
16000.0f,// fTravelTimeMult
0.1f, // fUnarmoredBase1
0.065f, // fUnarmoredBase2
30.0f, // fVanityDelay
10.0f, // fVoiceIdleOdds
0.0f, // fWaterReflectUpdateAlways
10.0f, // fWaterReflectUpdateSeldom
0.1f, // fWeaponDamageMult
1.0f, // fWeaponFatigueBlockMult
0.25f, // fWeaponFatigueMult
150.0f, // fWereWolfAcrobatics
150.0f, // fWereWolfAgility
1.0f, // fWereWolfAlchemy
1.0f, // fWereWolfAlteration
1.0f, // fWereWolfArmorer
150.0f, // fWereWolfAthletics
1.0f, // fWereWolfAxe
1.0f, // fWereWolfBlock
1.0f, // fWereWolfBluntWeapon
1.0f, // fWereWolfConjuration
1.0f, // fWereWolfDestruction
1.0f, // fWereWolfEnchant
150.0f, // fWereWolfEndurance
400.0f, // fWereWolfFatigue
100.0f, // fWereWolfHandtoHand
2.0f, // fWereWolfHealth
1.0f, // fWereWolfHeavyArmor
1.0f, // fWereWolfIllusion
1.0f, // fWereWolfIntellegence
1.0f, // fWereWolfLightArmor
1.0f, // fWereWolfLongBlade
1.0f, // fWereWolfLuck
100.0f, // fWereWolfMagicka
1.0f, // fWereWolfMarksman
1.0f, // fWereWolfMediumArmor
1.0f, // fWereWolfMerchantile
1.0f, // fWereWolfMysticism
1.0f, // fWereWolfPersonality
1.0f, // fWereWolfRestoration
1.5f, // fWereWolfRunMult
1.0f, // fWereWolfSecurity
1.0f, // fWereWolfShortBlade
1.5f, // fWereWolfSilverWeaponDamageMult
1.0f, // fWereWolfSneak
1.0f, // fWereWolfSpear
1.0f, // fWereWolfSpeechcraft
150.0f, // fWereWolfSpeed
150.0f, // fWereWolfStrength
100.0f, // fWereWolfUnarmored
1.0f, // fWereWolfWillPower
15.0f // fWortChanceValue
};
const int CSMWorld::DefaultGmsts::IntsDefaultValues[CSMWorld::DefaultGmsts::IntCount] =

@ -191,7 +191,7 @@ void CSMWorld::IdTable::setRecord (const std::string& id, const RecordBase& reco
if (index==-1)
{
int index = mIdCollection->getAppendIndex (id, type);
index = mIdCollection->getAppendIndex (id, type);
beginInsertRows (QModelIndex(), index, index);

@ -63,7 +63,7 @@ void CSMWorld::RefCollection::load (ESM::ESMReader& reader, int cellIndex, bool
std::cerr << "Position: #" << index.first << " " << index.second
<<", Target #"<< mref.mTarget[0] << " " << mref.mTarget[1] << std::endl;
std::ostringstream stream;
stream.clear();
stream << "#" << mref.mTarget[0] << " " << mref.mTarget[1];
ref.mCell = stream.str(); // overwrite
}

@ -118,9 +118,9 @@ namespace MWClass
}
const MWWorld::ESMStore& store = MWBase::Environment::get().getWorld()->getStore();
MWWorld::ManualRef ref(store, id);
ref.getPtr().getCellRef().setPosition(ptr.getCellRef().getPosition());
MWWorld::Ptr placed = MWBase::Environment::get().getWorld()->placeObject(ref.getPtr(), ptr.getCell() , ptr.getCellRef().getPosition());
MWWorld::ManualRef manualRef(store, id);
manualRef.getPtr().getCellRef().setPosition(ptr.getCellRef().getPosition());
MWWorld::Ptr placed = MWBase::Environment::get().getWorld()->placeObject(manualRef.getPtr(), ptr.getCell() , ptr.getCellRef().getPosition());
customData.mSpawnActorId = placed.getClass().getCreatureStats(placed).getActorId();
customData.mSpawn = false;
}

@ -200,15 +200,15 @@ namespace MWGui
std::set<MWMechanics::EffectKey> effectIds = mAlchemy->listEffects();
Widgets::SpellEffectList list;
unsigned int effectIndex=0;
for (std::set<MWMechanics::EffectKey>::iterator it = effectIds.begin(); it != effectIds.end(); ++it)
for (std::set<MWMechanics::EffectKey>::iterator it2 = effectIds.begin(); it2 != effectIds.end(); ++it2)
{
Widgets::SpellEffectParams params;
params.mEffectID = it->mId;
const ESM::MagicEffect* magicEffect = MWBase::Environment::get().getWorld()->getStore().get<ESM::MagicEffect>().find(it->mId);
params.mEffectID = it2->mId;
const ESM::MagicEffect* magicEffect = MWBase::Environment::get().getWorld()->getStore().get<ESM::MagicEffect>().find(it2->mId);
if (magicEffect->mData.mFlags & ESM::MagicEffect::TargetSkill)
params.mSkill = it->mArg;
params.mSkill = it2->mArg;
else if (magicEffect->mData.mFlags & ESM::MagicEffect::TargetAttribute)
params.mAttribute = it->mArg;
params.mAttribute = it2->mArg;
params.mIsConstant = true;
params.mNoTarget = true;

@ -226,7 +226,7 @@ namespace MWGui
coord.top += lineHeight;
end = categories[category].spells.end();
for (std::vector<std::string>::const_iterator it = categories[category].spells.begin(); it != end; ++it)
for (it = categories[category].spells.begin(); it != end; ++it)
{
const std::string &spellId = *it;
spellWidget = mSpellArea->createWidget<Widgets::MWSpell>("MW_StatName", coord, MyGUI::Align::Default, std::string("Spell") + MyGUI::utility::toString(i));

@ -85,8 +85,8 @@ void InventoryItemModel::update()
if (mActor.getClass().hasInventoryStore(mActor))
{
MWWorld::InventoryStore& store = mActor.getClass().getInventoryStore(mActor);
if (store.isEquipped(newItem.mBase))
MWWorld::InventoryStore& invStore = mActor.getClass().getInventoryStore(mActor);
if (invStore.isEquipped(newItem.mBase))
newItem.mType = ItemStack::Type_Equipped;
}

@ -256,7 +256,7 @@ namespace MWGui
std::string key = it->first.substr(0, underscorePos);
std::string widgetName = it->first.substr(underscorePos+1, it->first.size()-(underscorePos+1));
std::string type = "Property";
type = "Property";
size_t caretPos = key.find("^");
if (caretPos != std::string::npos)
{

@ -41,9 +41,7 @@ namespace MWMechanics
if (pathTo(actor, dest, duration, MWBase::Environment::get().getWorld()->getMaxActivationDistance())) //Stop when you get in activation range
{
// activate when reached
MWWorld::Ptr target = MWBase::Environment::get().getWorld()->getPtr(mObjectId,false);
MWBase::Environment::get().getWorld()->activate(target, actor);
return true;
}

@ -686,9 +686,9 @@ namespace MWRender
state.mAutoDisable = autodisable;
mStates[groupname] = state;
NifOsg::TextKeyMap::const_iterator textkey(textkeys.lower_bound(state.getTime()));
if (state.mPlaying)
{
NifOsg::TextKeyMap::const_iterator textkey(textkeys.lower_bound(state.getTime()));
while(textkey != textkeys.end() && textkey->first <= state.getTime())
{
handleTextKey(state, groupname, textkey, textkeys);
@ -976,14 +976,14 @@ namespace MWRender
while(!(velocity > 1.0f) && ++animiter != mAnimSources.rend())
{
const NifOsg::TextKeyMap &keys = (*animiter)->getTextKeys();
const NifOsg::TextKeyMap &keys2 = (*animiter)->getTextKeys();
const AnimSource::ControllerMap& ctrls2 = (*animiter)->mControllerMap[0];
for (AnimSource::ControllerMap::const_iterator it = ctrls2.begin(); it != ctrls2.end(); ++it)
{
if (Misc::StringUtils::ciEqual(it->first, mAccumRoot->getName()))
{
velocity = calcAnimVelocity(keys, it->second, mAccumulate, groupname);
velocity = calcAnimVelocity(keys2, it->second, mAccumulate, groupname);
break;
}
}

@ -221,10 +221,10 @@ namespace MWRender
groupname = "inventoryhandtohand";
else
{
const std::string &type = iter->getTypeName();
if(type == typeid(ESM::Lockpick).name() || type == typeid(ESM::Probe).name())
const std::string &typeName = iter->getTypeName();
if(typeName == typeid(ESM::Lockpick).name() || typeName == typeid(ESM::Probe).name())
groupname = "inventoryweapononehand";
else if(type == typeid(ESM::Weapon).name())
else if(typeName == typeid(ESM::Weapon).name())
{
MWWorld::LiveCellRef<ESM::Weapon> *ref = iter->get<ESM::Weapon>();

@ -458,9 +458,9 @@ namespace MWRender
{
mEffectManager->update(dt);
mSky->update(dt);
mWater->update(dt);
}
mWater->update(dt);
mCamera->update(dt, paused);
osg::Vec3f focal, cameraPos;

@ -39,11 +39,11 @@ namespace
{
std::ostringstream texname;
texname << "textures/water/" << tex << std::setw(2) << std::setfill('0') << i << ".dds";
osg::ref_ptr<osg::Texture2D> tex (new osg::Texture2D(resourceSystem->getImageManager()->getImage(texname.str())));
tex->setWrap(osg::Texture::WRAP_S, osg::Texture::REPEAT);
tex->setWrap(osg::Texture::WRAP_T, osg::Texture::REPEAT);
resourceSystem->getSceneManager()->applyFilterSettings(tex);
textures.push_back(tex);
osg::ref_ptr<osg::Texture2D> tex2 (new osg::Texture2D(resourceSystem->getImageManager()->getImage(texname.str())));
tex2->setWrap(osg::Texture::WRAP_S, osg::Texture::REPEAT);
tex2->setWrap(osg::Texture::WRAP_T, osg::Texture::REPEAT);
resourceSystem->getSceneManager()->applyFilterSettings(tex2);
textures.push_back(tex2);
}
osg::ref_ptr<NifOsg::FlipController> controller (new NifOsg::FlipController(0, 0.3f/rippleFrameCount, textures));

@ -238,15 +238,15 @@ namespace MWScript
else
{
char type = declarations.getType (iter->first);
char index = declarations.getIndex (iter->first);
int index2 = declarations.getIndex (iter->first);
try
{
switch (type)
{
case 's': mShorts.at (index) = iter->second.getInteger(); break;
case 'l': mLongs.at (index) = iter->second.getInteger(); break;
case 'f': mFloats.at (index) = iter->second.getFloat(); break;
case 's': mShorts.at (index2) = iter->second.getInteger(); break;
case 'l': mLongs.at (index2) = iter->second.getInteger(); break;
case 'f': mFloats.at (index2) = iter->second.getFloat(); break;
// silently ignore locals that don't exist anymore
}

@ -24,7 +24,7 @@ Wizard::ComponentSelectionPage::ComponentSelectionPage(QWidget *parent) :
}
void Wizard::ComponentSelectionPage::updateButton(QListWidgetItem *item)
void Wizard::ComponentSelectionPage::updateButton(QListWidgetItem*)
{
if (field(QLatin1String("installation.new")).toBool() == true)
return; // Morrowind is always checked here

@ -63,13 +63,13 @@ bool Wizard::ExistingInstallationPage::validatePage()
The Wizard needs to update settings in this file.<br><br> \
Press \"Browse...\" to specify the location manually.<br>"));
QAbstractButton *browseButton =
QAbstractButton *browseButton2 =
msgBox.addButton(QObject::tr("B&rowse..."), QMessageBox::ActionRole);
msgBox.exec();
QString iniFile;
if (msgBox.clickedButton() == browseButton) {
if (msgBox.clickedButton() == browseButton2) {
iniFile = QFileDialog::getOpenFileName(
this,
QObject::tr("Select configuration file"),

@ -165,7 +165,7 @@ void Wizard::MainWizard::setupGameSettings()
foreach (const QString &path, paths) {
qDebug() << "Loading config file:" << path.toUtf8().constData();
QFile file(path);
file.setFileName(path);
if (file.exists()) {
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
QMessageBox msgBox;

@ -192,8 +192,8 @@ void ContentSelectorView::ContentSelector::setGameFileSelected(int index, bool s
const ContentSelectorModel::EsmFile* file = mContentModel->item(fileName);
if (file != NULL)
{
QModelIndex index(mContentModel->indexFromItem(file));
mContentModel->setData(index, selected, Qt::UserRole + 1);
QModelIndex index2(mContentModel->indexFromItem(file));
mContentModel->setData(index2, selected, Qt::UserRole + 1);
}
}

Loading…
Cancel
Save