Fixes #1887: Equipped items do not emit sounds

Corrected wrong return type of Class::getSound() method.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
deque
Lukasz Gromanowski 10 years ago
parent e1663de7cf
commit a6a3eca930

@ -298,7 +298,7 @@ namespace MWClass
state2.mTime = dynamic_cast<LightCustomData&> (*ptr.getRefData().getCustomData()).mTime;
}
const std::string& Light::getSound(const MWWorld::Ptr& ptr) const
std::string Light::getSound(const MWWorld::Ptr& ptr) const
{
return ptr.get<ESM::Light>()->mBase->mSound;
}

@ -83,7 +83,7 @@ namespace MWClass
const;
///< Write additional state from \a ptr into \a state.
virtual const std::string& getSound(const MWWorld::Ptr& ptr) const;
virtual std::string getSound(const MWWorld::Ptr& ptr) const;
};
}

@ -421,7 +421,7 @@ namespace MWWorld
throw std::runtime_error("this is not a door");
}
const std::string& Class::getSound(const MWWorld::Ptr&) const
std::string Class::getSound(const MWWorld::Ptr&) const
{
return std::string();
}

@ -338,7 +338,7 @@ namespace MWWorld
virtual void restock (const MWWorld::Ptr& ptr) const {}
/// Returns sound id
virtual const std::string& getSound(const MWWorld::Ptr& ptr) const;
virtual std::string getSound(const MWWorld::Ptr& ptr) const;
};
}

Loading…
Cancel
Save