mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-02 14:57:59 +03:00
Fixes #1887: Equipped items do not emit sounds
Corrected wrong return type of Class::getSound() method. Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
This commit is contained in:
parent
e1663de7cf
commit
a6a3eca930
4 changed files with 4 additions and 4 deletions
|
@ -298,7 +298,7 @@ namespace MWClass
|
||||||
state2.mTime = dynamic_cast<LightCustomData&> (*ptr.getRefData().getCustomData()).mTime;
|
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;
|
return ptr.get<ESM::Light>()->mBase->mSound;
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@ namespace MWClass
|
||||||
const;
|
const;
|
||||||
///< Write additional state from \a ptr into \a state.
|
///< 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");
|
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();
|
return std::string();
|
||||||
}
|
}
|
||||||
|
|
|
@ -338,7 +338,7 @@ namespace MWWorld
|
||||||
virtual void restock (const MWWorld::Ptr& ptr) const {}
|
virtual void restock (const MWWorld::Ptr& ptr) const {}
|
||||||
|
|
||||||
/// Returns sound id
|
/// Returns sound id
|
||||||
virtual const std::string& getSound(const MWWorld::Ptr& ptr) const;
|
virtual std::string getSound(const MWWorld::Ptr& ptr) const;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue