Merge remote-tracking branch 'jordan-ayers/topic/misc-cleanup'

deque
Marc Zinnschlag 10 years ago
commit 744c56943a

@ -478,7 +478,7 @@ void OMW::Engine::go()
}
// Start the main rendering loop
while (!mEnvironment.get().getStateManager()->hasQuitRequest())
while (!MWBase::Environment::get().getStateManager()->hasQuitRequest())
Ogre::Root::getSingleton().renderOneFrame();
// Save user settings

@ -63,7 +63,7 @@ namespace MWClass
virtual int getItemMaxHealth (const MWWorld::Ptr& ptr) const;
///< Return item max health or throw an exception, if class does not have item health
/// (default implementation: throw an exceoption)
/// (default implementation: throw an exception)
virtual float getWeight (const MWWorld::Ptr& ptr) const;

@ -246,10 +246,7 @@ namespace MWMechanics
const ESM::Spell* spell, const MagicEffects* effects)
{
float resistance = getEffectResistance(effectId, actor, caster, spell, effects);
if (resistance >= 0)
return 1 - resistance / 100.f;
else
return -(resistance-100) / 100.f;
return 1 - resistance / 100.f;
}
/// Check if the given affect can be applied to the target. If \a castByPlayer, emits a message box on failure.

@ -51,6 +51,10 @@ namespace MWMechanics
float getEffectResistance (short effectId, const MWWorld::Ptr& actor, const MWWorld::Ptr& caster,
const ESM::Spell* spell = NULL, const MagicEffects* effects = NULL);
/// Get an effect multiplier for applying an effect cast by the given actor in the given spell (optional).
/// @return effect multiplier from 0 to 2. (100% net resistance to 100% net weakness)
/// @param effects Override the actor's current magicEffects. Useful if there are effects currently
/// being applied (but not applied yet) that should also be considered.
float getEffectMultiplier(short effectId, const MWWorld::Ptr& actor, const MWWorld::Ptr& caster,
const ESM::Spell* spell = NULL, const MagicEffects* effects = NULL);

@ -96,7 +96,7 @@ namespace MWWorld
virtual MWMechanics::CreatureStats& getCreatureStats (const Ptr& ptr) const;
///< Return creature stats or throw an exception, if class does not have creature stats
/// (default implementation: throw an exceoption)
/// (default implementation: throw an exception)
virtual bool hasToolTip (const Ptr& ptr) const;
///< @return true if this object has a tooltip when focused (default implementation: false)
@ -106,7 +106,7 @@ namespace MWWorld
virtual MWMechanics::NpcStats& getNpcStats (const Ptr& ptr) const;
///< Return NPC stats or throw an exception, if class does not have NPC stats
/// (default implementation: throw an exceoption)
/// (default implementation: throw an exception)
virtual bool hasItemHealth (const Ptr& ptr) const;
///< \return Item health data available? (default implementation: false)
@ -123,7 +123,7 @@ namespace MWWorld
/// of the given attacker, and whoever is hit.
/// \param type - type of attack, one of the MWMechanics::CreatureStats::AttackType
/// enums. ignored for creature attacks.
/// (default implementation: throw an exceoption)
/// (default implementation: throw an exception)
virtual void onHit(const MWWorld::Ptr &ptr, float damage, bool ishealth, const MWWorld::Ptr &object, const MWWorld::Ptr &attacker, bool successful) const;
///< Alerts \a ptr that it's being hit for \a damage points to health if \a ishealth is
@ -139,7 +139,7 @@ namespace MWWorld
///< Sets a new current health value for the actor, optionally specifying the object causing
/// the change. Use this instead of using CreatureStats directly as this will make sure the
/// correct dialog and actor states are properly handled when being hurt or healed.
/// (default implementation: throw an exceoption)
/// (default implementation: throw an exception)
virtual boost::shared_ptr<Action> activate (const Ptr& ptr, const Ptr& actor) const;
///< Generate action for activation (default implementation: return a null action).
@ -151,11 +151,11 @@ namespace MWWorld
virtual ContainerStore& getContainerStore (const Ptr& ptr) const;
///< Return container store or throw an exception, if class does not have a
/// container store (default implementation: throw an exceoption)
/// container store (default implementation: throw an exception)
virtual InventoryStore& getInventoryStore (const Ptr& ptr) const;
///< Return inventory store or throw an exception, if class does not have a
/// inventory store (default implementation: throw an exceoption)
/// inventory store (default implementation: throw an exception)
virtual bool hasInventoryStore (const Ptr& ptr) const;
///< Does this object have an inventory store, i.e. equipment slots? (default implementation: false)

Loading…
Cancel
Save