forked from mirror/openmw-tes3mp
Merge pull request #74 from OpenMW/master
Add OpenMW commits up to 5 Oct
This commit is contained in:
commit
6eae017561
18 changed files with 64 additions and 69 deletions
|
@ -824,8 +824,8 @@ void MwIniImporter::importArchives(multistrmap &cfg, const multistrmap &ini) con
|
||||||
// does not appears in the ini file
|
// does not appears in the ini file
|
||||||
cfg["fallback-archive"].push_back("Morrowind.bsa");
|
cfg["fallback-archive"].push_back("Morrowind.bsa");
|
||||||
|
|
||||||
for(std::vector<std::string>::const_iterator it=archives.begin(); it!=archives.end(); ++it) {
|
for(std::vector<std::string>::const_iterator iter=archives.begin(); iter!=archives.end(); ++iter) {
|
||||||
cfg["fallback-archive"].push_back(*it);
|
cfg["fallback-archive"].push_back(*iter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -865,8 +865,8 @@ void MwIniImporter::importGameFiles(multistrmap &cfg, const multistrmap &ini, co
|
||||||
|
|
||||||
// this will sort files by time order first, then alphabetical (maybe), I suspect non ASCII filenames will be stuffed.
|
// this will sort files by time order first, then alphabetical (maybe), I suspect non ASCII filenames will be stuffed.
|
||||||
sort(contentFiles.begin(), contentFiles.end());
|
sort(contentFiles.begin(), contentFiles.end());
|
||||||
for(std::vector<std::pair<std::time_t, std::string> >::const_iterator it=contentFiles.begin(); it!=contentFiles.end(); ++it) {
|
for(std::vector<std::pair<std::time_t, std::string> >::const_iterator iter=contentFiles.begin(); iter!=contentFiles.end(); ++iter) {
|
||||||
cfg["content"].push_back(it->second);
|
cfg["content"].push_back(iter->second);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -217,7 +217,7 @@ namespace MWBase
|
||||||
virtual bool toggleSky() = 0;
|
virtual bool toggleSky() = 0;
|
||||||
///< \return Resulting mode
|
///< \return Resulting mode
|
||||||
|
|
||||||
virtual void changeWeather(const std::string& region, unsigned int id) = 0;
|
virtual void changeWeather(const std::string& region, const unsigned int id) = 0;
|
||||||
|
|
||||||
virtual int getCurrentWeather() const = 0;
|
virtual int getCurrentWeather() const = 0;
|
||||||
|
|
||||||
|
|
|
@ -146,9 +146,6 @@ namespace MWClass
|
||||||
|
|
||||||
float epsilon = 0.0005f;
|
float epsilon = 0.0005f;
|
||||||
|
|
||||||
if (ref->mBase->mData.mWeight == 0)
|
|
||||||
return ESM::Skill::Unarmored;
|
|
||||||
|
|
||||||
if (ref->mBase->mData.mWeight <= iWeight * gmst.find ("fLightMaxMod")->getFloat() + epsilon)
|
if (ref->mBase->mData.mWeight <= iWeight * gmst.find ("fLightMaxMod")->getFloat() + epsilon)
|
||||||
return ESM::Skill::LightArmor;
|
return ESM::Skill::LightArmor;
|
||||||
|
|
||||||
|
@ -220,16 +217,19 @@ namespace MWClass
|
||||||
std::string text;
|
std::string text;
|
||||||
|
|
||||||
// get armor type string (light/medium/heavy)
|
// get armor type string (light/medium/heavy)
|
||||||
int armorType = getEquipmentSkill(ptr);
|
|
||||||
std::string typeText;
|
std::string typeText;
|
||||||
if (armorType == ESM::Skill::LightArmor)
|
if (ref->mBase->mData.mWeight == 0)
|
||||||
typeText = "#{sLight}";
|
|
||||||
else if (armorType == ESM::Skill::MediumArmor)
|
|
||||||
typeText = "#{sMedium}";
|
|
||||||
else if (armorType == ESM::Skill::HeavyArmor)
|
|
||||||
typeText = "#{sHeavy}";
|
|
||||||
else // if (armorType == ESM::Skill::Unarmored)
|
|
||||||
typeText = "";
|
typeText = "";
|
||||||
|
else
|
||||||
|
{
|
||||||
|
int armorType = getEquipmentSkill(ptr);
|
||||||
|
if (armorType == ESM::Skill::LightArmor)
|
||||||
|
typeText = "#{sLight}";
|
||||||
|
else if (armorType == ESM::Skill::MediumArmor)
|
||||||
|
typeText = "#{sMedium}";
|
||||||
|
else
|
||||||
|
typeText = "#{sHeavy}";
|
||||||
|
}
|
||||||
|
|
||||||
text += "\n#{sArmorRating}: " + MWGui::ToolTips::toString(getEffectiveArmorRating(ptr,
|
text += "\n#{sArmorRating}: " + MWGui::ToolTips::toString(getEffectiveArmorRating(ptr,
|
||||||
MWMechanics::getPlayer()));
|
MWMechanics::getPlayer()));
|
||||||
|
|
|
@ -1202,7 +1202,6 @@ namespace MWClass
|
||||||
|
|
||||||
switch(boots->getClass().getEquipmentSkill(*boots))
|
switch(boots->getClass().getEquipmentSkill(*boots))
|
||||||
{
|
{
|
||||||
case ESM::Skill::Unarmored:
|
|
||||||
case ESM::Skill::LightArmor:
|
case ESM::Skill::LightArmor:
|
||||||
return (name == "left") ? "FootLightLeft" : "FootLightRight";
|
return (name == "left") ? "FootLightLeft" : "FootLightRight";
|
||||||
case ESM::Skill::MediumArmor:
|
case ESM::Skill::MediumArmor:
|
||||||
|
|
|
@ -157,7 +157,7 @@ struct TypesetBookImpl : TypesetBook
|
||||||
StyleImpl * hitTestWithMargin (int left, int top)
|
StyleImpl * hitTestWithMargin (int left, int top)
|
||||||
{
|
{
|
||||||
StyleImpl * hit = hitTest(left, top);
|
StyleImpl * hit = hitTest(left, top);
|
||||||
if (hit && hit->mInteractiveId > 0)
|
if (hit && hit->mInteractiveId != 0)
|
||||||
return hit;
|
return hit;
|
||||||
|
|
||||||
const int maxMargin = 10;
|
const int maxMargin = 10;
|
||||||
|
@ -174,7 +174,7 @@ struct TypesetBookImpl : TypesetBook
|
||||||
else
|
else
|
||||||
hit = hitTest(left+margin, top);
|
hit = hitTest(left+margin, top);
|
||||||
|
|
||||||
if (hit && hit->mInteractiveId > 0)
|
if (hit && hit->mInteractiveId != 0)
|
||||||
return hit;
|
return hit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -193,9 +193,8 @@ namespace MWGui
|
||||||
|
|
||||||
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
const MWWorld::ESMStore &store = MWBase::Environment::get().getWorld()->getStore();
|
||||||
|
|
||||||
std::vector<std::pair<std::string, std::string> > items; // class id, class name
|
std::vector<std::pair<std::string, std::string> > items; // class id, class name
|
||||||
MWWorld::Store<ESM::Class>::iterator it = store.get<ESM::Class>().begin();
|
for (MWWorld::Store<ESM::Class>::iterator it = store.get<ESM::Class>().begin(); it != store.get<ESM::Class>().end(); ++it)
|
||||||
for (; it != store.get<ESM::Class>().end(); ++it)
|
|
||||||
{
|
{
|
||||||
bool playable = (it->mData.mIsPlayable != 0);
|
bool playable = (it->mData.mIsPlayable != 0);
|
||||||
if (!playable) // Only display playable classes
|
if (!playable) // Only display playable classes
|
||||||
|
|
|
@ -494,8 +494,8 @@ namespace MWGui
|
||||||
|
|
||||||
if (!mFactions.empty())
|
if (!mFactions.empty())
|
||||||
{
|
{
|
||||||
MWWorld::Ptr player = MWMechanics::getPlayer();
|
MWWorld::Ptr playerPtr = MWMechanics::getPlayer();
|
||||||
const MWMechanics::NpcStats &PCstats = player.getClass().getNpcStats(player);
|
const MWMechanics::NpcStats &PCstats = playerPtr.getClass().getNpcStats(playerPtr);
|
||||||
const std::set<std::string> &expelled = PCstats.getExpelled();
|
const std::set<std::string> &expelled = PCstats.getExpelled();
|
||||||
|
|
||||||
bool firstFaction=true;
|
bool firstFaction=true;
|
||||||
|
|
|
@ -735,9 +735,7 @@ namespace MWGui
|
||||||
|
|
||||||
std::vector<std::string> abilities, powers, spells;
|
std::vector<std::string> abilities, powers, spells;
|
||||||
|
|
||||||
std::vector<std::string>::const_iterator it = sign->mPowers.mList.begin();
|
for (std::vector<std::string>::const_iterator it = sign->mPowers.mList.begin(); it != sign->mPowers.mList.end(); ++it)
|
||||||
std::vector<std::string>::const_iterator end = sign->mPowers.mList.end();
|
|
||||||
for (; it != end; ++it)
|
|
||||||
{
|
{
|
||||||
const std::string &spellId = *it;
|
const std::string &spellId = *it;
|
||||||
const ESM::Spell *spell = store.get<ESM::Spell>().search(spellId);
|
const ESM::Spell *spell = store.get<ESM::Spell>().search(spellId);
|
||||||
|
|
|
@ -1546,7 +1546,7 @@ namespace MWMechanics
|
||||||
for(std::vector<MWWorld::Ptr>::const_iterator iter(neighbors.begin());iter != neighbors.end();++iter)
|
for(std::vector<MWWorld::Ptr>::const_iterator iter(neighbors.begin());iter != neighbors.end();++iter)
|
||||||
{
|
{
|
||||||
const CreatureStats &stats = iter->getClass().getCreatureStats(*iter);
|
const CreatureStats &stats = iter->getClass().getCreatureStats(*iter);
|
||||||
if (stats.isDead() || *iter == actor)
|
if (stats.isDead() || *iter == actor || iter->getClass().isPureWaterCreature(*iter))
|
||||||
continue;
|
continue;
|
||||||
const bool isFollower = std::find(followers.begin(), followers.end(), *iter) != followers.end();
|
const bool isFollower = std::find(followers.begin(), followers.end(), *iter) != followers.end();
|
||||||
if (stats.getAiSequence().isInCombat(actor) || (MWBase::Environment::get().getMechanicsManager()->isAggressive(*iter, actor) && !isFollower))
|
if (stats.getAiSequence().isInCombat(actor) || (MWBase::Environment::get().getMechanicsManager()->isAggressive(*iter, actor) && !isFollower))
|
||||||
|
|
|
@ -229,6 +229,9 @@ namespace MWMechanics
|
||||||
osg::Vec3f vAimDir = MWBase::Environment::get().getWorld()->aimToTarget(actor, target);
|
osg::Vec3f vAimDir = MWBase::Environment::get().getWorld()->aimToTarget(actor, target);
|
||||||
float distToTarget = MWBase::Environment::get().getWorld()->getHitDistance(actor, target);
|
float distToTarget = MWBase::Environment::get().getWorld()->getHitDistance(actor, target);
|
||||||
|
|
||||||
|
if (!currentAction)
|
||||||
|
return;
|
||||||
|
|
||||||
storage.mReadyToAttack = (currentAction->isAttackingOrSpell() && distToTarget <= rangeAttack);
|
storage.mReadyToAttack = (currentAction->isAttackingOrSpell() && distToTarget <= rangeAttack);
|
||||||
|
|
||||||
// can't fight if attacker can't go where target is. E.g. A fish can't attack person on land.
|
// can't fight if attacker can't go where target is. E.g. A fish can't attack person on land.
|
||||||
|
|
|
@ -47,7 +47,7 @@ AiFollow::AiFollow(const std::string &actorId, bool commanded)
|
||||||
}
|
}
|
||||||
|
|
||||||
AiFollow::AiFollow(const ESM::AiSequence::AiFollow *follow)
|
AiFollow::AiFollow(const ESM::AiSequence::AiFollow *follow)
|
||||||
: mCommanded(follow->mCommanded), mRemainingDuration(follow->mRemainingDuration)
|
: mAlwaysFollow(follow->mAlwaysFollow), mCommanded(follow->mCommanded), mRemainingDuration(follow->mRemainingDuration)
|
||||||
, mX(follow->mData.mX), mY(follow->mData.mY), mZ(follow->mData.mZ)
|
, mX(follow->mData.mX), mY(follow->mData.mY), mZ(follow->mData.mZ)
|
||||||
, mActorRefId(follow->mTargetId), mActorId(-1)
|
, mActorRefId(follow->mTargetId), mActorId(-1)
|
||||||
, mCellId(follow->mCellId), mActive(follow->mActive), mFollowIndex(mFollowIndexCounter++)
|
, mCellId(follow->mCellId), mActive(follow->mActive), mFollowIndex(mFollowIndexCounter++)
|
||||||
|
|
|
@ -465,7 +465,7 @@ void CharacterController::refreshMovementAnims(const WeaponInfo* weap, Character
|
||||||
}
|
}
|
||||||
|
|
||||||
mAnimation->play(mCurrentMovement, Priority_Movement, movemask, false,
|
mAnimation->play(mCurrentMovement, Priority_Movement, movemask, false,
|
||||||
1.f, ((mode!=2)?"start":"loop start"), "stop", 0.0f, ~0ul);
|
1.f, ((mode!=2)?"start":"loop start"), "stop", 0.0f, ~0ul, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -694,6 +694,7 @@ CharacterController::CharacterController(const MWWorld::Ptr &ptr, MWRender::Anim
|
||||||
, mAnimation(anim)
|
, mAnimation(anim)
|
||||||
, mIdleState(CharState_None)
|
, mIdleState(CharState_None)
|
||||||
, mMovementState(CharState_None)
|
, mMovementState(CharState_None)
|
||||||
|
, mMovementAnimSpeed(0.f)
|
||||||
, mAdjustMovementAnimSpeed(false)
|
, mAdjustMovementAnimSpeed(false)
|
||||||
, mHasMovedInXY(false)
|
, mHasMovedInXY(false)
|
||||||
, mMovementAnimationControlled(true)
|
, mMovementAnimationControlled(true)
|
||||||
|
@ -2301,7 +2302,7 @@ void CharacterController::updateHeadTracking(float duration)
|
||||||
node = anim->getNode("Bip01 Head");
|
node = anim->getNode("Bip01 Head");
|
||||||
if (node != NULL)
|
if (node != NULL)
|
||||||
{
|
{
|
||||||
osg::NodePathList nodepaths = node->getParentalNodePaths();
|
nodepaths = node->getParentalNodePaths();
|
||||||
if (!nodepaths.empty())
|
if (!nodepaths.empty())
|
||||||
direction = osg::computeLocalToWorld(nodepaths[0]).getTrans() - headPos;
|
direction = osg::computeLocalToWorld(nodepaths[0]).getTrans() - headPos;
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,6 @@ void Repair::repair(const MWWorld::Ptr &itemToRepair)
|
||||||
// tool used up?
|
// tool used up?
|
||||||
if (mTool.getCellRef().getCharge() == 0)
|
if (mTool.getCellRef().getCharge() == 0)
|
||||||
{
|
{
|
||||||
MWWorld::Ptr player = getPlayer();
|
|
||||||
MWWorld::ContainerStore& store = player.getClass().getContainerStore(player);
|
MWWorld::ContainerStore& store = player.getClass().getContainerStore(player);
|
||||||
|
|
||||||
store.remove(mTool, 1, player);
|
store.remove(mTool, 1, player);
|
||||||
|
|
|
@ -338,7 +338,6 @@ namespace MWMechanics
|
||||||
|
|
||||||
ESM::EffectList reflectedEffects;
|
ESM::EffectList reflectedEffects;
|
||||||
std::vector<ActiveSpells::ActiveEffect> appliedLastingEffects;
|
std::vector<ActiveSpells::ActiveEffect> appliedLastingEffects;
|
||||||
bool anyHarmfulEffect = false;
|
|
||||||
|
|
||||||
// HACK: cache target's magic effects here, and add any applied effects to it. Use the cached effects for determining resistance.
|
// HACK: cache target's magic effects here, and add any applied effects to it. Use the cached effects for determining resistance.
|
||||||
// This is required for Weakness effects in a spell to apply to any subsequent effects in the spell.
|
// This is required for Weakness effects in a spell to apply to any subsequent effects in the spell.
|
||||||
|
@ -414,17 +413,15 @@ namespace MWMechanics
|
||||||
float magnitudeMult = 1;
|
float magnitudeMult = 1;
|
||||||
if (magicEffect->mData.mFlags & ESM::MagicEffect::Harmful && target.getClass().isActor())
|
if (magicEffect->mData.mFlags & ESM::MagicEffect::Harmful && target.getClass().isActor())
|
||||||
{
|
{
|
||||||
anyHarmfulEffect = true;
|
// Notify the target actor they've been hit
|
||||||
|
if (target != caster && !caster.isEmpty())
|
||||||
|
target.getClass().onHit(target, 0.0f, true, MWWorld::Ptr(), caster, osg::Vec3f(), true);
|
||||||
|
|
||||||
if (absorbed) // Absorbed, and we know there was a harmful effect (figuring that out is the only reason we are in this loop)
|
if (absorbed)
|
||||||
break;
|
continue;
|
||||||
|
|
||||||
// If player is attempting to cast a harmful spell, show the target's HP bar
|
|
||||||
if (castByPlayer && target != caster)
|
|
||||||
MWBase::Environment::get().getWindowManager()->setEnemy(target);
|
|
||||||
|
|
||||||
// Try reflecting
|
// Try reflecting
|
||||||
if (!reflected && magnitudeMult > 0 && !caster.isEmpty() && caster != target && !(magicEffect->mData.mFlags & ESM::MagicEffect::Unreflectable))
|
if (!reflected && !caster.isEmpty() && caster != target && !(magicEffect->mData.mFlags & ESM::MagicEffect::Unreflectable))
|
||||||
{
|
{
|
||||||
float reflect = target.getClass().getCreatureStats(target).getMagicEffects().get(ESM::MagicEffect::Reflect).getMagnitude();
|
float reflect = target.getClass().getCreatureStats(target).getMagicEffects().get(ESM::MagicEffect::Reflect).getMagnitude();
|
||||||
bool isReflected = (Misc::Rng::roll0to99() < reflect);
|
bool isReflected = (Misc::Rng::roll0to99() < reflect);
|
||||||
|
@ -434,23 +431,24 @@ namespace MWMechanics
|
||||||
MWBase::Environment::get().getWorld()->getAnimation(target)->addEffect(
|
MWBase::Environment::get().getWorld()->getAnimation(target)->addEffect(
|
||||||
"meshes\\" + reflectStatic->mModel, ESM::MagicEffect::Reflect, false, "");
|
"meshes\\" + reflectStatic->mModel, ESM::MagicEffect::Reflect, false, "");
|
||||||
reflectedEffects.mList.push_back(*effectIt);
|
reflectedEffects.mList.push_back(*effectIt);
|
||||||
magnitudeMult = 0;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try resisting
|
// Try resisting
|
||||||
if (magnitudeMult > 0 && target.getClass().isActor())
|
magnitudeMult = MWMechanics::getEffectMultiplier(effectIt->mEffectID, target, caster, spell, &targetEffects);
|
||||||
|
if (magnitudeMult == 0)
|
||||||
{
|
{
|
||||||
magnitudeMult = MWMechanics::getEffectMultiplier(effectIt->mEffectID, target, caster, spell, &targetEffects);
|
// Fully resisted, show message
|
||||||
if (magnitudeMult == 0)
|
if (target == getPlayer())
|
||||||
{
|
MWBase::Environment::get().getWindowManager()->messageBox("#{sMagicPCResisted}");
|
||||||
// Fully resisted, show message
|
else if (castByPlayer)
|
||||||
if (target == getPlayer())
|
MWBase::Environment::get().getWindowManager()->messageBox("#{sMagicTargetResisted}");
|
||||||
MWBase::Environment::get().getWindowManager()->messageBox("#{sMagicPCResisted}");
|
|
||||||
else if (castByPlayer)
|
|
||||||
MWBase::Environment::get().getWindowManager()->messageBox("#{sMagicTargetResisted}");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If player is attempting to cast a harmful spell, show the target's HP bar
|
||||||
|
if (castByPlayer && target != caster)
|
||||||
|
MWBase::Environment::get().getWindowManager()->setEnemy(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (magnitudeMult > 0 && !absorbed)
|
if (magnitudeMult > 0 && !absorbed)
|
||||||
|
@ -569,10 +567,6 @@ namespace MWMechanics
|
||||||
target.getClass().getCreatureStats(target).getActiveSpells().addSpell(mId, mStack, appliedLastingEffects,
|
target.getClass().getCreatureStats(target).getActiveSpells().addSpell(mId, mStack, appliedLastingEffects,
|
||||||
mSourceName, casterActorId);
|
mSourceName, casterActorId);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Notify the target actor they've been hit
|
|
||||||
if (anyHarmfulEffect && target.getClass().isActor() && target != caster && !caster.isEmpty() && caster.getClass().isActor())
|
|
||||||
target.getClass().onHit(target, 0.0f, true, MWWorld::Ptr(), caster, osg::Vec3f(), true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CastSpell::applyInstantEffect(const MWWorld::Ptr &target, const MWWorld::Ptr &caster, const MWMechanics::EffectKey& effect, float magnitude)
|
bool CastSpell::applyInstantEffect(const MWWorld::Ptr &target, const MWWorld::Ptr &caster, const MWMechanics::EffectKey& effect, float magnitude)
|
||||||
|
|
|
@ -511,11 +511,13 @@ void Water::createSimpleWaterStateSet(osg::Node* node, float alpha)
|
||||||
|
|
||||||
// use a shader to render the simple water, ensuring that fog is applied per pixel as required.
|
// use a shader to render the simple water, ensuring that fog is applied per pixel as required.
|
||||||
// this could be removed if a more detailed water mesh, using some sort of paging solution, is implemented.
|
// this could be removed if a more detailed water mesh, using some sort of paging solution, is implemented.
|
||||||
|
#if !defined(OPENGL_ES) && !defined(ANDROID)
|
||||||
Resource::SceneManager* sceneManager = mResourceSystem->getSceneManager();
|
Resource::SceneManager* sceneManager = mResourceSystem->getSceneManager();
|
||||||
bool oldValue = sceneManager->getForceShaders();
|
bool oldValue = sceneManager->getForceShaders();
|
||||||
sceneManager->setForceShaders(true);
|
sceneManager->setForceShaders(true);
|
||||||
sceneManager->recreateShaders(node);
|
sceneManager->recreateShaders(node);
|
||||||
sceneManager->setForceShaders(oldValue);
|
sceneManager->setForceShaders(oldValue);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Water::createShaderWaterStateSet(osg::Node* node, Reflection* reflection, Refraction* refraction)
|
void Water::createShaderWaterStateSet(osg::Node* node, Reflection* reflection, Refraction* refraction)
|
||||||
|
|
|
@ -2498,9 +2498,9 @@ namespace MWWorld
|
||||||
}
|
}
|
||||||
if (0 != source) {
|
if (0 != source) {
|
||||||
// Find door leading to our current teleport door
|
// Find door leading to our current teleport door
|
||||||
// and use it destination to position inside cell.
|
// and use its destination to position inside cell.
|
||||||
const DoorList &doors = source->getReadOnlyDoors().mList;
|
const DoorList &destinationDoors = source->getReadOnlyDoors().mList;
|
||||||
for (DoorList::const_iterator jt = doors.begin(); jt != doors.end(); ++jt) {
|
for (DoorList::const_iterator jt = destinationDoors.begin(); jt != destinationDoors.end(); ++jt) {
|
||||||
if (it->mRef.getTeleport() &&
|
if (it->mRef.getTeleport() &&
|
||||||
Misc::StringUtils::ciEqual(name, jt->mRef.getDestCell()))
|
Misc::StringUtils::ciEqual(name, jt->mRef.getDestCell()))
|
||||||
{
|
{
|
||||||
|
@ -3268,9 +3268,9 @@ namespace MWWorld
|
||||||
cast.mId = id;
|
cast.mId = id;
|
||||||
cast.mSourceName = sourceName;
|
cast.mSourceName = sourceName;
|
||||||
cast.mStack = false;
|
cast.mStack = false;
|
||||||
ESM::EffectList effects;
|
ESM::EffectList effectsToApply;
|
||||||
effects.mList = apply->second;
|
effectsToApply.mList = apply->second;
|
||||||
cast.inflict(apply->first, caster, effects, rangeType, false, true);
|
cast.inflict(apply->first, caster, effectsToApply, rangeType, false, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -316,7 +316,7 @@ namespace MWWorld
|
||||||
virtual bool toggleSky();
|
virtual bool toggleSky();
|
||||||
///< \return Resulting mode
|
///< \return Resulting mode
|
||||||
|
|
||||||
virtual void changeWeather (const std::string& region, unsigned int id);
|
virtual void changeWeather (const std::string& region, const unsigned int id);
|
||||||
|
|
||||||
virtual int getCurrentWeather() const;
|
virtual int getCurrentWeather() const;
|
||||||
|
|
||||||
|
|
|
@ -777,16 +777,16 @@ namespace NifOsg
|
||||||
if (ctrl->recType == Nif::RC_NiAlphaController)
|
if (ctrl->recType == Nif::RC_NiAlphaController)
|
||||||
{
|
{
|
||||||
const Nif::NiAlphaController* alphactrl = static_cast<const Nif::NiAlphaController*>(ctrl.getPtr());
|
const Nif::NiAlphaController* alphactrl = static_cast<const Nif::NiAlphaController*>(ctrl.getPtr());
|
||||||
osg::ref_ptr<AlphaController> ctrl(new AlphaController(alphactrl->data.getPtr()));
|
osg::ref_ptr<AlphaController> osgctrl(new AlphaController(alphactrl->data.getPtr()));
|
||||||
setupController(alphactrl, ctrl, animflags);
|
setupController(alphactrl, osgctrl, animflags);
|
||||||
composite->addController(ctrl);
|
composite->addController(osgctrl);
|
||||||
}
|
}
|
||||||
else if (ctrl->recType == Nif::RC_NiMaterialColorController)
|
else if (ctrl->recType == Nif::RC_NiMaterialColorController)
|
||||||
{
|
{
|
||||||
const Nif::NiMaterialColorController* matctrl = static_cast<const Nif::NiMaterialColorController*>(ctrl.getPtr());
|
const Nif::NiMaterialColorController* matctrl = static_cast<const Nif::NiMaterialColorController*>(ctrl.getPtr());
|
||||||
osg::ref_ptr<MaterialColorController> ctrl(new MaterialColorController(matctrl->data.getPtr()));
|
osg::ref_ptr<MaterialColorController> osgctrl(new MaterialColorController(matctrl->data.getPtr()));
|
||||||
setupController(matctrl, ctrl, animflags);
|
setupController(matctrl, osgctrl, animflags);
|
||||||
composite->addController(ctrl);
|
composite->addController(osgctrl);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
std::cerr << "Unexpected material controller " << ctrl->recType << " in " << mFilename << std::endl;
|
std::cerr << "Unexpected material controller " << ctrl->recType << " in " << mFilename << std::endl;
|
||||||
|
|
Loading…
Reference in a new issue