forked from mirror/openmw-tes3mp
Merge remote-tracking branch 'scrawl/master'
This commit is contained in:
commit
d32fcb99b5
8 changed files with 21 additions and 12 deletions
|
@ -248,7 +248,7 @@ int main(int argc, char**argv)
|
|||
{
|
||||
#if OGRE_PLATFORM == OGRE_PLATFORM_LINUX || OGRE_PLATFORM == OGRE_PLATFORM_APPLE
|
||||
// Unix crash catcher
|
||||
if (!is_debugger_attached())
|
||||
if ((argc == 2 && strcmp(argv[1], "--cc-handle-crash") == 0) || !is_debugger_attached())
|
||||
{
|
||||
int s[5] = { SIGSEGV, SIGILL, SIGFPE, SIGBUS, SIGABRT };
|
||||
cc_install_handlers(argc, argv, 5, s, "crash.log", NULL);
|
||||
|
|
|
@ -86,12 +86,13 @@ void CompanionWindow::onBackgroundSelected()
|
|||
void CompanionWindow::open(const MWWorld::Ptr& npc)
|
||||
{
|
||||
mPtr = npc;
|
||||
setTitle(MWWorld::Class::get(npc).getName(npc));
|
||||
updateEncumbranceBar();
|
||||
|
||||
mModel = new CompanionItemModel(npc);
|
||||
mSortModel = new SortFilterItemModel(mModel);
|
||||
mItemView->setModel(mSortModel);
|
||||
|
||||
setTitle(MWWorld::Class::get(npc).getName(npc));
|
||||
}
|
||||
|
||||
void CompanionWindow::onFrame()
|
||||
|
|
|
@ -220,11 +220,13 @@ namespace MWGui
|
|||
|
||||
mDisposeCorpseButton->setVisible(loot);
|
||||
|
||||
setTitle(MWWorld::Class::get(container).getName(container));
|
||||
|
||||
mSortModel = new SortFilterItemModel(mModel);
|
||||
|
||||
mItemView->setModel (mSortModel);
|
||||
|
||||
// Careful here. setTitle may cause size updates, causing itemview redraw, so make sure to do it last
|
||||
// or we end up using a possibly invalid model.
|
||||
setTitle(MWWorld::Class::get(container).getName(container));
|
||||
}
|
||||
|
||||
void ContainerWindow::onCloseButtonClicked(MyGUI::Widget* _sender)
|
||||
|
|
|
@ -82,7 +82,6 @@ namespace MWGui
|
|||
void TradeWindow::startTrade(const MWWorld::Ptr& actor)
|
||||
{
|
||||
mPtr = actor;
|
||||
setTitle(MWWorld::Class::get(actor).getName(actor));
|
||||
|
||||
mCurrentBalance = 0;
|
||||
mCurrentMerchantOffer = 0;
|
||||
|
@ -99,6 +98,10 @@ namespace MWGui
|
|||
mItemView->setModel (mSortModel);
|
||||
|
||||
updateLabels();
|
||||
|
||||
// Careful here. setTitle may cause size updates, causing itemview redraw, so make sure to do it last
|
||||
// or we end up using a possibly invalid model.
|
||||
setTitle(MWWorld::Class::get(actor).getName(actor));
|
||||
}
|
||||
|
||||
void TradeWindow::onFilterChanged(MyGUI::Widget* _sender)
|
||||
|
|
|
@ -24,8 +24,6 @@ namespace MWMechanics
|
|||
int mId;
|
||||
int mArg; // skill or ability
|
||||
|
||||
// TODO: Add caster here for Absorb effects?
|
||||
|
||||
EffectKey();
|
||||
|
||||
EffectKey (int id, int arg = -1) : mId (id), mArg (arg) {}
|
||||
|
|
|
@ -1045,7 +1045,9 @@ void Animation::updateEffects(float duration)
|
|||
NifOgre::ObjectList& objects = it->mObjects;
|
||||
for(size_t i = 0; i < objects.mControllers.size() ;i++)
|
||||
{
|
||||
static_cast<EffectAnimationValue*> (objects.mControllers[i].getSource().get())->addTime(duration);
|
||||
EffectAnimationValue* value = dynamic_cast<EffectAnimationValue*>(objects.mControllers[i].getSource().get());
|
||||
if (value)
|
||||
value->addTime(duration);
|
||||
|
||||
objects.mControllers[i].update();
|
||||
}
|
||||
|
@ -1058,7 +1060,9 @@ void Animation::updateEffects(float duration)
|
|||
float remainder = objects.mControllers[0].getSource()->getValue() - objects.mMaxControllerLength;
|
||||
for(size_t i = 0; i < objects.mControllers.size() ;i++)
|
||||
{
|
||||
static_cast<EffectAnimationValue*> (objects.mControllers[i].getSource().get())->resetTime(remainder);
|
||||
EffectAnimationValue* value = dynamic_cast<EffectAnimationValue*>(objects.mControllers[i].getSource().get());
|
||||
if (value)
|
||||
value->resetTime(remainder);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -2166,7 +2166,10 @@ namespace MWWorld
|
|||
if (!contact.first.isEmpty())
|
||||
{
|
||||
if (contact.first.getClass().isActor())
|
||||
contact.first.getClass().getCreatureStats(contact.first).getActiveSpells().addSpell(selectedSpell, contact.first, actor, ESM::RT_Touch, sourceName);
|
||||
{
|
||||
if (!contact.first.getClass().getCreatureStats(contact.first).isDead())
|
||||
contact.first.getClass().getCreatureStats(contact.first).getActiveSpells().addSpell(selectedSpell, contact.first, actor, ESM::RT_Touch, sourceName);
|
||||
}
|
||||
else
|
||||
{
|
||||
// We hit a non-actor, e.g. a door. Only instant effects are relevant.
|
||||
|
|
|
@ -132,8 +132,6 @@ short MagicEffect::getResistanceEffect(short effect)
|
|||
short MagicEffect::getWeaknessEffect(short effect)
|
||||
{
|
||||
std::map<short, short> effects;
|
||||
effects[DisintegrateArmor] = Sanctuary;
|
||||
effects[DisintegrateWeapon] = Sanctuary;
|
||||
|
||||
for (int i=0; i<5; ++i)
|
||||
effects[DrainAttribute+i] = WeaknessToMagicka;
|
||||
|
|
Loading…
Reference in a new issue